Capital gains tax in Spain: A complete guide for residents and expats
Understanding how capital gains tax (CGT) in Spain works is essential for anyone selling property or other investments in the country.
Whether you're a Spanish resident or a non-resident with assets in Spain, you may be liable for CGT when you profit from selling real estate, shares, or other assets.
Knowing the rates, exemptions, and filing obligations can help you manage your tax bill effectively – or avoid it altogether.
What is capital gains tax in Spain?
Capital gains tax in Spain is a tax on the profit made when selling certain types of assets. It applies to real estate, stocks, bonds, mutual funds, and even business interests.
The taxable gain is calculated by subtracting the original purchase price and allowable expenses (such as improvement costs and transaction fees) from the final selling price.
Both residents and non-residents are subject to CGT in Spain, although different rules apply depending on tax residency status.
Also read - Tax guide for Americans in Spain
Capital gains tax rates in Spain
Spain applies progressive CGT rates for residents, while non-residents are taxed at flat rates. Here’s how the current structure works:
Gain | Rate |
---|---|
Up to €6,000 | 19% |
€6,001 to €50,000 | 21% |
€50,001 to €200,000 | 23% |
Over €300,000 | 28% |
For non-residents:
- EU/EEA citizens – taxed at a flat 19%
- Non-EU/EEA citizens – taxed at a flat 24%
NOTE! These rates apply only to the capital gain, not the full sale price.
Capital gains tax exemptions and reductions
Spain offers a few generous exemptions and deductions to reduce or eliminate CGT under certain conditions:
- Primary residence exemption: If you're a Spanish tax resident over age 65 and sell your main home – where you've lived for at least three years – you can be fully exempt from CGT.
- Reinvestment exemption: If you sell your primary residence and reinvest the full amount into another main home within two years, the capital gain may be exempt.
- Life annuity exemption (for over 65s): You can avoid CGT on up to €240,000 of gains if you invest the proceeds into a qualifying life annuity within six months.
- Improvement and transaction cost deductions: Costs such as renovation work, notary fees, and real estate commissions can be deducted from your gain to reduce tax liability.
Capital gains tax for non-residents
Non-residents selling property or other assets in Spain should be aware of the following:
- Tax rate: Non-residents from the EU or EEA are taxed at 19%. Others face a 24% rate.
- 3% withholding tax: When a non-resident sells Spanish property, the buyer must withhold 3% of the sale price and pay it directly to the Spanish tax authorities as an advance CGT payment.
- Filing obligation: If the withheld 3% exceeds your final tax liability, you can claim a refund. If your liability exceeds the 3%, you must pay the difference.
- Double taxation agreements: US citizens may benefit from the US-Spain tax treaty, which helps avoid double taxation and allows credit for taxes paid in Spain when filing a US return.
How to avoid capital gains tax in Spain
While it’s not always possible to avoid CGT entirely, there are effective ways to reduce your liability:
- Be a long-term resident over 65: Sell your main home after turning 65 and meet the residency condition for a full exemption.
- Reinvest in another residence: Use the proceeds from your sale to buy a new primary home within the required timeframe.
- Track deductible costs: Maintain records of all home improvements and allowable expenses related to the sale.
- Plan sales strategically: Timing a sale when your other income is lower may reduce your overall tax rate as a resident.
Filing and paying capital gains tax in Spain
- For residents: Capital gains must be reported on your annual income tax return, typically filed between April and June the year after the asset is sold. The gain is declared as part of your savings income, and you pay the tax due based on the progressive CGT rates.
- For non-residents: You must file a separate tax declaration within four months of the sale date. Even if the 3% withholding covers your liability, the declaration is necessary to reconcile the final tax or request a refund.
Be sure to retain all supporting documents, including purchase and sale contracts, expense receipts, and tax payment confirmations.

Conclusion
Capital gains tax in Spain can have a significant impact on your profits from property or investment sales. However, with careful planning, timely reinvestment, and knowledge of exemptions, you can reduce or even eliminate your liability.
If you're unsure how Spanish CGT rules apply to your specific case — especially as a non-resident or dual filer - consult with an experienced tax advisor. They can help ensure compliance while protecting your gains.
FAQ
If you're over 65 and a Spanish resident, you can avoid CGT entirely when selling your main residence, as long as you've owned and lived in the property for at least three years.
Residents report CGT in their annual income tax return. Non-residents must file a separate declaration within four months of the sale and include documentation showing the sale price, acquisition cost, and withheld tax (if applicable).