Capital Gains Tax in Spain for Expats: Property, Investments & the 3% Retention Rule
Spain levies two entirely separate taxes when property changes hands. Most sellers only discover the second one when the notary reads out the figures. Here is how both work β the rates, the exemptions, and the withholding rule that catches non-resident sellers off guard every time.
Important: This article is a general guide to how Spanish CGT works. Tax rules change and individual circumstances vary significantly. Always take specialist advice before selling Spanish property or making decisions based on your residency status.
There are two separate taxes that apply when you sell Spanish property, and the distinction matters enormously. The first is the plusvalΓa municipal β the local council's tax on the increase in the official land value, calculated using the cadastral value of the land component and collected by the ayuntamiento. The second is the national capital gains tax: the impuesto sobre las ganancias patrimoniales, Hacienda's share, calculated on the real economic gain between what you paid and what you received.
Both can apply to the same transaction. The municipal plusvalΓa applies to virtually every property sale regardless of residency. This article is about the national CGT β the rates, the exemptions that can sharply reduce or eliminate the bill, and the 3% withholding mechanism that routinely catches non-resident sellers off guard when the notary announces that the buyer is keeping 3% of the price before handing over the cheque.
CGT Rates for Spanish Tax Residents (2026)
If you are a Spanish tax resident β meaning you spend more than 183 days in Spain in a calendar year, or Spain is your centre of economic interests β your capital gains are taxed as renta del ahorro (savings income) at a separate progressive scale from your ordinary income. The rates for 2026 are:
| Taxable gain (tranche) | Rate |
|---|---|
| First β¬6,000 | 19% |
| β¬6,001 β β¬50,000 | 21% |
| β¬50,001 β β¬200,000 | 23% |
| β¬200,001 β β¬300,000 | 27% |
| Above β¬300,000 | 28% |
To illustrate: a resident selling a property with a β¬150,000 taxable gain pays 19% on the first β¬6,000 (β¬1,140), 21% on the next β¬44,000 (β¬9,240), and 23% on the remaining β¬100,000 (β¬23,000). That gives a total bill of β¬33,380 β an effective rate of about 22.3%. The top bracket of 28% only kicks in on gains above β¬300,000, so in practice most property transactions fall into the 19β23% range.
The gain itself is calculated as the sale price minus the acquisition cost, with allowable deductions including purchase taxes paid at the time of buying, notary and registry fees, estate agent commissions on the sale, and the cost of any structural improvements made to the property (not routine maintenance or decoration). Getting the acquisition cost right is worth real money β every legitimate expense you can document from the original purchase reduces your taxable base.
CGT for Non-Residents: Flat Rates Apply
Non-residents pay a flat rate under the Non-Resident Income Tax Law (IRNR) rather than the progressive resident scale. The rate depends on where the seller is tax-resident:
| Seller's tax residency | CGT rate on Spanish property gain |
|---|---|
| EU or EEA member state (Norway, Iceland, Liechtenstein) | 19% |
| All other countries (UK, USA, Australia, Canada, etc.) | 24% |
Brexit created a material change here that many British sellers are not aware of. Before 1 January 2021, UK nationals resident outside Spain were treated as EU citizens for tax purposes and paid the 19% non-resident rate. Since Brexit, UK tax residents selling Spanish property pay 24% β a five percentage point increase on the full gain. On a β¬200,000 gain, that is an extra β¬10,000 in tax. Double taxation treaty relief is still available (more on this below), but the headline rate has shifted.
The 3% Retention Rule: What Non-Resident Sellers Need to Know
This is the mechanism that generates the most unpleasant surprises. Under Article 25.2 of the IRNR, when a non-resident sells Spanish real estate, the buyer is legally obliged to withhold 3% of the agreed sale price and pay it directly to Hacienda within 30 days of the completion date. The buyer retains this amount from what they pay the seller β it never arrives in the seller's account.
The 3% is not the final tax. It is a provisional deposit against the seller's CGT liability. Within four months of signing the notarial deed, the seller must file Modelo 210 declaring the actual gain and calculating what CGT is really owed. At that point, one of three things happens:
- Refund position: The 3% withheld is more than the CGT on the actual gain. This happens when the property sold for little more than it was bought for, or when legitimate deductions substantially reduce the gain. Hacienda refunds the excess β though it typically takes three to six months (often longer) to process.
- Nil position: The 3% withheld exactly matches the tax owed. Rare in practice.
- Payment due: The actual CGT liability exceeds the 3% withheld. The seller must pay the shortfall within the four-month filing window or face interest and penalties.
Consider a typical example. A UK resident sells a Spanish apartment for β¬380,000. The buyer retains 3% β β¬11,400 β and pays it to Hacienda. The seller's original purchase price was β¬250,000. With allowable deductions (purchase taxes of β¬20,000, notary fees of β¬3,000, sale commission of β¬11,400), the taxable gain is β¬380,000 minus β¬284,400 = β¬95,600. The CGT at 24% on β¬95,600 = β¬22,944. The seller already has β¬11,400 credited via the retention, so they owe a further β¬11,544 via Modelo 210. They expected to net β¬380,000 and instead net β¬345,656 after the retention and the additional payment.
The 3% is calculated on the sale price, not the gain. On a high-value sale with a modest gain β or even a loss β this creates a cash flow issue where the seller has already effectively lent money to Hacienda. Filing Modelo 210 promptly is essential to start the refund clock running if that is your position.
Main Residence Exemption: The Reinvestment Route
Spanish tax residents who sell their vivienda habitual (primary residence) can exempt the gain from CGT entirely β provided they reinvest the sale proceeds in a new primary residence within two years of the sale date. The two-year window runs from the completion date of the sale, not from when you start looking for a replacement property.
Partial reinvestment is allowed. If you reinvest 70% of the net proceeds, 70% of the gain is exempt. The remaining 30% is taxable in the normal way. This proportionality rule makes the exemption genuinely useful even when you are downsizing or reinvesting in a cheaper property.
Two conditions are worth noting carefully. First, the property must be your actual primary residence β not a holiday home or investment property you nominally used occasionally. Hacienda cross-references the address you registered on your IRPF returns, your padron registration, and your utility records. Second, you must remain a Spanish tax resident throughout the relevant period. Leaving Spain before the reinvestment is completed can eliminate the exemption.
The Over-65 Complete Exemption
Spanish tax residents who are 65 or older at the date of sale enjoy a more generous provision: complete CGT exemption on the sale of their primary residence, with no reinvestment requirement and no ceiling on the size of the gain. A 68-year-old resident selling their principal home for a β¬500,000 profit pays nothing in national CGT. This is one of the most valuable provisions in the Spanish tax code and it applies cleanly and without qualification once you meet the age and residency tests.
There is an additional benefit available to anyone over 65 selling any asset (not just their main home): gains of up to β¬240,000 can be exempted if the proceeds are used to purchase a renta vitalicia β a qualifying lifetime annuity β within six months of the sale. This is a useful planning tool for older expats with significant investment portfolios or secondary properties.
Investment Portfolio CGT: Shares, Funds, and Crypto
The same progressive rates that apply to property gains apply to gains on shares, investment funds, bonds, and cryptocurrency β all are treated as savings income in Spain. A resident who sells shares with a β¬60,000 gain pays 19% on the first β¬6,000, 21% on the next β¬44,000, and 23% on the final β¬10,000: a total of β¬10,670, or about 17.8% effective rate.
Investment Funds: The Traspasos Advantage
Spain operates a system that allows transfers between qualifying Spanish-domiciled investment funds without triggering a taxable event at the time of the transfer. This traspaso system means you can rebalance a portfolio of Spanish-qualifying funds β moving from one fund to another β without crystallising a gain until you eventually cash out. This is a meaningful planning advantage unavailable to those holding individual shares or non-qualifying funds.
Cryptocurrency Gains
Crypto gains are subject to Spanish CGT and must be declared in the annual IRPF return. Spain has become increasingly systematic about enforcement: since 2024, Spanish residents holding crypto assets on overseas exchanges must declare those holdings on Modelo 721, the crypto equivalent of the overseas assets declaration (Modelo 720). Hacienda receives data from exchanges under various reporting frameworks and matches it against declared income. Failing to report crypto gains is treated as a serious infraction.
Inherited Spanish Property: The Step-Up in Basis
When you inherit Spanish property, your acquisition cost for CGT purposes is the value declared in the inheritance tax (impuesto sobre sucesiones) calculation β typically the market value at the date of death. If you sell the property shortly after inheriting it at roughly that same market value, there is little or no CGT liability because the gain is small.
The problem arises when inherited property was declared at an artificially low figure at the time of inheritance β sometimes the old cadastral value was used to reduce the inheritance tax bill. Selling at full market value creates a substantial paper gain between the declared acquisition cost and the sale price, attracting CGT on money that was never really made. Hacienda has become more attentive to this gap, and it increasingly compares inheritance valuations with subsequent sale prices.
If you have inherited Spanish property that was declared at a low value and you are planning to sell, taking tax advice before completing the sale is particularly important. Correcting the valuation now (which involves amending the inheritance tax return) may carry a cost but can significantly reduce the eventual CGT exposure.
Foreign Currency Gains
This is a point that surprises many expats: gains arising from foreign currency fluctuation are technically taxable as capital gains in Spain. If you are a Spanish tax resident holding sterling, dollars, or Australian dollars β for example, money received as a pension, rental income from a foreign property, or the proceeds from a foreign asset sale β and the exchange rate moves in your favour before you convert to euros, the resulting euro-denominated gain is theoretically income in Spain's eyes.
In practice, Hacienda does not typically pursue small or incidental currency gains, and the reporting mechanics are complex. But for residents with large foreign currency holdings β say, a British expat who inherited a significant sterling sum after moving to Spain β material gains from exchange rate movement should be discussed with a tax adviser, particularly as Hacienda's data-matching capabilities improve.
Double Taxation Treaties: UK and US Nationals
Spain has double taxation treaties with most countries where its expatriate population originates. These treaties are designed to prevent the same income being taxed twice β once in Spain where the asset is located, and once in the seller's country of residence.
Under the 1975 UK-Spain double taxation treaty, Spain has the primary right to tax gains on Spanish immovable property. A UK tax resident who sells Spanish property will pay CGT in Spain first. The UK then treats the Spanish tax paid as a foreign tax credit against the UK's own CGT charge on the same gain. In practice this means the seller pays the higher of the two countries' rates, not both. Since UK CGT rates on property are currently 18β24% for higher rate taxpayers, and Spain's non-resident rate is 24%, the interaction can be close to zero net additional UK liability β but the UK return must still be filed and the foreign tax credit correctly claimed.
US nationals face a different complexity. The US taxes its citizens on worldwide income regardless of where they live, and the 1990 US-Spain treaty operates similarly β Spain taxes first on Spanish property, and the IRS provides a foreign tax credit for the Spanish CGT paid. However, the US and Spanish systems define gain and loss differently, and the timing of the credit can create mismatches. US nationals selling Spanish property should work with an adviser who understands both tax systems.
Practical Planning Notes
A few considerations that matter in practice:
- Residency status in the year of sale matters. Spain uses a calendar year for residency determination. If you sell a property in October and you have been in Spain for more than 183 days that year, you may be taxed as a resident β which means the progressive resident rates apply (typically lower on moderate gains) and the main residence exemption may be available. If you sell before meeting the 183-day threshold, the 24% non-resident rate applies and the 3% retention triggers.
- Document every acquisition cost. The taxable gain is the difference between the net sale price and the net acquisition cost. Every euro you can legitimately add to the acquisition cost β purchase taxes, notary fees, legal fees, structural improvements β reduces the gain. Keep all receipts from the original purchase permanently.
- File Modelo 210 promptly if you are a non-resident. The four-month window for filing after the sale completion is a hard deadline. Missing it attracts interest on unpaid tax and surcharges. If you are in a refund position, filing promptly starts the refund clock.
- Take advice before signing, not after. The planning window closes when the notarial deed is signed. Understanding your position β the CGT liability, whether exemptions apply, how the 3% retention interacts with your actual liability, and what your home country's treaty relief looks like β is entirely achievable before completion with proper advice.
If you are also considering your visa status as part of a move to Spain, the interaction between tax residency and immigration status is worth planning together. Our specialists can help you understand how your residency route affects your tax position from day one.
Frequently Asked Questions
Moving to Spain? Let's Plan Your Tax Position From Day One
Your residency route affects your tax status from the moment you land. Our specialists can walk you through visa options, residency timing, and how it all connects to your CGT and IRPF obligations.
