JustaLina Martínez

Blog

Capital Gains Tax in Spain When You Sell a Property

Most owners have a fair idea of what their Costa del Sol home will sell for. Far fewer know what they'll keep once capital gains tax in Spain and the town hall's plusvalía have been paid, and the figure depends heavily on where you're tax resident.

It matters before you list. The tax shapes your realistic minimum price and how you compare offers, and if you live outside Spain it decides how much of the price the buyer holds back on the day you sign.

The short answer is that a seller who is tax resident in Spain pays income tax on the gain at 19% to 30%, and some sales of a main home are exempt. A non-resident pays a flat 19% on the gain, the buyer withholds 3% of the price and pays it to the tax office, and the seller files a return to settle the difference. In both cases the town hall charges plusvalía if the land has gained value.

In this guide, you'll learn how the gain is worked out, which rates apply to residents and non-residents, how the 3% retention and Modelo 210 work, when a sale is exempt and what to expect from plusvalía.

Resident or non-resident: which rules apply to you

Spain taxes the sale according to your tax residence, not your nationality. The usual test is spending more than 183 days of the calendar year in Spain or having your main economic interests here, so a British owner who lives in Marbella most of the year is normally resident and one who only winters on the coast probably isn't. If you're near the line, have an adviser confirm your position before you agree a sale.

Resident sellerNon-resident seller
Tax on the gainIncome tax (IRPF), savings baseNon-resident income tax (IRNR)
Rate19% to 30%, by bracket19% flat
How it's paidIncome tax return for the year of sale, filed the following yearBuyer withholds 3% of the price (Modelo 211); seller files Modelo 210
Main home exemptionsReinvestment, over 65, handing the home to the lender (dación en pago)Reinvestment only, and only for EU and EEA residents
Plusvalía municipalSeller pays the town hallBuyer pays it as substitute taxpayer; amount agreed in the sale

Transfer tax or VAT is the buyer's to pay. My overview of Spanish property taxes covers every stage of ownership; this guide stays with the sale.

How the gain is worked out

Capital gains tax on property in Spain starts from the same calculation for residents and non-residents, the transfer value minus the acquisition value, as set out in article 35 of the Income Tax Act (Ley 35/2006).

The acquisition value is what you paid for the property plus the taxes and costs of buying it, such as the notary, the Land Registry and the transfer tax or VAT you paid at the time. Improvements count too, though repairs, upkeep and mortgage interest don't. If you've let the property, the depreciation for those years is taken off, which pushes the gain up.

The transfer value is the sale price minus the selling costs you paid, such as the estate agent's commission (see how estate agent fees work in Spain) and the plusvalía, which the Agencia Tributaria deducts this way in the worked example in its 2025 income tax manual. If the declared price is below market value, the tax office uses market value.

Keep every deed and invoice, because improvements you can't document may not be accepted. If you bought before 31 December 1994, a transitional rule may reduce the part of the gain that built up before 20 January 2006, a fiddly calculation best left to your adviser.

If you inherited the property

With an inherited home, the acquisition value is the value declared for inheritance tax (Impuesto sobre Sucesiones y Donaciones), capped at market value, plus the costs and taxes you paid to inherit. The acquisition date is the date of death rather than the date of the original purchase.

This catches people out in Andalucía. Close family (descendants, spouses and ascendants) get a 99% reduction on inheritance tax under article 39 of Ley 5/2021, Andalucía's ceded taxes law, so a low declared value costs almost nothing at the time but leaves a bigger gain when you sell. Plusvalía is paid twice, once by the heirs on inheriting and again on the sale, and where several heirs sell, each declares their own share of the gain.

Capital gains tax in Spain for residents

If you're resident, the gain goes into the savings base of your income tax return (IRPF) for the year of the sale, which you file the following year. Each slice of the gain is taxed at its own rate. If you sell for less than the property cost you, there's no gain and no income tax to pay on the sale.

Portion of the gainRate
Up to 6,000 euros19%
6,000 to 50,000 euros21%
50,000 to 200,000 euros23%
200,000 to 300,000 euros27%
Over 300,000 euros30%

These are the rates in the Agencia Tributaria's 2025 income tax manual, split equally between a state half and a regional half, and they're the same in Andalucía as in the rest of common-territory Spain. Ley 7/2024 raised the top rate from 28% to 30% from 2025. On a gain of 100,000 euros, the tax works out at 1,140 euros on the first 6,000, 9,240 on the next 44,000 and 11,500 on the last 50,000, so 21,880 euros in total.

Selling your main home to buy another

A resident who sells their main home and puts the whole amount into a new main home within two years pays no income tax on the gain, and the two years can fall before or after the sale. Reinvest only part of it and only the matching proportion of the gain is exempt. The conditions that trip people up are these:

Both the home you sell and the one you buy must count as your main home under the income tax rules, which require a minimum period of continuous residence.

You have to state in the income tax return for the year of sale that you intend to reinvest.

If there's still a mortgage on the home you sell, the amount you need to reinvest is calculated differently (more on that in selling a property with a mortgage in Spain).

Plusvalía is still payable, because the exemption covers income tax only.

Over 65, and handing the home to the lender

According to the Agencia Tributaria, sellers over 65 (and people with severe or major dependency) pay no income tax on the gain from their main home if they've lived in it for at least three continuous years and hold full ownership, alone or shared. A split between bare ownership and usufruct rules the exemption out, and a second home never qualifies. The other exempt case is dación en pago, which means handing your main home to the lender (or losing it to foreclosure) to clear the mortgage on it when you have no other assets to pay the debt.

Both sit in the income tax rules for residents. The Agencia Tributaria's guidance for non-resident sellers mentions only the reinvestment exemption.

Selling as a non-resident: the 3% retention and Modelo 210

For a non-resident, the rate is a flat 19% on the whole gain, for UK residents and every other non-resident alike, and the gain is worked out with the same rules described above (Agencia Tributaria). The money reaches the tax office in stages:

On completion, the buyer keeps back 3% of the agreed price and pays it to the Agencia Tributaria on Modelo 211 within one month of the sale, giving you a copy.

You file Modelo 210, the non-resident tax return, declaring the gain. The deadline is three months after that one-month period ends, so roughly four months from completion.

The 3% is set against the 19% due. If it falls short, you pay the difference with the return, and if it was more than the tax, you can claim the excess back.

The 3% is a payment on account, so it rarely matches the final bill. If a non-resident sells for 800,000 euros with a gain of 200,000, the buyer withholds 24,000 euros, the tax is 38,000, and 14,000 is still to pay with Modelo 210. On a property that has barely risen in value, most of the 3% comes back. If the buyer fails to pay the retention, the property itself stays liable for the lower of the 3% and the tax due, which gives the buyer every reason to pay it.

Capital gains tax in Spain for non-residents has one possible exemption. Sellers who live in another EU or EEA country (Iceland, Norway and Liechtenstein included) can claim the main-home reinvestment exemption, although the 3% is still withheld and Modelo 210 still has to be filed. The UK isn't on that list, so a seller living in Britain can't use it.

What about plusvalía tax?

Plusvalía municipal, officially the tax on the increase in value of urban land (IIVTNU), is charged by the town hall where the property sits. It looks only at the land, not the building, and each council sets its own rate within a maximum fixed by national law.

Real Decreto-ley 26/2021, in force since 10 November 2021, changed how it works. If the land hasn't gained value between purchase and sale, there's nothing to pay, and you prove it to the council with the two deeds. Otherwise the tax base is worked out in one of two ways, either the objective method, which applies a coefficient to the cadastral value of the land according to how many years you've owned it (up to 20), or the real method, based on the actual gain on the land. You can ask to be taxed on whichever is lower.

A resident seller pays plusvalía. When the seller is a non-resident individual, the law makes the buyer the substitute taxpayer (sustituto del contribuyente), so the buyer pays the council and the amount is usually agreed as part of the sale. It's settled shortly after completion, within a legal deadline your adviser can confirm.

Before you set your asking price

Capital gains tax in Spain is far easier to plan for before you list than to absorb after you sign. Gather your purchase deeds and improvement invoices, check which side of the residence line you're on, and ask a Spanish tax adviser (asesor fiscal) to run the figures, because these rules are reviewed every year. If you live in the UK, speak to a UK adviser too, since GOV.UK says that for a gain on a house abroad you pay tax in both countries and claim relief in the UK for the Spanish tax.

If you're selling in Marbella, Nueva Andalucía, Estepona, Benahavís or Sotogrande, I can help you set a price with the after-tax figure in mind. You can read how I work with sellers, or get in touch with your property's details and we'll go through it together.

More guides