Selling as a Non-Resident: The 3% Retention and Capital Gains Tax
When a non-resident sells a Spanish property, the buyer withholds 3% of the price and pays it to the tax office (Modelo 211) as an advance on the seller's capital gains tax. The seller then files Modelo 210 within four months to declare the real gain, taxed at a flat 19%, and either reclaims the excess or pays the difference. You also owe plusvalia municipal to the town hall.
Selling as a non-resident on the Costa del Sol comes with two tax mechanisms that surprise most foreign owners: the 3% retention withheld at completion and the capital gains tax settled afterwards through Modelo 210. This guide explains how the 3% retention works, how your capital gain is calculated and taxed under Non-Resident Income Tax (IRNR), and the other charges (plusvalia municipal, IBI) you need to clear before and after signing. The rules are national, so they apply the same in Marbella, Estepona, Fuengirola, Mijas or anywhere along the coast.
The 3% retention explained (Modelo 211)
When the seller of a Spanish property is a non-resident, the law requires the buyer to withhold 3% of the agreed sale price and pay it directly to the Agencia Tributaria using Modelo 211, within one month of completion (the date of the notarised deed).123 The buyer then hands the seller a stamped copy of the 211 as proof.
This 3% is not an extra tax. It is a payment on account against the seller’s eventual capital gains liability under IRNR, and it exists as a guarantee so the Spanish state can collect from a taxpayer who lives abroad.12 The 211 carries a unique reference code that the seller must quote on their own capital gains return in order to offset the amount already withheld or claim it back.3
Because it is calculated on the full sale price and not on the profit, the 3% is frequently larger or smaller than the real tax due. That mismatch is exactly what the seller resolves next through Modelo 210.
Capital gains tax for non-residents (Modelo 210)
After completion the non-resident seller must declare the actual capital gain and settle the definitive tax using Modelo 210, the IRNR return. The deadline is four months from the date of sale, which in practice is three months after the buyer’s one-month window to pay the 3% has closed.157
Capital gains on the transfer of Spanish real estate by a non-resident are taxed at a flat rate of 19% on the net gain, and this rate applies to all non-residents regardless of nationality.56 (Do not confuse this with the 19% versus 24% split that applies to rental and imputed income, covered below.)
How the taxable gain is calculated
The gain is the difference between the transfer value and the acquisition value, after applying the deductions Spanish law allows:67
- Acquisition value: the original purchase price plus the taxes and costs you paid when buying (Transfer Tax or IVA/AJD, notary, Land Registry and legal fees), plus the cost of any documented capital improvements.
- Transfer value: the current sale price, less the expenses and taxes you incur as seller (for example estate agent commission and plusvalia municipal).
Keep every invoice. Improvements and buying costs raise your acquisition value and therefore shrink the gain, but only if you can evidence them to the Agencia Tributaria.
Reclaiming the excess or paying the difference
| Situation | What happens |
|---|---|
| Real capital gains tax is less than the 3% withheld | You file Modelo 210 to request a refund of the excess. Repayment typically takes around 6 to 12 months once the return is processed.15 |
| Real capital gains tax is more than the 3% withheld | You pay the shortfall when you submit Modelo 210, offsetting the 3% already on account.16 |
| You sold at a loss | No capital gains tax is due, and you file Modelo 210 to recover the full 3% retention. |
Refunds are only released once your IBI and other property taxes are up to date, so clear any arrears before you sell. Many non-residents appoint a fiscal representative or lawyer to file the 210 and chase the refund, because the Agencia Tributaria corresponds in Spanish and repayments to foreign bank accounts can stall without follow-up.
Plusvalia municipal (IIVTNU): the town hall’s slice
Separate from the state capital gains tax, the seller also owes plusvalia municipal, formally the Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana (IIVTNU). It is a local tax on the increase in the value of the urban land (not the building) during your ownership, paid to the town hall of the municipality where the property sits.4
By law the seller is the taxpayer, but when the seller is non-resident the buyer becomes a substitute or joint obligor and may retain and pay the tax on the seller’s behalf if it is not settled directly.4 This is why buyers of non-resident properties often insist on withholding the plusvalia at completion. The return must be filed within 30 working days of signing the deed.4
Since the 2021 to 2022 reform you may choose the method that produces the lower bill: the objective method, based on the cadastral land value and the number of years owned, or the real-gain method, based on the actual profit made.4 If you sold at a loss there is, in principle, no plusvalia to pay, but you must still declare it and prove the loss.
Loose ends to clear before you sign
Beyond the two main taxes, a clean non-resident sale on the Costa del Sol depends on several documents and running costs being in order:
- NIE: both parties need a valid Spanish foreigner identification number to sign; see the related guide on getting your NIE.
- IBI (Impuesto sobre Bienes Inmuebles): the annual council property tax must be paid up to date, and the current year is usually apportioned between buyer and seller at completion. Keep the latest IBI receipt to hand, as its cadastral value also feeds the plusvalia and imputed-income calculations.
- Imputed and rental income while you owned: if you never rented the property the Agencia Tributaria still imputes a notional income of 1.1% or 2% of the cadastral value each year (1.1% where the cadastral value was revised in the last ten years, otherwise 2%), declared annually on Modelo 210.1 If you did let it out, rental income is taxed at 19% for EU/EEA residents (who may deduct expenses) and 24% for non-EU residents such as UK owners, who are taxed on the gross.1 Any unpaid back years can block your sale or your 3% refund.
- Energy Performance Certificate (certificado energetico) and an up-to-date community-of-owners fee certificate are required to complete.
For a fuller picture of the annual obligations, see the related guides on non-resident property taxes and Modelo 210.
A worked timeline
- Completion day: the deed is signed; the buyer withholds 3% of the price (and often the plusvalia).
- Within 30 working days: plusvalia municipal is declared and paid to the town hall.4
- Within 1 month: the buyer pays the 3% to the Agencia Tributaria via Modelo 211 and gives the seller the stamped copy.13
- Within 4 months: the seller files Modelo 210, declares the real gain at 19%, offsets the 3%, and either claims a refund or pays the difference.15
- 6 to 12 months later: any refund is typically paid, provided all property taxes are current.15
Practical tips to reduce the pain
- Assemble your cost file early. The original purchase deed, buying-tax receipts, notary and registry invoices, agent commission and improvement works all lower your taxable gain if documented.
- Reconcile your position before you list. Bring IBI, imputed income and any rental declarations up to date so refunds are not withheld.
- Budget for the cash-flow gap. On a low-profit or loss sale the 3% can tie up a meaningful sum for the best part of a year until the refund arrives.
- Use a fiscal representative. A local lawyer or tax adviser handles the 210, the refund claim and correspondence with the Agencia Tributaria in Spanish, which is where most delays occur.
Handled properly, the 3% retention and capital gains tax are predictable rather than punitive. The key is treating the 3% as a deposit against a 19% bill, keeping your paperwork airtight, and filing the Modelo 210 on time.
This guide is general information, not personal tax or legal advice. Rates and thresholds can change, and your position depends on your country of residence and any double-taxation treaty. Confirm the current rules with the Agencia Tributaria or a qualified adviser before acting.
Frequently asked questions
Is the 3% retention an extra tax when I sell?
No. It is an advance payment on account against your capital gains tax under Non-Resident Income Tax (IRNR). The buyer withholds 3% of the sale price and pays it to the Agencia Tributaria via Modelo 211 within one month of completion. You later offset it, or reclaim it, on your Modelo 210.
What capital gains tax rate does a non-resident pay when selling in Spain?
A flat 19% on the net gain (transfer value minus acquisition value, after allowable buying costs and documented improvements). This 19% applies to all non-residents regardless of nationality, and is separate from the 19%/24% split used for rental and imputed income.
How do I get the 3% back if I sold at a loss or a small profit?
File Modelo 210 within four months of the sale, quoting the reference code on the buyer's Modelo 211. If your real tax is below the 3% withheld (or nil), you claim the excess as a refund. Repayment usually takes about 6 to 12 months and requires all your property taxes to be up to date.
What is plusvalia municipal and who pays it?
It is a local town-hall tax (IIVTNU) on the increase in the urban land value during your ownership. The seller is the taxpayer, but when the seller is non-resident the buyer can become a substitute payer and withhold it. It must be declared within 30 working days of completion, and since the 2022 reform you can choose the calculation method that gives the lower bill.
What is the deadline to file Modelo 210 after selling?
Four months from the date of the sale (the notarised deed). That is effectively three months after the buyer's one-month window to pay the 3% retention has closed.
Do I still owe anything if the property was empty and never rented?
Yes. Spain imputes a notional income of 1.1% or 2% of the cadastral value each year (1.1% if the cadastral value was revised in the last ten years, otherwise 2%), declared on Modelo 210. Unpaid back years should be cleared before you sell, as they can hold up completion or your 3% refund.