Madrid Apartment

Selling Your Madrid Apartment as a Non-Resident in 2026: The 3% Retention, Capital Gains Tax and Every Step

8 min read

Selling Your Madrid Apartment as a Non-Resident in 2026: The 3% Retention, Capital Gains Tax and Every Step

You bought a flat in Salamanca or Chamberí a few years ago, prices have climbed, and now you want to cash in. Then someone mentions a 3% withholding at the notary, a capital gains tax, and a municipal tax called the plusvalía. Suddenly the clean profit you imagined looks blurry.

This guide cuts through the noise. If you are a non-resident seller, you face three separate taxes and one cash-flow trap that catches almost every foreign owner off guard. We break down exactly what you pay, when you get money back, and how to keep more of your gain in 2026.

The Three Taxes Every Non-Resident Seller Faces

Before signing anything, understand that selling property in Madrid as a non-resident triggers three distinct charges. They are independent of each other, calculated differently, and paid to different authorities.

  • The 3% retention (retención): withheld by the buyer at the notary and paid to the Spanish tax agency on account of your future capital gains tax.
  • Capital gains tax (IRNR): the real tax on your profit, currently 19% for EU/EEA residents and many treaty countries.
  • Plusvalía municipal: a local tax on the increase in the land value, paid to Madrid city hall.

Many sellers assume the 3% is the whole story. It is not. It is merely an advance payment. Your actual tax bill can be higher or lower, which is why getting the maths right matters so much.

If you want the broader fiscal picture before you sell, our guide on Spanish taxation for property owners sets out IRNR, IBI and wealth tax in plain terms.

The 3% Retention at Source: Why the Buyer Keeps Part of Your Money

Here is the rule that surprises most foreign sellers. When a non-resident sells Spanish property, the buyer is legally required to withhold 3% of the sale price and pay it directly to the Agencia Tributaria using form 211.

Why does this exist? Because once you have your money and leave Spain, the tax office has no easy way to chase you. The 3% is their security deposit against your capital gains liability.

A concrete example

Say you sell a Chamberí two-bedroom for €650,000. At the notary, the buyer hands you only €630,500. The remaining €19,500 (3% of €650,000) goes to the tax agency within one month of the sale.

That €19,500 is not lost. It counts as a prepayment against the capital gains tax you owe on your actual profit. The reconciliation happens later, when you file your IRNR return.

When you get money back

If your real capital gains tax is lower than the 3% withheld, you claim a refund. This is common when:

  • You did not make a large profit (or sold at a loss).
  • Your buying costs and renovation invoices reduce the taxable gain.

The refund is requested via form 210 within three months after the buyer files form 211. Realistically, expect to wait several months for the Spanish treasury to process it.

Capital Gains Tax for Non-Residents: How the Real Bill Is Calculated

The 3% is an advance. The true tax is on your capital gain, meaning the difference between what you bought for and what you sold for, adjusted for allowable costs.

The formula in 2026 looks like this:

Taxable gain = Sale price − Acquisition value − Selling costs

Where:

  • Acquisition value = original purchase price + ITP or VAT paid + notary, registry and legal fees + documented renovation works.
  • Selling costs = agency commission, your lawyer fees, and any energy certificate or documentation costs.

The tax rate

For EU and EEA residents, the rate is a flat 19% on the gain. For residents outside the EU/EEA (for example, the UK after Brexit or the US), the rate rises to 24%, and importantly, non-EU sellers cannot deduct expenses in the same favourable way.

Let us run the numbers. You bought in Retiro for €400,000 with €40,000 in purchase costs. You spent €30,000 on a documented renovation. You now sell for €650,000 with €25,000 in selling costs.

  • Acquisition value: €400,000 + €40,000 + €30,000 = €470,000
  • Net sale: €650,000 − €25,000 = €625,000
  • Taxable gain: €625,000 − €470,000 = €155,000
  • Tax at 19%: €29,450

Since €29,450 exceeds the €19,500 already withheld, you owe an additional €9,950 when you file. Keep every invoice. Those renovation receipts saved you €5,700 in this scenario alone.

If you used a professional to manage your refurbishment, our renovation service keeps the paper trail clean, which directly lowers your future tax bill.

The Plusvalía Municipal: Madrid's Local Land Tax

The plusvalía municipal (officially the IIVTNU) is a separate tax paid to Madrid city hall. It taxes the theoretical increase in the value of the land your property sits on, not the building itself.

Since a 2021 reform, you can choose between two calculation methods, and you should always pick the cheaper one:

  • Objective method: based on the cadastral land value multiplied by a coefficient set by the years of ownership.
  • Real method: based on the actual land-value increase between purchase and sale.

If you sold at a loss, you owe zero plusvalía, but you must prove it with both deeds. The seller is legally responsible for paying this tax, and in Madrid it must be settled within 30 working days of the sale.

For a central Madrid flat, the plusvalía typically lands somewhere between €2,000 and €15,000, depending on the cadastral land value and how long you held the property. Always request a simulation from the city hall before signing.

Documents You Need Ready Before the Notary

A smooth sale depends on paperwork. Missing a single document can delay completion by weeks. Get these ready early:

  • NIE number: if you somehow lost track of it, our complete NIE guide explains how to recover or confirm it. You cannot sell without it.
  • Original title deed (escritura) of your property.
  • Energy performance certificate (certificado energético): mandatory for any sale.
  • Latest IBI receipt (the annual property tax) proving you are up to date.
  • Community of owners certificate confirming no outstanding fees.
  • Cédula de habitabilidad or occupancy documentation where applicable.
  • Recent utility bills and proof of any mortgage cancellation.
  • Renovation and improvement invoices to reduce your taxable gain.

A Spanish bank account also makes life easier for receiving the sale proceeds and paying taxes. If you do not have one, see our guide on opening a Spanish bank account as a non-resident.

The Step-by-Step Selling Timeline in 2026

Here is how a non-resident sale unfolds in practice, from decision to clean exit.

  1. Valuation and pricing. Set a realistic asking price based on recent comparable sales. In prime districts like Salamanca, asking prices in 2026 sit around €7,000–9,000 per m², while Chamberí and Retiro run roughly €5,500–7,500 per m². Overpricing kills momentum.
  2. Gather documents. Energy certificate, IBI, community certificate, deed.
  3. List and market the property. Professional photos and the right channels matter.
  4. Accept an offer and sign the arras contract. The buyer pays a deposit, usually 10%, securing the deal.
  5. Sign the deed (escritura pública) at the notary. The buyer withholds the 3%, pays you the balance, and you hand over the keys.
  6. The buyer files form 211 within one month and pays the 3% to the tax agency.
  7. You file form 210 (IRNR) within three months to settle or reclaim capital gains tax.
  8. Pay the plusvalía municipal within 30 working days.

The whole process, from listing to notary, typically takes two to four months in a healthy market.

How to Keep More of Your Gain (And Avoid the Classic Traps)

Selling smart is about preparation, not luck. A few moves protect your money.

  • Document everything you spent. Purchase costs, notary fees, and renovation invoices all shrink your taxable gain. No invoice means no deduction.
  • Appoint a fiscal representative. A local lawyer or gestor files your forms correctly and chases your refund.
  • Time your sale. Capital gains tax is unavoidable, but the plusvalía depends on years of ownership and cadastral revisions.
  • Confirm the buyer pays the 3% on time. If they fail to file form 211, the tax agency can place a lien on the property, complicating your refund.
  • Avoid undeclaring the price. Underdeclaration is illegal, increasingly detected, and exposes you to penalties plus a higher future gain for the next owner.

Foreign sellers also lose money by going it alone on negotiations and legal review. Our analysis of the most common real estate mistakes foreigners make in Spain is worth a read before you commit.

If you would rather hand the entire process to a team on the ground, our Madrid selling service handles valuation, marketing, legal coordination and the tax paperwork from start to finish.

Thinking of reinvesting your proceeds rather than leaving Spain? The investing in Spanish real estate guide covers yields and strategy, and you may find better value in rising areas like Tetuán or Arganzuela.

Ready to sell your Madrid apartment without the tax headaches? Contact our team for a free first call. We handle the valuation, the paperwork and every tax form, so you walk away with the maximum from your sale.

Frequently asked questions

Do I always have to pay the 3% retention when selling as a non-resident?
Yes. If you are tax resident outside Spain, the buyer is legally obliged to withhold 3% of the sale price and pay it to the Agencia Tributaria. It is an advance on your capital gains tax, not an extra charge, and you can reclaim it if your actual tax is lower.
How long does it take to get the 3% refund back?
Once the buyer files form 211 and you submit form 210 claiming the refund, the Spanish treasury usually processes it within several months, often six months or more. Filing accurately and appointing a fiscal representative speeds things up considerably.
What capital gains tax rate applies to a French non-resident in 2026?
As an EU resident, a French seller pays a flat 19% on the net taxable gain, with the right to deduct acquisition costs, selling costs and documented renovation. Non-EU residents face 24% and fewer deductions.
Who pays the plusvalía municipal, the buyer or the seller?
The seller pays the plusvalía municipal in a standard sale. You can choose between the objective and real calculation methods and pick the cheaper one. If you sold at a loss, you owe nothing but must prove it with both deeds.
Can I reduce my capital gains tax with renovation costs?
Yes, provided you have proper invoices with VAT. Documented improvement works increase your acquisition value, which lowers the taxable gain. Routine maintenance does not count, only genuine improvements and renovations.
Do I need a Spanish lawyer to sell my Madrid apartment?
It is not legally mandatory, but strongly recommended for non-residents. A lawyer or gestor verifies documents, files form 210, manages the refund claim and ensures the plusvalía and 3% retention are handled correctly, avoiding costly delays.

Related articles