Capital gains tax in Spain when you sell your home abroad after moving
✓ Researched against official sources
Capital gains tax in Spain when you sell your home abroad after moving
You move to Spain, register as a resident, then sell the house back home. Spain taxes residents on worldwide gains — which can be a nasty surprise. This guide walks you through residency timing, double-tax relief, the paperwork you need and the exact next move to avoid paying twice.
By Iria Mos·Editor — money, healthcare and housing
If you are a Spanish tax resident at the moment you sell, Spain will tax the capital gain on your foreign house as part of your worldwide income, even if your home country also taxes it.
Which country taxes the sale depends on timing: sell before you become resident and you usually avoid Spanish tax; sell after and you’ll face Spanish tax with a foreign-tax credit to avoid double taxation (but you must prove the foreign tax paid).
Keep hard evidence of your move date (empadronamiento, airline tickets, bank activity) and obtain a tax-residence certificate from your home country, those documents are the difference between paying twice and getting a credit.
For simple, small gains you can file yourself; for large sales, cross-border treaties or reinvestment exemptions, pay a Spanish tax adviser (a gestor or abogado fiscal). Expect the specialist fee to be worth it on any gain over a few tens of thousands of euros.
The situation you recognise
Imagine this: you flew into Alicante in April, found a flat, registered (empadronamiento) in June, got your NIE and started spending most days in Spain. In November you accept an offer on your house back home and the sale completes in December. A few months later you get a letter from Hacienda asking why you didn’t declare a capital gain.
That scenario is common. The single pivot that decides whether Spain gets a bite is whether you were a Spanish tax resident on the day of the sale. Get that date wrong and the tax bill can be unpleasant, and fixing it is slow.
When Spain taxes a sale of a foreign property
Spanish tax residency is assessed on the calendar year. You are a Spanish tax resident if either:
you spend more than 183 days in Spain in the calendar year, or
your main centre of economic interests is in Spain (income, family, business); or
you register as a resident and the tax office accepts that as evidence of residency for that tax year.
If you were a Spanish tax resident on the date the deed passed (or on the date you received the money, depending on the foreign jurisdiction), Spain will tax the capital gain. Spain taxes residents on worldwide income (including capital gains), so the gain from selling the house abroad must be declared on your Spanish income tax return (IRPF) in the year the sale occurs.
If you were not a Spanish tax resident on the sale date, Spain shouldn’t tax that foreign-sourced gain — the country where the property sits will have primary taxing rights. That’s why the timing of your move and the evidence you keep are so important.
How the tax is calculated — the practical bits
Spain treats capital gains from property as part of the savings tax base and applies the savings rates to the net gain. Rates change intermittently, roughly in the range of 19%–27% in recent years, so check the Agencia Tributaria for current bands and the figure that will apply in your filing year (agenciatributaria.es).
In practice the taxable gain is:
sale price (in euros using the official exchange rate on the sale date), minus
acquisition cost (what you paid, including purchase tax and notary/registry costs), minus
allowable improvements and certain selling expenses (agent fees, advertising, legal costs in the seller’s country) with invoices to prove them.
Two operational points:
Use the official exchange rate for the transaction dates; Hacienda expects euros, not foreign currency approximations.
Keep every receipt and the foreign tax certificate showing tax paid on the gain in the other country — you’ll need it to claim relief in Spain.
Double taxation: treaty relief and foreign tax credits
Most countries have a double taxation agreement (DTA) with Spain. Those treaties decide which country has priority and how relief works. If both countries tax the same gain, Spain generally allows a credit for foreign tax paid, but the credit cannot exceed the Spanish tax attributable to that gain.
Two common examples:
If you sell in the UK and you were a Spanish resident at sale, the UK will often tax the gain and Spain will tax the gain too. You claim a credit in Spain for UK tax paid under the UK–Spain DTA.
If you sell in the US, the US may tax the sale; Spain will allow a deduction/credit under the US–Spain treaty, but you must supply a US tax certificate and translate it if requested.
Internal links you’ll want: read our guides to the US and UK DTAs with Spain for common treaty issues, US–Spain and UK–Spain.
Practical checklist: documents and steps you need
Before you sell, or immediately afterwards, collect the following. Without them, getting relief from Hacienda is harder.
Proof of Spanish move date: empadronamiento certificate (Ayuntamiento) and NIE registration date.
Evidence of days spent in Spain that year: flight tickets, hotel bookings, bank statements showing local spending, GP or clinic registrations.
Sales deed and completion statement from the foreign notary/solicitor (showing the sale date and amounts).
Purchase deed (how much you paid originally), invoices for major improvements and receipts for selling costs (estate agent, lawyer).
Official document or tax certificate from the country of sale showing tax withheld/paid on the capital gain, translated if necessary.
Bank statements showing currency conversion and receipt of sale proceeds.
If you have foreign assets over the reporting threshold, Modelo 720 documents (see below) and previous wealth declarations.
Modelo 720, wealth tax and other reporting traps
If you hold property abroad at year-end, you may have additional reporting and tax obligations in Spain.
Modelo 720: as of 2026 the rule remains that residents must report foreign assets above a threshold (commonly quoted as €50,000) on the Modelo 720 between January 1 and March 31 for the previous tax year. The rules and penalties for late or incorrect Modelo 720 filings are serious, check the Agencia Tributaria page and our explainer Modelo 720.
Wealth tax: some regions levy wealth tax on worldwide assets above regional allowances. If your foreign property leaves your net wealth above the regional threshold, you may owe wealth tax; see our guide Wealth tax for expats.
Those rules are why many people sell before they become Spanish tax residents: fewer reporting burdens and reduced risk of penalties. But selling before you move isn’t always practical. Timing, currency issues and estate plans can make it unattractive.
What you can do yourself and when to hire a pro
DIY territory:
If the gain is small (a few thousand euros), the foreign country’s tax is straightforward, and you have clear documentation, you can usually calculate the gain and file the Spanish return yourself using the Agencia Tributaria portal.
If you didn’t become resident until after the sale and you can prove it, you can file with confidence without a specialist.
Pay a professional if any of these apply:
The gain is large (think tens of thousands of euros or more).
There’s disagreement about your residency date (183‑day rule, centre of economic interests claim) or the other country also claims you as resident.
The foreign tax authority withheld tax and you need a treaty claim or certificate to avoid double taxation.
You’re dealing with complications: inherited property, mixed personal/business use, pre-1994 acquisitions with indexation rules, or reinvestment exemptions in the other country.
Who to hire? A Spanish gestor can do the IRPF form, but for treaty work and litigation you want a fiscalista or tax lawyer. If the foreign tax authority needs coaxing, use a local (in-the-country) lawyer plus your Spanish adviser. Read our note on whether visa/tax lawyers are worth it at Spain visa lawyers — worth it?
Deadlines and the timeline you must know
Key calendar points:
Annual Spanish income tax return (Declaración de la Renta): the sale is declared in the tax year it occurred; the filing window is the following spring/summer (May–June is common). Check the Renta calendar for the exact dates: Spanish tax calendar.
Modelo 720: file between Jan 1 and March 31 for the previous year’s assets if thresholds are exceeded.
Keep records for at least four years — that’s the normal audit period, and you may need proofs to claim foreign tax credits.
Example timeline for the scenario at the top: you moved in June and sold in December. You will likely be treated as a resident for that tax year (because you spent >183 days, or because your centre of economic interests moved). You must include the gain on the following year’s Renta filing window. Do not wait to speak to a gestor: the sooner you get the foreign tax certificate and invoices, the easier the credit claim.
Concrete next actions: what to do this week
Pull together the move evidence: empadronamiento, NIE, flight records, bank statements — put copies in a folder.
Request a tax-residence certificate from your home tax authority immediately (many countries have an online form; it can take weeks).
Ask your foreign solicitor/notary for a formal sales statement and a tax certificate showing any withholding or capital-gains tax paid — get both translated if they aren’t in Spanish/English.
Contact a Spanish gestor and email them your documents; get a fee quote. If the gain is over €20k, budget for a fiscalista instead.
If you hold foreign property at year-end and the value looks near the reporting threshold, read the Modelo 720 guide and set a calendar reminder for Jan–Mar.
FAQ
If I sold before I registered as a Spanish resident, do I still have to pay Spain tax?
No — if you were not a Spanish tax resident on the sale date and the gain is foreign‑sourced, Spain normally won’t tax it. You must keep evidence (sale date document, proof you weren’t resident that calendar year). If you were borderline on days spent in Spain, Hacienda may ask for evidence that your main economic and personal ties remained outside Spain.
What proof does Hacienda accept for my move date?
Empadronamiento is the simplest. Supplement it with your NIE registration, travel records, Spanish bank cards showing local use, GP registration or private healthcare registration, and any landlord rental contracts. The more independent evidence the better.
Can I use a foreign tax payment to reduce my Spanish tax bill?
Yes. Spain allows a foreign tax credit for tax paid on the same gain abroad, but you’ll need an official tax certificate from the foreign authority (or proof of withholding). The credit is limited to the Spanish tax attributable to that gain; excess foreign tax may not be fully recoverable.
Do I have to file Modelo 720 if I sold the property during the year?
If at year-end you still owned (or held) foreign assets above the reporting threshold, you must file Modelo 720 in the Jan–Mar window. If you sold and no longer hold the asset at 31 December, you may not need to file for that asset — but check carefully and consult our Modelo 720 guide or a gestor.
Should I try to sell before I move to Spain?
For many retirees it’s simpler to sell before becoming a Spanish tax resident: fewer reporting obligations and no Spanish tax on the gain. But timing, currency issues and estate plans matter. If the potential tax saving is small or the sale is difficult to accelerate, the hassle may not be worth it. If in doubt, get a quick tax estimate from a Spanish adviser before you move.
How much will a Spanish gestor cost to handle the return?
For a single foreign-property sale with clean documents a gestor might charge a few hundred euros to prepare your Renta. If a fiscalista or tax lawyer must negotiate treaty issues or represent you before Hacienda, plan on several hundred to a few thousand euros depending on complexity. Treat the fee as insurance if the gain is large.
Answer a few questions and we’ll add the tax steps that actually apply to you — where you’ll be resident, what your pension pays, and what to do before you leave.
Iria works between Spain and France and comes from the same corner of the tourism sector, the part that ends up answering questions about doctors, contracts and money rather than beaches. On HolaRetire she looks after healthcare, tax and housing, and is the reason those guides quote figures and form names instead of generalities.
If you spend more than 183 days in Spain in a calendar year you become a Spanish tax resident — that single fact is what decides whether a local gestor will do or you truly need a tax advisor (asesor fiscal). Practical comparison, costs, traps and who to hire for the first year.
Many expect the Canaries to be noticeably cheaper because IGIC is lower than mainland IVA. That’s true for some shopping — but not for everything. This guide explains where the savings are real, what people don’t warn you about (shipping, online VAT, vehicle import), and the practical checklist retirees need.
If you move to Spain and keep a buy-to-let back home, Spanish tax law doesn’t forget it. You must declare that rental income on your Spanish tax return, claim foreign tax credits correctly and watch the Modelo 720 and wealth-tax consequences.
If you own a Spanish property but aren’t a tax resident, Spain still taxes the property and any income it produces. This guide explains the forms (Modelo 210), the imputed‑income rule, rental rules, sale withholding, who must appoint a fiscal representative, deadlines, and the one surprise that trips people up.