Calculating IVA in Spain takes one of two formulas: multiply to add it, divide to remove it. The classic mistake is using the wrong one. Taking 21% off a price that already includes IVA gives you the wrong answer every time, and on an invoice or a quarterly return that error adds up.

This guide gives you the exact formulas for the 21%, 10% and 4% rates, worked examples in euros, spreadsheet formulas you can copy, and the extra steps freelancers need when IRPF withholding or several rates appear on one invoice. If you are still getting familiar with the tax itself, start with our complete guide to IVA in Spain, which covers rates and exemptions in depth.

The two IVA formulas at a glance

Everything in this article comes back to these two calculations. Write the rate as a decimal: 21% is 0.21, 10% is 0.10 and 4% is 0.04.

  • Adding IVA to a net price: total = net price × (1 + rate)
  • Removing IVA from a gross price: net price = gross price ÷ (1 + rate)

Once you have the net price (the base imponible), the tax itself (the cuota de IVA) is simply total minus net. Here are the multipliers and divisors for each mainland rate:

  • 21% general rate: multiply by 1.21 to add, divide by 1.21 to remove
  • 10% reduced rate: multiply by 1.10 to add, divide by 1.10 to remove
  • 4% super-reduced rate: multiply by 1.04 to add, divide by 1.04 to remove

How to add IVA to a net price

Use this when a price is quoted "+ IVA" or when you are preparing your own invoice. Multiply the net amount by the rate to get the tax, then add the two together.

Example at 21%: you invoice €850 for design work.

  • Base imponible: €850.00
  • IVA: €850.00 × 0.21 = €178.50
  • Total: €850.00 + €178.50 = €1,028.50

The shortcut gives the same result: €850 × 1.21 = €1,028.50.

How to remove IVA from a price that includes it

Use this when you have an "IVA incluido" price and need the amount before tax, for example to record a receipt or to work out how much IVA you paid. Divide the gross price by 1 plus the rate, then subtract to find the tax.

Example at 21%: you pay €1,000 IVA incluido for a laptop.

  • Base imponible: €1,000 ÷ 1.21 = €826.45
  • IVA: €1,000.00 − €826.45 = €173.55

Example at 10%: a restaurant bill of €55 IVA incluido has a base of €55 ÷ 1.10 = €50.00, and €5.00 of IVA.

Example at 4%: a book costing €20.80 IVA incluido has a base of €20.80 ÷ 1.04 = €20.00, and €0.80 of IVA.

Why subtracting 21% gives the wrong answer

The 21% is charged on the net price, not on the gross. Taking 21% off the €1,000 laptop suggests €210 of IVA and a net price of €790, but add 21% back to €790 and you only reach €955.90. The real IVA is €173.55, so the shortcut overstates it by €36.45.

If you do want to go straight from the gross price to the tax, these are the correct shares of IVA inside a tax-inclusive price, rounded for quick checks:

  • At 21%, IVA is about 17.36% of the gross price
  • At 10%, IVA is about 9.09% of the gross price
  • At 4%, IVA is about 3.85% of the gross price

Reading a receipt with several IVA rates

A supermarket ticket can mix rates because the rate follows the product. Work out each group separately and never apply one rate to the whole total. Take a €19.13 ticket:

  • Bread at 4%: €2.08 gross, €2.00 base, €0.08 IVA
  • Other food at 10%: €11.00 gross, €10.00 base, €1.00 IVA
  • Shampoo at 21%: €6.05 gross, €5.00 base, €1.05 IVA

That gives a total base of €17.00 and total IVA of €2.13. Most tickets print this breakdown at the bottom. Our guide on what IVA means on a Spanish bill explains each line and term you will see.

Calculating an invoice with IVA and IRPF

Many self-employed professionals in Spain also deduct IRPF (income tax withholding) when invoicing Spanish businesses. Both percentages are calculated on the base imponible, never on each other or on the total. IVA is added and IRPF is subtracted.

Example with the general 15% withholding:

  • Base imponible: €1,000.00
  • IVA at 21%: + €210.00
  • IRPF at 15%: − €150.00
  • Total to receive: €1,060.00

New professionals can generally apply a reduced 7% in the year they register and the following two years, provided they tell the client. On the same invoice the withholding becomes €70.00 and the total €1,140.00. Our guide to IRPF withholding on freelance invoices explains when each rate applies and when no withholding is needed.

Working backwards from the amount you want to receive

Sometimes you know the amount that should land in your account. Add the IVA rate and subtract the IRPF rate to build a single divisor. With 21% IVA and 15% IRPF, that is 1 + 0.21 − 0.15 = 1.06. To receive exactly €2,000:

  • Base imponible: €2,000 ÷ 1.06 = €1,886.79
  • IVA at 21%: + €396.23
  • IRPF at 15%: − €283.02
  • Total to receive: €2,000.00

With 7% IRPF the divisor is 1.14. Remember that the amount received is not your income after tax: the IVA still has to be paid over to the tax agency, and you may owe further income tax.

Spreadsheet formulas you can copy

If the net or gross amount is in cell A2, these formulas work in Excel or Google Sheets. Change 1.21 and 0.21 for other rates.

  • Add IVA, showing the total: =ROUND(A2*1.21,2)
  • Add IVA, showing the tax only: =ROUND(A2*0.21,2)
  • Remove IVA, showing the base: =ROUND(A2/1.21,2)
  • Remove IVA, showing the tax only: =A2-ROUND(A2/1.21,2)

A Spanish-language version of Excel uses REDONDEAR and a semicolon between arguments: =REDONDEAR(A2*1,21;2). A spreadsheet is fine for checking numbers, but it does not keep the billing records that Spain's VeriFactu rules are designed around, so it should not be your invoicing system.

Rounding: why your total can be a cent out

Invoices are stated in euros and cents, so IVA is normally rounded to two decimals. The result can depend on where you round. Take three lines of €9.99 at 21%:

  • Rounding each line: €2.10 × 3 = €6.30 of IVA
  • Rounding once on the €29.97 subtotal: €6.29 of IVA

A one-cent gap like this is a rounding effect, not a tax calculation error. The practical rule is to pick one method, apply it consistently, and make sure the base, the tax and the total on the invoice add up. If a client's system disagrees with yours by a cent, compare methods before changing anything. For a large or unusual case, confirm the treatment with your adviser.

Special cases where the normal formula changes

Recargo de equivalencia

Retailers under this special scheme pay a surcharge to their suppliers on top of IVA: 5.2% with the 21% rate, 1.4% with the 10% rate and 0.5% with the 4% rate. Both are calculated on the base. A €100 purchase at the general rate comes to €100 + €21.00 + €5.20 = €126.20.

Canary Islands, Ceuta and Melilla

IVA does not apply in these territories. The Canary Islands use IGIC, with a 7% general rate, while Ceuta and Melilla use IPSI. The arithmetic is the same, but you must use the rate of the local tax, so check the official source for your specific item.

Exempt and foreign sales

Exempt services, such as most medical care, carry no IVA at all. Many sales to foreign business clients also carry no Spanish IVA. Before applying any formula, check whether the tax applies at all: our article on charging IVA to foreign clients sets out the rules for the EU, the UK and the US.

From invoice calculations to your quarterly IVA return

The same numbers feed your Modelo 303 quarterly return. In simple terms, you pay the IVA you charged minus the deductible IVA you paid. If you invoiced €10,000 plus €2,100 of IVA in a quarter, and bought €2,000 of deductible business supplies with €420 of IVA, the result is €2,100 − €420 = €1,680 to pay.

That is why the base and tax on each expense matter: you need the correct IVA figure from each valid invoice, and not every purchase qualifies for deduction. Treat this example as a simplified illustration rather than a full return.

Frequently asked questions about calculating IVA

How much is 21% IVA on €100?

It is €21.00, for a total of €121.00. If €100 already includes IVA, the base is €82.64 and the IVA is €17.36.

How do I know which IVA rate to use?

The rate depends on the product or service. Most freelance services use 21%, but check the rate categories in our IVA guide and the Agencia Tributaria's current tables for specific items.

Is IRPF calculated on the total with IVA?

No. IRPF is calculated on the base imponible only, before IVA is added.

What must an invoice show after I calculate IVA?

A full invoice normally shows the base, the rate and the tax amount, along with the other mandatory details listed in our guide to invoice legal requirements in Spain.

Stop calculating IVA by hand

Once you invoice regularly, manual sums become the slowest and riskiest step. Facturi applies the IVA rate to each invoice line, handles IRPF withholding and calculates your totals, so the numbers add up before the invoice goes out. Try Facturi free and spend your time on the work you are paid for.