FinchContext
Run with

Build the Modelo 303 VAT Return

Skill: Convert bookkeeping VAT figures into the Modelo 303 casillas dataset

Region: Spain (España) Category: VAT — IVA (Modelo 303, autoliquidación periódica del IVA) Does: Takes a period's VAT-relevant transactions (IVA devengado y soportado) and produces a strictly-valid JSON object keyed by the official Modelo 303 casillas (box numbers) — IVA devengado by rate, intracomunitarias / inversión del sujeto pasivo, recargo de equivalencia, IVA deducible, resultado del régimen general (casilla 46) and resultado de la liquidación (casilla 71) — ready to key into the AEAT form or presentation file. Standard: AEAT Modelo 303 (Orden HAC vigente; autoliquidación del Impuesto sobre el Valor Añadido)

This skill produces the box-by-box dataset a user transcribes into the AEAT Modelo 303 (Sede Electrónica form, the predeclaración / fichero, or a tax-software import). It is not a signed presentation by itself. The casilla numbering follows the current official model; confirm the active box layout (it changes most years) and any régimen-specific annexes before filing. SII filers must still file the 303 — but the AEAT pre-fills the Libros registro; reconcile every box against the SII ledgers.


When this applies


Conversion procedure

  1. Read the source. Accept a trial balance / VAT ledger export (CSV/JSON), the SII Libros registro aggregates, or pasted period totals. Identify, per VAT rate, the taxable base (base imponible) and output VAT (cuota) for sales, and the deductible input VAT (cuota soportada) for purchases.
  2. Extract fields. Pull bases and cuotas split by rate (21 / 10 / 4 %), by operation type (interior, adquisiciones intracomunitarias, inversión del sujeto pasivo, importaciones), recargo de equivalencia amounts, and any quota a compensar carried from prior periods. If a base or rate is missing or ambiguous, ask — never invent a figure.
  3. Normalize. Amounts in EUR, dot decimal, 2 decimals, no thousands separator. Period code to 1T4T or 0112. Year to yyyy. NIF uppercased, no spaces.
  4. Classify each base into its casilla. Use the Source → Casilla map and Code tables below. Régimen general devengado occupies bases 01/03/05 and cuotas 02/04/06 for the three current rates; recargo de equivalencia 09–11; adquisiciones intracom 10–11 group; ISP 12–13; importaciones (con IVA diferido) deductible boxes.
  5. Compute. Recompute every cuota = base × tipo (2dp). Sum devengado (casilla 27), sum deducible (casilla 45), derive régimen general result casilla 46 = 27 − 45, then the liquidation casilla 71. Never copy a printed cuota — recompute and flag mismatches.
  6. Determine the result type. From casilla 71: positive → a ingresar; if claiming refund in the last period → a devolver (casilla 73); otherwise carry as a compensar (casilla 87/88 cuota a compensar).
  7. Emit the JSON keyed by casilla (see Document structure and the worked example) and validate against the checklist.

Source → Casilla map

From the source → Modelo 303 casilla
Base de operaciones interiores al 21 % 01 (base), 02 (cuota)
Base de operaciones interiores al 10 % 03 (base), 04 (cuota)
Base de operaciones interiores al 4 % 05 (base), 06 (cuota)
Base recargo de equivalencia 5,2 % 07 (base), 08 (cuota)
Base recargo de equivalencia 1,4 % 09 (base), 10 (cuota)
Base recargo de equivalencia 0,5 % 11 (base), 12 (cuota)
Adquisiciones intracomunitarias de bienes y servicios 10/11 group → bases 10, cuota 11
Otras operaciones con inversión del sujeto pasivo 12 (base), 13 (cuota)
Modificación bases y cuotas (devengado) 14 (base), 15 (cuota)
Total cuota devengada (Σ 02+04+06+08+10+12+13+15…) 27
Cuotas soportadas operaciones interiores corrientes base 28, cuota 29
Cuotas soportadas operaciones interiores bienes de inversión base 30, cuota 31
Cuotas soportadas importaciones de bienes corrientes base 32, cuota 33
Cuotas soportadas importaciones bienes de inversión base 34, cuota 35
Adquisiciones intracomunitarias corrientes (deducible) base 36, cuota 37
Adquisiciones intracomunitarias bienes de inversión (deducible) base 38, cuota 39
Rectificación de deducciones base 40, cuota 41
Compensaciones régimen especial agricultura/ganadería/pesca 42
Regularización bienes de inversión 43
Regularización por aplicación del % definitivo de prorrata 44
Total a deducir (Σ 29+31+33+35+37+39+41+42+43+44) 45
Resultado régimen general (2745) 46
Resultado de la liquidación (46 + 64 − 65 + 76 − 77 …) 71
Cuotas a compensar de periodos anteriores 78
Resultado de la liquidación menos compensación 87/88
Importe a ingresar / a devolver / a compensar 69/72/73 group

Casilla numbers above follow the current official Modelo 303. Boxes 5968 cover operaciones no sujetas / exportaciones / entregas intracom informativas; boxes 7488 handle the final settlement (resultado, compensación, devolución). Always check the active form, since several boxes have shifted across recent versions (recargo at 5,2/1,4/0,5 % since 2021).


Document structure

The deliverable is one JSON object. Top-level keys group the casillas:

{
  "modelo": "303",
  "identificacion": { ejercicio, periodo, nif, razonSocial, tipoDeclaracion },
  "ivaDevengado": {                       // régimen general output VAT
    "01","02","03","04","05","06",        // interior 21/10/4 %
    "07"..."12",                          // recargo de equivalencia
    "10","11","12","13",                  // intracom + inversión sujeto pasivo
    "14","15",                            // modificaciones
    "27"                                  // total cuota devengada
  },
  "ivaDeducible": {                        // input VAT
    "28"..."44",                          // soportadas interiores / importaciones / intracom / regularizaciones
    "45"                                  // total a deducir
  },
  "resultado": {
    "46",                                 // régimen general (27 − 45)
    "64"..."68",                          // regularizaciones / cuotas a compensar
    "69","71",                            // resultado liquidación
    "78","87","88",                       // compensación
    "tipoResultado"                       // "I" a ingresar | "C" a compensar | "D" a devolver
  },
  "reconciliacionSII": { devengadoLibroEmitidas, soportadoLibroRecibidas }
}

Mandatory: identificacion, ivaDevengado.27, ivaDeducible.45, resultado.46, resultado.71, resultado.tipoResultado. The reconciliacionSII block is informative (for SII filers).


Code tables

Tipo de declaración (header)

Code Meaning
I Ingreso (a ingresar — payment due)
D Devolución (a devolver — refund requested, last period)
C Compensación (a compensar — carry the credit forward)
N Sin actividad / resultado cero
U Domiciliación del ingreso (direct debit)
G Solicitud de aplazamiento / fraccionamiento

Periodo

Code Meaning
1T4T Quarterly settlement periods (filers not in REDEME)
0112 Monthly settlement periods (REDEME, large companies, VAT groups)

Tipos impositivos vigentes (régimen general)

Tipo Casillas (base / cuota)
21 % 01 / 02
10 % 03 / 04
4 % 05 / 06
0 % exempt / non-subject → informativas 5961, not 0106

Tipos de recargo de equivalencia

Recargo Aplica al tipo IVA Casillas (base / cuota)
5,2 % 21 % 07 / 08
1,4 % 10 % 09 / 10
0,5 % 4 % 11 / 12

Calculation rules


Worked example (end-to-end)

Tecnología Norte SL, NIF B12345678, quarterly filer, period 3T 2026. During the quarter:

After extraction + normalization (intermediate)

Concept Base Tipo Cuota
Ventas interiores 30000.00 21 % 6300.00
Adquisición intracom (devengado) 5000.00 21 % 1050.00
Soportado interior corriente 8000.00 21 % 1680.00
Intracom deducible 5000.00 21 % 1050.00

Devengada (27) = 6300.00 + 1050.00 = 7350.00. Deducible (45) = 1680.00 + 1050.00 = 2730.00. Régimen general (46) = 7350.00 − 2730.00 = 4620.00. Liquidación (71) = 4620.00a ingresar.

Output — Modelo 303 casillas (JSON)

{
  "modelo": "303",
  "identificacion": {
    "ejercicio": "2026",
    "periodo": "3T",
    "nif": "B12345678",
    "razonSocial": "Tecnología Norte SL",
    "tipoDeclaracion": "I"
  },
  "ivaDevengado": {
    "01": 30000.00,
    "02": 6300.00,
    "03": 0.00,
    "04": 0.00,
    "05": 0.00,
    "06": 0.00,
    "10": 5000.00,
    "11": 1050.00,
    "12": 0.00,
    "13": 0.00,
    "14": 0.00,
    "15": 0.00,
    "27": 7350.00
  },
  "ivaDeducible": {
    "28": 8000.00,
    "29": 1680.00,
    "30": 0.00,
    "31": 0.00,
    "36": 5000.00,
    "37": 1050.00,
    "40": 0.00,
    "41": 0.00,
    "42": 0.00,
    "43": 0.00,
    "44": 0.00,
    "45": 2730.00
  },
  "resultado": {
    "46": 4620.00,
    "64": 0.00,
    "65": 0.00,
    "66": 100.00,
    "69": 4620.00,
    "71": 4620.00,
    "78": 0.00,
    "87": 4620.00,
    "88": 0.00,
    "tipoResultado": "I"
  },
  "reconciliacionSII": {
    "devengadoLibroEmitidas": 6300.00,
    "soportadoLibroRecibidas": 1680.00,
    "nota": "Las adquisiciones intracomunitarias (1050.00 devengado y deducible) se reportan en el Libro de Facturas Recibidas y en el Modelo 349."
  }
}

Normalisations shown: rate 21% → tipo 21; amounts 30.000,00 €30000.00 (dot decimal, 2dp); period tercer trimestre3T; cuotas recomputed (30000.00 × 21 % = 6300.00); casilla 27 = Σ devengado, casilla 45 = Σ deducible, casilla 46 = 27 − 45, casilla 71 carried to 46 with no prior credit; tipoDeclaracion I because 71 > 0. Box 66 ("% de atribución a la Administración del Estado") is 100.00 for a state-territory taxpayer.


Validation checklist


Last updated: 2026-06-13 — verify the current Modelo 303 casilla layout, vigent tipos impositivos and recargos, and AEAT filing deadlines against the official Orden ministerial and Sede Electrónica before use.