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
- Any taxable person (empresario o profesional) under the régimen general (or simplified-with-general activity) of Spanish IVA who must self-assess output and input VAT for a settlement period.
- Period (casilla equivalent in the header): monthly (filers in REDEME, large companies > €6,010,121.04, VAT groups) or quarterly (everyone else). Quarterly periods are
1T–4T; monthly are01–12. - Deadlines: quarterly — by the 20th of April, July, October, and (4T) 30 January; monthly — by the 30th of the following month (February for December, with the 20-Feb / 28-Feb SII nuances). Domiciled direct-debit payment closes 5 days earlier (the 15th / 25th).
- Excluded: taxpayers wholly under régimen simplificado (Modelo 303 simplificado / 322 for VAT groups), recargo-de-equivalencia retailers with no general activity (they do not file 303 for that activity), and anyone reporting EC sales (those go on Modelo 349, reconciled here).
Conversion procedure
- 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.
- 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.
- Normalize. Amounts in EUR, dot decimal, 2 decimals, no thousands separator. Period code to
1T–4Tor01–12. Year toyyyy. NIF uppercased, no spaces. - 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.
- 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.
- 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).
- 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 (27 − 45) |
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
59–68cover operaciones no sujetas / exportaciones / entregas intracom informativas; boxes74–88handle 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 |
|---|---|
1T–4T |
Quarterly settlement periods (filers not in REDEME) |
01–12 |
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 59–61, not 01–06 |
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
- Cuota por tipo = base imponible × tipo, rounded to 2 decimals. (
1000.00 × 21 % = 210.00.) - Recargo de equivalencia = base × tipo de recargo, 2dp. (Only when supplying a retailer under recargo.)
- Total cuota devengada (casilla 27) = Σ of all output cuotas (02+04+06 + recargos 08+10+12 + intracom 11 + ISP 13 + modificaciones 15).
- Total a deducir (casilla 45) = Σ of all deductible cuotas (29+31+33+35+37+39 + 41 ± + 42 + 43 + 44).
- Resultado régimen general (casilla 46) =
27−45. - Resultado de la liquidación (casilla 71) =
46(+ régimen simplificado box 64 − 65, + regularizaciones 76, − cuotas a compensar de periodos anteriores carried in 78). With only general activity and a carry-forward credit:71=46−78. - Result type:
71> 0 → a ingresar (69/71to casilla 71/72 "Resultado");71< 0 and last period → a devolver (casilla 73);71< 0 mid-year → a compensar (casilla 87/88). - Prorrata: if deduction is partial, apply the deduction percentage before populating cuotas deducibles, and regularize in casilla
44with the definitive percentage at year-end. - SII reconciliation: Σ CuotaRepercutida (Libro Facturas Emitidas) should equal the output cuotas; Σ CuotaDeducible (Libro Facturas Recibidas) should equal the deducible cuotas. Flag any divergence.
- Always recompute; never copy a printed cuota. Amounts in EUR, dot decimal, 2dp.
Worked example (end-to-end)
Tecnología Norte SL, NIF B12345678, quarterly filer, period 3T 2026. During the quarter:
- Domestic sales: base
30000.00at 21 % → cuota6300.00. - One intra-EU acquisition of goods: base
5000.00, self-assessed output VAT at 21 %1050.00(and the same amount deductible). - Deductible input VAT on domestic running expenses: base
8000.00, cuota1680.00. - Deductible input VAT on the intra-EU acquisition:
1050.00. - Carry-forward credit from 2T:
0.00.
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.00 → a 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 trimestre → 3T; 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
- All bases and rates extracted; AI asked about anything missing or ambiguous (no invented bases, cuotas, or NIF)
- Period code correct (
1T–4Tquarterly or01–12monthly) and matches the filer's regime - Each base routed to the correct casilla by rate and operation type (interior 01/03/05, recargo 07–12, intracom 10/11, ISP 12/13)
- Every cuota recomputed = base × tipo (2dp); printed cuotas not blindly copied
- Casilla
27= Σ output cuotas; casilla45= Σ deductible cuotas - Casilla
46=27−45; casilla71derived correctly (incl. carry-forward78if any) -
tipoResultadoconsistent with sign of71(I a ingresar / D a devolver / C a compensar); devolución only in the last period - Prorrata / regularización applied where deduction is partial (casilla
44) - Adquisiciones intracomunitarias also reported on Modelo 349; SII ledger totals reconcile with devengado/deducible
- Amounts in EUR, dot decimal, 2dp, no thousands separator
- Filed by the statutory deadline (20th of month / 30 January for 4T) and box layout checked against the current official Modelo 303
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.