One of the most competitive commissions in the market for all English speakers
Serene Spanish beach with calm water, steep cliffs, and vibrant greenery under clear sky

Capital Gains Tax in Spain: How Much Will You Pay When You Sell Property?

Last update: July 29, 2025

Reading time: 18.1 min

Table of contents
Share

No Time to Read It All? Here’s the Quick Summary:

Selling property in Spain triggers two capital gains taxes: the national CGT (IRPF for residents, IRNR for non-residents) and the municipal Plusvalía tax. The national tax is based on the difference between purchase and sale price, with rates from 19% to 26% for residents and 19% or 24% flat for non-residents. Plusvalía is a local tax on land value increase, with updated rules since 2022 allowing sellers to choose between two calculation methods. Non-residents are subject to a 3% withholding, which can be refunded if no gain is made. SpainEasy Support helps simulate, declare, and optimize both taxes — in English, French, or Spanish.

What Is Capital Gains Tax When Selling Property in Spain?

When you sell real estate in Spain, you may be liable to pay capital gains tax (CGT) on any profit you’ve made. This profit — known as a capital gain — is the difference between the original purchase price of the property and the price at which you sell it, adjusted for eligible expenses. Both residents and non-residents are subject to taxation, although the rules and rates differ.

However, Spain’s system is unique in that it includes two separate taxes on capital gains:

National Capital Gains Tax (IRPF / IRNR)

This is the state-level income tax applied on the actual financial gain from the sale of your property. It falls under the IRPF (Impuesto sobre la Renta de las Personas Físicas) for Spanish residents or IRNR (Impuesto sobre la Renta de No Residentes) for non-residents. The tax is paid to the Agencia Tributaria, Spain’s national tax agency.

It applies to the net gain, meaning you can deduct various costs related to the purchase and sale — such as notary fees, real estate agency commissions, or renovation work — depending on your residency status.

Municipal Capital Gains Tax (Plusvalía Municipal)

This is a local tax levied by the town hall (Ayuntamiento) based on the increase in the value of the land over time — not the building or the profit you’ve actually made. Officially known as IIVTNU (Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana), the Plusvalía applies to urban land only and is calculated using the cadastral land value and the number of years the property was owned.

You must pay Plusvalía even if you sell at a loss — unless you can prove no appreciation occurred, or request exemption under certain conditions.

Who Pays What: Residents vs Non-Residents

Source : Agencia Tributaria
Taxpayer Type National CGT (IRPF/IRNR) Plusvalía Municipal
Spanish Residents Yes (IRPF) Yes
Non-Residents (EU/EEA) Yes (IRNR, 19%) Yes
Non-Residents (Non-EU) Yes (IRNR, 24%) Yes
Taxpayer Type: Spanish Residents
National CGT: Yes (IRPF)
Plusvalía: Yes
Taxpayer Type: Non-Residents (EU/EEA)
National CGT: Yes (IRNR, 19%)
Plusvalía: Yes
Taxpayer Type: Non-Residents (Non-EU)
National CGT: Yes (IRNR, 24%)
Plusvalía: Yes

Source : Agencia Tributaria

Both taxes are typically paid by the seller, unless a different arrangement is made in the sales contract.

If you are a non-resident, a 3% withholding tax is automatically retained from the sale proceeds to cover potential capital gains liability. You’ll then need to file a tax return to claim any refund if the retention exceeds the actual tax owed.

National Capital Gains Tax (IRPF) for Property Sellers

Selling real estate in Spain often triggers a national-level capital gains tax. This tax is applied on the profit made from the sale — the difference between the sale price and the original purchase price, adjusted for eligible expenses. Depending on your tax residency, it falls under different tax regimes: IRPF for residents and IRNR for non-residents.

When and Why It Applies

IRPF (Impuesto sobre la Renta de las Personas Físicas) – For Residents

If you are fiscally resident in Spain, the gain from the sale of a property is added to your annual income tax return and taxed under the savings income bracket (renta del ahorro). You’re taxed on real profits, with the ability to deduct many related costs.

You may be exempt if:

  • The property was your primary residence, and
  • You reinvest the full amount in a new primary residence (within 2 years)

Special relief may also apply to sellers over age 65, if the home was their habitual residence.

IRNR (Impuesto sobre la Renta de No Residentes) – For Non-Residents

If you are not a Spanish tax resident, the tax is applied under IRNR rules. You are taxed only on the gain, with limited or no deductions depending on your country of tax residence.

The declaration is made via Modelo 210, and payment is required regardless of whether you reside in the EU/EEA or elsewhere.

How Gains Are Calculated

Your capital gain is calculated as:

Sale PriceAcquisition Value = Taxable Gain

Where:

  • Sale Price = Final transaction price, minus any selling costs (real estate agent commissions, legal fees, etc.)
  • Acquisition Value = Purchase price + purchase-related costs (notary, registration, taxes) + documented improvements or renovations

You cannot deduct maintenance or furnishing expenses. Only documented works that add value or extend the property’s lifespan are allowed.

Inflation Adjustment: Removed Since 2015

Prior to 2015, Spain allowed inflation-adjusted coefficients to reduce taxable gains — but this mechanism has been abolished. Now, the nominal gain is taxed, even if it spans several decades of ownership.

Tax Rates

Source : Agencia Tributaria
Taxpayer Type Tax Rate on Gain
Residents (IRPF) Progressive:
– 19% on gains up to €6,000
– 21% from €6,000 to €50,000
– 23% from €50,000 to €200,000
– 26% above €200,000
Non-Residents (IRNR) Flat 19% (EU/EEA residents)
Flat 24% (non-EU/EEA residents)
Taxpayer Type: Residents (IRPF)
Tax Rate: Progressive:
– 19% on gains up to €6,000
– 21% from €6,000 to €50,000
– 23% from €50,000 to €200,000
– 26% above €200,000
Taxpayer Type: Non-Residents (IRNR)
Tax Rate:
Flat 19% (EU/EEA residents)
Flat 24% (non-EU/EEA residents)

Source : Agencia Tributaria

Note: Tax treaties may affect this rate, but in most cases, IRNR is final.

Withholding Tax (Retención del 3%)

To ensure non-resident compliance, Spain applies a 3% withholding tax (retención) on the gross sale price of properties sold by non-residents.

  • Who applies it? The buyer is legally obliged to withhold 3% of the price and pay it directly to the Spanish Tax Office.
  • What is it? It’s an advance payment of your capital gains tax.
  • What if it’s too much? You must file Modelo 210H within 3 months after the sale to claim a refund of the difference — if your actual gain (and resulting tax) was lower than 3%.

If you make no gain (or a loss), you can recover the full 3%, but only by filing the form.

Example: Resident vs Non-Resident

Let’s illustrate with a simple scenario:

Spanish Resident

  • Bought in 2010 for €150,000
  • Sold in 2025 for €250,000
  • Renovation & purchase costs: €20,000
  • Net Gain: €250,000 – (€150,000 + €20,000) = €80,000

Capital gains tax:

  • €6,000 × 19% = €1,140
  • €44,000 × 21% = €9,240
  • €30,000 × 23% = €6,900
    Total = €17,280

EU Non-Resident

Same example:

  • Gain: €80,000
  • Flat IRNR rate: 19%
    Capital gains tax = €15,200

Non-EU Non-Resident (e.g. UK, USA)

  • Gain: €80,000

Flat IRNR rate: 24%
Capital gains tax = €19,200

Municipal Capital Gains Tax (Plusvalía Municipal)

When selling, gifting, or inheriting a property in Spain, another tax may apply in addition to the national capital gains tax: the Plusvalía Municipal, formally known as the Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana (IIVTNU). This is a local municipal tax applied on the increase in value of the urban land on which the property sits.

What It Is and When It Applies

The Plusvalía Municipal is charged by the local town hall (Ayuntamiento) and applies only to urban land — rural or rustic properties are excluded.

It is triggered when ownership of an urban property is transferred, including:

  • A sale
  • A gift (donation)
  • An inheritance

If you sell your apartment in Valencia, inherit a house in Malaga, or receive a flat as a gift in Alicante — and it sits on urban land — you’ll likely have to deal with this tax.

Two Calculation Methods (As of 2022 Reform)

Following a major reform in November 2021, Spain’s Constitutional Court ruled that the old Plusvalía system was unconstitutional. In response, new rules were introduced in 2022, giving sellers a choice between two methods of calculation — with the right to choose the most favorable one.

1. Objective Method (Traditional formula)

This method estimates the gain based on:

  • The cadastral value of the land only
  • A coefficient based on the number of years the property was held
  • A tax rate set by the municipality (capped nationally at 30%)

Formula:
Cadastral land value × official coefficient (based on holding period) × municipal tax rate

Example:
Land cadastral value: €50,000
Held for 10 years → coefficient: 0.15
Tax rate: 28%
→ Taxable base = €7,500
→ Tax owed = €7,500 × 28% = €2,100

2. Real Gain Method (Optional)

This method calculates tax based on the actual capital gain from the transaction:

Formula:
(Sale price – Purchase price) × percentage of cadastral value allocated to land

Then apply the municipal tax rate.

This method benefits sellers who made a small real profit or even a loss, especially if the land value increased only marginally.

Who Pays It?

The seller is usually responsible for paying the Plusvalía Municipal — unless agreed otherwise in the private sale contract.

Source : Agencia Tributaria
Situation Who Pays
Sale Seller (by default)
Gift (donation) Recipient (donee)
Inheritance Heir or legatee

Even if the recipient (in donation/inheritance cases) lives abroad, they are still liable for filing and paying this local tax.

Municipal Variations

Each Ayuntamiento (town hall) sets its own:

  • Tax rate (within national limits, usually up to 30%)
  • Annual coefficients (subject to a maximum scale)
  • Discounts (such as inheritance reductions or exemptions for family transfers)

For example:

  • In Valencia, rates range from 20% to 29% depending on the holding period
  • In Málaga, coefficients and reductions may be applied based on the cadastral revision and family relation of heirs

To get an exact figure:

  • Visit your local Ayuntamiento’s tax portal
  • Or ask a gestor or legal advisor to request a simulation

Example Calculation

Let’s compare two cities for the same property:

Scenario:

  • Land cadastral value: €60,000
  • Held for 12 years
  • Municipal tax rate: 27%

In Valencia

  • Coefficient (12 years): 0.13
  • Taxable base = €60,000 × 0.13 = €7,800
  • Tax = €7,800 × 27% = €2,106

In Málaga

  • Coefficient (12 years): 0.12
  • Taxable base = €60,000 × 0.12 = €7,200
  • Tax = €7,200 × 27% = €1,944

Note: if the seller proves that the real gain was €5,000, and the land value represents 60% of the total property value, they can use the real gain method:

→ Taxable base = €5,000 × 60% = €3,000
→ Tax = €3,000 × 27% = €810

This is clearly more favorable — and highlights why you should always compare both methods.

Exemptions and Reductions

Spain offers several ways to reduce or eliminate capital gains tax when selling a property — but many of these only apply to tax residents or under specific conditions (age, reinvestment, family status). If you qualify for any of the below exemptions, you can significantly reduce your overall tax burden — especially if selling a primary residence or transferring within the family.

Exemption for Selling Your Primary Residence (Residents Only)

If you are a Spanish tax resident and you’re selling your main home (vivienda habitual), the national capital gains tax (IRPF) can be fully exempt under certain conditions.

Key Requirements:

  • You must be fiscally resident in Spain
  • The property must have been your main home for at least 3 consecutive years
  • You must reinvest the sale proceeds into another primary residence, either in Spain or another EU/EEA country

If all conditions are met, you can avoid IRPF entirely on the gain.

This exemption does not apply to Plusvalía Municipal, but some town halls offer separate local reductions for primary residences.

Reinvestment Exemption for Over-60s

If you are over 65 years old, you may qualify for a full exemption from IRPF when selling your main residence — even without reinvestment.

Conditions:

  • You must be a Spanish tax resident
  • The property must be your main residence
  • You must be 65 or older at the time of sale
  • The home must not be used for rental or business purposes

This is one of the most generous exemptions available and can save tens of thousands of euros in taxes for retirees selling their home.

Note: EU/EEA citizens residing in Spain may benefit as well if they meet these criteria. However, non-residents do not qualify, even if over 65.

Family Transfers: Inheritance, Divorce, Donations

Certain transfers between close family members or due to life events may benefit from partial or full tax relief, depending on the region and circumstances.

Inheritance

  • IRPF does not apply to inheritance — but Plusvalía Municipal usually does
  • Heirs may receive reductions on the municipal tax, depending on the region, relationship, and property value

Divorce or Separation

  • No capital gains tax is due on property transfers between ex-spouses as part of a legal divorce agreement
  • Applies only if the property was previously jointly owned and allocated to one party as part of the divorce

Gifts and Donations

  • Capital gains tax does apply when donating a property
  • However, some autonomous communities offer reductions or allow family gifting with lower Plusvalía if between parents, children, or spouses

Always check regional tax rules for donations and inheritance, as benefits vary widely between regions (e.g. Andalusia vs. Catalonia).

Selling at a Loss or with Negative Capital Gains

If you sell your property for less than you paid, or if the real gain is negative after deducting costs and inflation adjustments, no national capital gains tax (IRPF) is due.

You may even be able to:

  • Declare the loss in your Spanish tax return (if resident), and
  • Offset it against other capital gains for up to 4 years

For non-residents, losses generally cannot be offset, but IRNR is still not due if there was no gain.

For Plusvalía Municipal, the same applies: if you made no real profit, you can now request exemption using the real gain method, introduced in 2022.

When and How to Pay These Taxes

Understanding when and how to declare both the national and municipal capital gains taxes is essential to avoid penalties, delays, or even complications with the property transfer. Timing and procedures differ depending on the tax type (IRPF/IRNR vs Plusvalía) and whether you’re a resident or not.

IRPF / IRNR: Declaring National Capital Gains Tax

Capital gains on the national level are declared via your Spanish income tax return. The process differs depending on whether you’re a resident or non-resident:

Spanish Tax Residents → IRPF via Modelo 100

  • Declared annually in your personal income tax return (Modelo 100)
  • The declaration is made the year after the sale
  • Tax campaign usually runs from April to June
  • Example: If you sell in 2025, the gain is declared in your 2026 tax return

You must calculate your net capital gain, include it in your overall income, and pay the tax along with your other personal income obligations.

Non-Residents → IRNR via Modelo 210

  • Declared separately using Modelo 210, the form for non-resident income tax (IRNR)
  • Must be submitted within 4 months of the sale date
  • The 3% withholding paid by the buyer can be offset against the final tax due
  • If no tax is due or the withheld amount is higher than owed, you can apply for a refund

Non-residents should file one Modelo 210 per seller and per property, and may need assistance from a fiscal representative to ensure compliance.

Plusvalía Municipal: Declaring Local Capital Gains Tax

The Plusvalía Municipal (also known as IIVTNU) must be declared and paid to the local Ayuntamiento (town hall) where the property is located.

Key Points:

  • Must be declared within 30 business days of the date of sale
    (or 6 months for inheritance, extendable to 1 year)
  • Usually the seller is responsible for filing, unless otherwise agreed in the contract
  • Payment is made via a municipal form or through an online platform (if available)
  • Supporting documents typically required:
    • Title deed of sale
    • Copy of the previous deed of purchase
    • ID or NIE of buyer and seller
    • Cadastral reference number

Risks of Late Payment:

  • Late declarations can result in interest charges, penalties, or enforcement procedures

Some municipalities may block or delay the property registration if the Plusvalía declaration is missing

Important: Even if you believe no gain was made, you must still declare and choose the calculation method that best reflects your case — otherwise the Ayuntamiento will apply the objective method by default.

What If You Make a Loss on the Sale?

Not every property sale in Spain results in a gain. If you sell at a loss, meaning the sale price is lower than your original purchase price (after adjusting for expenses), your tax obligations may change — or even disappear.

No Plusvalía Due If There’s No Real Gain (Post-2022 Reform)

Thanks to the 2022 reform of the Plusvalía Municipal law, local councils are now prohibited from charging this tax if the seller made no real profit.

This applies only if you use the “real gain” method (sale price – purchase price) and can prove that the transaction resulted in a loss.

To benefit from this exemption:

  • You must declare the sale to the Ayuntamiento
  • Choose the real gain calculation method
  • Provide supporting documents (e.g. deeds, invoices)

If you don’t actively choose the real gain method or fail to document the loss, the objective method will be applied by default — potentially resulting in tax due even if no actual profit was made.

No IRPF (or IRNR) If There’s No Net Capital Gain

If your total sale price minus all eligible deductions (purchase price, notary fees, reforms, agent commissions, etc.) results in zero or negative gain, then:

  • Spanish tax residents owe no capital gains tax under IRPF
  • Non-residents owe no IRNR on the transaction

However, non-resident sellers are still subject to the 3% withholding tax at the time of sale. To reclaim this amount, you must:

  • File Modelo 210 within 4 months
  • Demonstrate that no net gain occurred
  • Include all supporting documentation (see below)

How to Prove and Document Your Loss

To demonstrate a loss and claim a tax exemption or refund, you should prepare:

Original purchase deed (escritura de compraventa)
Current sale deed
Invoices for expenses:

  • Notary fees
  • Land registry
  • Legal or agency commissions
  • Certified renovations or improvements
    Bank transfer proofs (to validate actual amounts paid)
    Capital gains simulation (recommended by your tax advisor)

Keep in mind:

  • All figures must be officially documented
  • Any improvement costs must be demonstrably linked to the property and dated after purchase
  • Deductions and proofs are more strictly audited for non-resident refunds

How SpainEasy Support Can Help

Navigating capital gains tax in Spain — between IRPF, IRNR, and Plusvalía Municipal — can be confusing, especially for non-resident sellers. SpainEasy Support offers tailored assistance to simplify the process and optimize your tax outcome.

Capital Gains Simulation – Before You Sell

Not sure how much tax you’ll owe?

We can simulate your expected capital gains using:

  • Real sale price and purchase cost
  • Deductible expenses (agent fees, notary, improvements, etc.)
  • Latest Plusvalía coefficients for your municipality

Whether you’re a resident or not, this helps you understand the real impact of your sale — and avoid surprises at notary signing.

Help With All Filings and Declarations

We take care of the paperwork so you don’t have to. Our team:

  • Prepares and files Modelo 210 (for non-residents)
  • Calculates and files your Plusvalía Municipal declaration
  • Handles payment submissions to the Agencia Tributaria and Ayuntamiento
  • Ensures deadlines are met to avoid fines or interest

All communications are managed in English, French, or Spanish.

Legal Representation for Non-Resident Sellers

If you don’t live in Spain full-time, we can:

  • Act as your fiscal representative
  • Receive tax notices on your behalf
  • Respond to queries or audits from the tax office
  • Request refunds (e.g. 3% retention) in case of no gain

This means you can sell remotely with peace of mind, knowing all your obligations are covered.

Legal and Notarial Support During the Sale

Our expert partners assist with:

  • Reviewing your sale contract to anticipate tax impact
  • Checking seller-buyer agreements on Plusvalía payment
  • Providing guidance on reinvestment exemptions or timing strategy
  • Coordinating with your lawyer or notary

We work hand-in-hand to maximize your net proceeds and keep you fully compliant.

Selling your property in Spain?

Let us help you optimize your capital gains tax.
Contact SpainEasy Support for a personalized consultation

More In-Depth Tax Guides for Foreign Property Owners in Spain

Looking to go deeper into specific topics? Here are some of our most in-depth guides that expand on the taxes and procedures mentioned in this article:

Taxes When Purchasing Real Estate in Spain
A detailed breakdown of all upfront taxes and fees, including ITP, VAT, AJD, notary and legal costs — with examples and regional comparisons.

Non-Resident Tax (IRNR) in Spain
Whether you rent your property or not, if you’re not a Spanish tax resident, you must file IRNR. This guide covers tax rates, deadlines, and how to file Modelo 210 from abroad.

IBI: Local Property Tax in Spain
Learn how this annual municipal tax is calculated, when it’s due, and what to do if you miss the deadline. Includes typical IBI ranges in major regions.

Real Estate Taxes in Spain: What Every Foreign Buyer Should Know
Our complete overview of all real estate taxes in Spain — from purchase to resale. Ideal if you’re just getting started or want to make sure you’re compliant at every step.

FAQs

  1. Who has to pay IRNR?
    Any non-resident who owns property in Spain is required to file and pay IRNR (Impuesto sobre la Renta de No Residentes), even if the property is not rented out.
  2. What is the deadline for Modelo 210?
    For non-rented properties, the deadline is December 31 of the year following the tax year. For rented properties, filings are quarterly.
  3. Can I pay IRNR from abroad?
    Yes. You can file and pay IRNR online via the
    Agencia Tributaria portal from outside Spain using your NIE and digital certificate or Cl@ve system.
  4. Is IRNR the same as IBI?
    No. IRNR is a national income tax on property ownership for non-residents. IBI is a local annual property tax paid by all property owners (residents and non-residents).
  5. Do I need a fiscal representative?
    If you are a non-EU/EEA resident, appointing a fiscal representative is mandatory. For EU/EEA citizens, it is optional but highly recommended to avoid missed notices or deadlines.
Beny Brand
Beny Brand

Real Estate Hunter

Houses of Costa Brava
Got a question?
We're here to help!
Reviews SpainEasy Harvey Schwartz
Go to Top