Tax Legislation 2026

How to calculate VAT in Spain from gross and net price

Equipo CalculafyApril 7, 202610 min read
Calculator and invoice documents for VAT calculations with net base and gross total

Learn how to add VAT, remove VAT and split taxable base with practical 21%, 10% and 4% examples.

General rate21%

Most goods and services.

Reduced rate10%

Hospitality, transport and selected foods.

Super reduced rate4%

Essential goods.

Main VAT formulaTaxable base x (1 + VAT rate) = Gross total

21% example: 1,000 x 1.21 = 1,210

Formula to add VAT to a taxable base

To calculate a VAT-inclusive total, multiply the taxable base by 1 + VAT rate in decimal form. For a 21% rate, multiply by 1.21.

If your base is €1,000, the gross total is €1,210 and VAT amount is €210.

This operation is essential for accurate invoicing and margin planning when your listed prices are net.

Quick examples with Spanish VAT rates

At 21%, a €850 base creates €178.50 VAT and a €1,028.50 gross total.

At 10%, a €850 base creates €85.00 VAT and a €935.00 gross total.

At 4%, a €850 base creates €34.00 VAT and a €884.00 gross total.

How to remove VAT from a gross amount

When you only have a gross amount, divide by 1 + rate to recover the taxable base. Example: €1,210 / 1.21 = €1,000.

Then obtain VAT by subtracting base from gross total.

This is especially useful when you receive invoices or receipts with VAT included and need clean accounting values.

How to calculate VAT on multi-line invoices

In professional invoicing, calculate VAT per line and then sum totals. This avoids mismatches in documents with mixed rates.

Applying one single rate over a subtotal can create rounding differences versus line-by-line calculation.

When you have mixed rates (for example 21% and 10%), split bases and VAT amounts by rate before consolidating total.

Common VAT splitting mistakes

A frequent mistake is subtracting 21% directly from a gross amount. That does not recover the correct net base.

Another common issue is applying the wrong rate (21/10/4) because product tax categories were not checked.

If in doubt, verify the rate first and use a VAT calculator to avoid quarterly filing discrepancies.

Output VAT, input VAT and quarterly result

For freelancers and small businesses, VAT filing usually compares output VAT (charged to clients) and input VAT (paid on deductible expenses).

Quarterly result usually follows: output VAT minus input VAT. If positive, you pay; if negative, it can be carried forward or refunded depending on regime.

Understanding this logic helps keep cash flow expectations realistic and clean.

Practical invoicing tips for 2026

Keep a consistent rounding rule (usually two decimals) across all invoice lines.

Always validate that taxable base, VAT amount and gross total reconcile mathematically.

Automated VAT calculations reduce manual errors and save significant admin time.

Pre-invoice VAT checklist

Confirm each line uses the correct VAT rate and that taxable base excludes exempt items.

Validate two-decimal rounding and final totals, then keep a traceable audit of calculations.

If you issue many invoices monthly, automation and reusable templates significantly lower human error.

Frequently asked questions

What is the formula for 21% VAT?

VAT = base x 0.21. Gross total = base x 1.21.

How do I split an invoice with included VAT?

Divide gross total by 1 + VAT rate, then separate base and tax.

Should VAT be calculated per line or on invoice total?

For accounting precision, line-by-line VAT calculation is usually recommended.

What is the difference between output VAT and input VAT?

Output VAT is charged to customers; input VAT is paid on deductible business expenses.

How can I avoid VAT rounding errors?

Use two-decimal rounding consistently across all invoice lines and totals.