Spain Capital Gains Tax Calculator — Free Online Tool

Amir Shahzad is the founder of MixKhazana. He writes the site's free finance and tax calculators, researching every figure from official sources so the numbers stay trustworthy.

Published: 24 November 2026  ·  Updated: 24 November 2026

Sell a property or shares in Spain with an €80,000 gain and a Spanish tax resident pays €17,280 in capital gains tax — 19% on the first €6,000, 21% to €50,000 and 23% to €80,000 — keeping €62,720 of the gain. Enter your sale and purchase prices below and this free Spain capital gains tax calculator works out the IRPF savings tax for residents and the flat 19% for non-residents, instantly, in EUR.

MixKhazana · Quick answer

€80,000 gain in Spain, tax resident = €17,280 capital gains tax (21.6% effective). The gain is taxed as savings income (base del ahorro) in five bands — 19%, 21%, 23%, 27% and 30% above €300,000 — and the top band rose from 28% to 30% on 1 January 2025 under Ley 7/2024. Non-residents pay a flat 19% on the gain.

Researched by MixKhazana Team · Last updated 24 November 2026 · Data: Agencia Tributaria (IRPF savings scale) · Boletín Oficial del Estado, Ley 7/2024, arts. 66 and 76 LIRPF

Gran Vía, Madrid
Photo: Tomás Fano / Wikimedia Commons, CC BY-SA 2.0 — Gran Vía, Madrid
Notary, registry, transfer tax, agent and legal fees — with invoices.
Renovations and extensions that added value, with receipts.
Dividends and interest already in the savings base — the bands fill up in order.
Example: You sell a flat in Madrid for €280,000 that you bought for €195,000, with €5,000 of buying and selling costs. Gain: €280,000 − €195,000 − €5,000 = €80,000. As a Spanish tax resident the tax is 19% × €6,000 = €1,140, plus 21% × €44,000 = €9,240, plus 23% × €30,000 = €6,900 — total €17,280 (21.6% effective). Net proceeds after tax: €280,000 − €17,280 = €262,720. As a non-resident the same gain is taxed at a flat 19% = €15,200.
Note: This is an estimate only — not tax advice. Tax year 2026. Regional IRPF rules, the main-home exemptions and the municipal plusvalía tax are not included. Check your figures with the Agencia Tributaria or a qualified asesor fiscal before you sell.

What is capital gains tax in Spain?

Capital gains tax in Spain is the tax on the profit you make when you sell an asset for more than you paid for it — a flat, a house, shares, funds or crypto. For Spanish tax residents the gain is taxed as savings income (base del ahorro) inside the annual IRPF return, on a progressive scale that is the same in every region: 19% on the first €6,000, 21% to €50,000, 23% to €200,000, 27% to €300,000 and 30% above €300,000. Each rate applies only to the slice of gain inside its band, so the effective rate on a typical gain is well below the top rate. Non-residents pay a flat 19% on the whole gain. Spain does not distinguish short-term from long-term gains — a flat held for one year and a flat held for twenty years are taxed on the same scale. The top band is the one most articles get wrong: it rose from 28% to 30% on 1 January 2025 under Ley 7/2024, and it is unchanged for 2026.

How to use

  1. Enter the sale price and the purchase price you originally paid.
  2. Add your buying and selling costs (notary, registry, transfer tax, agent and legal fees) and any improvements with receipts — both come off the gain.
  3. Choose your tax residency — resident bands or the flat 19% for non-residents.
  4. Your tax, net proceeds and effective rate appear instantly.

The formula

Capital gain = sale price − purchase price − buying costs − selling costs − improvements. Then the tax is worked out band by band on the gain:

Residents: 19% × the first €6,000 of gain, 21% × the part from €6,000 to €50,000, 23% × the part from €50,000 to €200,000, 27% × the part from €200,000 to €300,000, and 30% × anything above €300,000. If you already have dividends or interest in the savings base this year, those fill the lower bands first — enter them in the “other savings income” box and the calculator pushes your gain into the higher bands. Non-residents: 19% × the whole gain, with no bands. The state scale (article 66 LIRPF) and the regional scale (article 76 LIRPF) are identical, so the combined rates above are the same wherever in Spain you live.

Worked example

A Spanish tax resident sells a flat in Madrid for €280,000, bought years ago for €195,000, with €5,000 of buying and selling costs:

  • Capital gain: €280,000 − €195,000 − €5,000 = €80,000
  • 19% × €6,000 = €1,140
  • 21% × €44,000 = €9,240
  • 23% × €30,000 = €6,900
  • Total tax: €1,140 + €9,240 + €6,900 = €17,280 — an effective rate of 21.6% on the gain
  • Net proceeds after tax: €280,000 − €17,280 = €262,720
  • As a non-resident the same gain would be taxed at a flat 19% = €15,200

2026 capital gains tax rates in Spain

Savings income (gain)Resident rateNon-resident rate
Up to €6,00019%19% flat on the whole gain
€6,000 – €50,00021%
€50,000 – €200,00023%
€200,000 – €300,00027%
Above €300,00030%

Two exemptions can wipe the tax out entirely. If you are over 65 and you sell your main home, the gain is exempt. And if you sell your main home and reinvest the proceeds in another main home within two years, the gain is exempt under the reinvestment relief (exención por reinversión). Neither exemption applies to second homes, rentals or shares — those are taxed on the scale above. Remember this calculator covers the national IRPF only: the municipal plusvalía tax, charged by the town hall on the increase in the land value, is a separate bill, and non-resident sellers also face a 3% retention on the sale price, withheld by the buyer and set against the final 19% bill. If you hold Spanish property as an expat, our sister site ExpatMoneyEU has a Spain wealth tax calculator for the other Spanish tax that catches property owners.

Frequently asked questions

How much capital gains tax do I pay on an €80,000 gain in Spain?

As a Spanish tax resident you pay €17,280 on an €80,000 gain: 19% on the first €6,000 (€1,140), 21% on the next €44,000 (€9,240) and 23% on the remaining €30,000 (€6,900). As a non-resident the same gain is taxed at a flat 19%, which is €15,200. Enter your own figures in the calculator above for an exact result.

What are the capital gains tax rates in Spain for 2026?

For 2026, Spanish tax residents pay 19% on the first €6,000 of savings income, 21% from €6,000 to €50,000, 23% from €50,000 to €200,000, 27% from €200,000 to €300,000 and 30% above €300,000. The 30% top band has applied since 1 January 2025, when Ley 7/2024 raised it from 28%; it is unchanged for 2026.

Do non-residents pay a different capital gains tax rate in Spain?

Yes. Non-residents pay a flat 19% on the whole capital gain, with no progressive bands, under article 25.1.f of the Non-Residents Income Tax Law. The buyer also withholds 3% of the sale price and pays it to the tax office as an advance on the seller’s bill.

Is my main home exempt from capital gains tax in Spain?

Sometimes. If you are over 65 and you sell your main home, the gain is fully exempt. If you sell your main home and reinvest the proceeds in another main home within two years, the gain is exempt under the reinvestment relief. Second homes, rentals and shares never qualify for these exemptions.

What costs can I deduct from a Spanish capital gain?

The purchase price plus the costs of buying (transfer tax or VAT, notary, registry, legal fees), the costs of selling (agent and legal fees) and improvements that added value, where you have invoices. Keep every receipt: the Agencia Tributaria can ask for proof, and undocumented improvements are routinely disallowed.

What is plusvalía municipal — is it the same tax?

No. Plusvalía municipal is a separate local tax charged by the town hall on the increase in the land value while you owned the property. This calculator covers only the national IRPF capital gains tax; plusvalía is an extra bill on top, and its amount depends on the town hall and the cadastral value.

When do I pay Spanish capital gains tax?

Residents declare the gain in the annual Renta return (Modelo 100) for the year of the sale, filed the following spring. Non-residents declare within three months of the sale on Modelo 210, and the 3% retention withheld by the buyer counts against the 19% bill.

Is this Spain capital gains tax calculator an official tax tool?

No. It is an estimate using the 2026 IRPF savings scale from the Agencia Tributaria and Ley 7/2024 (Boletín Oficial del Estado, articles 66 and 76 LIRPF). It does not include regional variations, the main-home exemptions, or the municipal plusvalía tax — always check your figures with the Agencia Tributaria or a qualified asesor fiscal before you sell.

Sources and disclaimer

Figures on this page come from the Agencia Tributaria (IRPF savings income scale, base del ahorro) and the Boletín Oficial del Estado (Ley 7/2024 amending articles 66 and 76 LIRPF, raising the top savings rate from 28% to 30% from 1 January 2025; Non-Residents Income Tax Law article 25.1.f, flat 19% for non-residents). Figures change: check the current tables with the Agencia Tributaria before you sell. This calculator is an estimate only and is not tax advice.

Related tools

Calculator on a desk
🇩🇪

Free Germany Capital Gains Tax Calculator

German capital gains tax at the 25% flat rate plus solidarity surcharge.

Calculate →
Calculator on a desk
🇬🇧

Free UK Capital Gains Tax Calculator

UK capital gains tax with the annual exempt amount and residential rates.

Calculate →
Calculator on a desk
🇺🇸

Free US Capital Gains Tax Calculator

US federal capital gains tax at the 0%, 15% and 20% rates.

Calculate →
Euro banknotes
🇪🇸

Free Spain Autónomo Tax Calculator

Spanish self-employed (autónomo) tax and social security on your income.

Calculate →
Euro banknotes
🇪🇸

Free Spain Beckham Law Tax Calculator

Spain’s Beckham Law special tax regime for inbound workers.

Calculate →
Euro banknotes
🇪🇸

Free Salary After Tax Spain Calculator

Take-home pay in Spain, with IRPF, social security and 12 vs 14 pagas.

Calculate →

Card photos: MixKhazana heroes library — see the individual pages for credits.

Share:
Note: Estimate only — not tax advice. Confirm your figures with the Agencia Tributaria or a qualified asesor fiscal before you sell.
Disclaimer: The information and estimates on this page are for general guidance only and are not professional financial, legal or medical advice — always verify with official sources before acting. Photos on this page are copyright-free originals, credited to the photographer and source with the licence noted.