Guide · Selling

Capital gains tax on selling a home in Spain

Capital gains on a home sale in Spain: residents pay 19% to 30% (IRPF), non-residents 19% (IRNR). How the gain is computed, with a worked example.

In short

A gain on selling a home in Spain is taxed by Spain whoever the seller is. A resident pays personal income tax (IRPF) at 19%, 21%, 23%, 27% or 30% depending on the size of the gain. A non-resident, including a British, Canadian or US owner, pays non-resident income tax (IRNR) at a flat 19%. The gain is the sale value minus the purchase value, adjusted for costs. Both rates are national and apply in every region. Exemptions for a main home or for sellers over 65 are covered separately.

How the gain is computed

The tax base is the difference between two values (Ley 35/2006 art. 34.1).

Acquisition value (art. 35.1): the real price paid, plus the cost of investments and improvements, plus the expenses and taxes that came with the purchase and that you paid, excluding interest. The regulations then reduce it by depreciation where relevant.

Transfer value (art. 35.2): the real price of the sale, less the expenses and taxes inherent to the sale that the seller paid. The price is the amount actually paid, but if it is lower than normal market value, market value prevails.

Inherited or gifted property (art. 36): when you acquired the home free of charge, the acquisition value is the value used for inheritance and gift tax, and it cannot exceed market value. A transfer on death creates no gain for the deceased (art. 33.3.b).

The plusvalía municipal paid by the seller is one of the sale taxes that reduce the transfer value to the extent the seller paid it; see plusvalía municipal. Purchase taxes and notary costs usually raise the acquisition value; see buying a property in Spain as a foreigner.

Residents: the savings scale

A resident’s gain goes into the savings base (art. 49), taxed on the national scale in article 66 combined with the regional share in article 76. Each part is 9.5% up to €6,000, 10.5% up to €50,000, 11.5% up to €200,000, 13.5% up to €300,000 and 15% above. The two parts together give:

Savings baseTotal rate
First €6,00019%
€6,000 to €50,00021%
€50,000 to €200,00023%
€200,000 to €300,00027%
Above €300,00030%

This scale has applied since 1 January 2025 (Ley 7/2024), and the consolidated text shows no later change. Gains and losses of the year are netted against each other; a net loss offsets only up to 25% of positive savings income of the other kind, and may be carried forward four years (art. 49.1). Your personal and family minimum is applied before the scale.

Calculation, not a quote. A resident with a €100,000 gain and no other savings income pays, before the minimum, €10,380 on the first €50,000 and 23% on the next €50,000: €10,380 + €11,500 = €21,880. Gains are reported in the annual return for the year of the sale.

Non-residents: 19% flat

For a person not resident in Spain, a capital gain is taxed at 19% (IRNR art. 25.1.f.3º). The 24% general rate applies to other income such as rents, not to the gain. The gain is calculated with the same rules as above (art. 24.4), except the rule on dividing common property. A resident of another EU or EEA state with an effective exchange of information is also taxed at 19% and may use the same computation rules (art. 24.6).

Two steps follow a sale by a non-resident (the full procedure is in selling as a non-resident: the 3% withholding and modelo 210):

  1. The buyer retains 3% of the agreed price and pays it on modelo 211 within one month of the transfer (art. 25.2). It is an advance payment, not the tax.
  2. The seller files modelo 210 within three months after the one-month period, whatever the result, and sets the withholding against the tax (Agencia Tributaria).

Calculation, not a quote. Price €400,000, acquisition value €320,000: gain €80,000, tax at 19% = €15,200. Withholding is 3% of €400,000 = €12,000, so €3,200 remains to pay on modelo 210. If the price had been equal to the acquisition value, the €12,000 would be refundable.

Where tax treaties come in

Spain may tax a gain on Spanish real estate under both the UK treaty (art. 13.1) and the Canadian treaty (art. XIII.1). The relief for double taxation is given in the country where you live, under rules that are outside this guide. Use the non-resident tax calculator for a first estimate, and ask your own tax authority how the Spanish tax is credited at home.

Exemptions that reduce or remove the gain are in reinvesting in a main home (open to residents, and to EU or EEA residents who sell what was their main home in Spain; not to UK, Canadian or US residents) and in the over-65 exemption. The overall costs of a sale are in selling a home in Spain: costs.

Which professional to consult

A tax adviser or a lawyer registered with a Spanish bar association (colegio de abogados) can compute the acquisition value from old deeds and invoices; see property lawyer. Keep the purchase deed, receipts for improvements and proof of purchase taxes: the whole computation rests on them.

Frequently asked questions

Is the 3% withholding the capital gains tax?

No. It is an advance payment retained by the buyer. The actual tax is 19% of the gain, settled on modelo 210.

Do Americans and Canadians pay a different rate?

No. The 19% rate on capital gains applies to every non-resident individual. The 24% rate is for rents and imputed income.

Are improvements deductible?

Yes. The acquisition value includes the cost of investments and improvements made to the property (art. 35.1.b).

What if I inherited the home?

Your acquisition value is the value declared for inheritance tax, capped at market value (art. 36).

Is there a different rule for a main home?

Yes, in two cases: reinvesting the proceeds in a new main home, and sale of the main home by someone over 65. See the linked guides.

More guides on selling

Sources

All guides · Payotte Spain