My Logbook

Login | Create Account

Taxes When Selling a Property in Andalusia

Selling a property in Spain Tax

Complete guide to deductions, exemptions and net-proceeds strategy for sellers on the Costa del Sol — 2026 Edition

Sources: Spanish Tax Agency (AEAT), Junta de Andalucía, Personal Income Tax Act (Law 35/2006), Non-Resident Income Tax Act (Royal Legislative Decree 5/2004), Local Tax Regulation Act, Constitutional Court (Ruling STC 182/2021).

Disclaimer: This guide is for general information purposes only and does not replace professional tax advice. Each situation is unique and depends on residency status, the property’s history and the seller’s individual circumstances. Always consult a qualified tax adviser in Spain before making any decisions.

Selling a property in Andalusia — whether in Marbella, Málaga, Sotogrande or anywhere on the Costa del Sol — involves far more than agreeing a price with the buyer. The key question is not what price will I sell for?, but how much money will I actually keep after taxes, costs and deductions?

The difference between a seller who has planned the transaction in advance and one who has not can easily exceed €30,000 or €50,000 on a mid-to-high-value property. The tools to reduce the tax burden are entirely legal: documented expense deductions, exemptions for reinvestment in a main home, choosing the most favourable calculation method for the municipal capital gains tax, and correctly attributing all improvements made during the holding period.

This guide details every tax affecting the seller in Andalusia — the capital gains tax, the municipal capital gains tax and the 3% withholding for non-residents — with the applicable rates, available deductions, the most impactful exemptions and the practical strategies used by well-advised sellers on the Costa del Sol.

Overview — Taxes Paid by the Seller in Andalusia

The Three Seller Taxes

One aspect that frequently surprises sellers: the 3% withholding is not an additional tax but a payment on account of the IRNR. If the actual capital gain results in less tax than the withholding, the seller can claim a refund of the excess. This distinction matters for the liquidity planning of the transaction.

Summary of taxes for the seller of a property in Andalusia (2026)

Tax Who pays Calculation base Payment deadline Managed by
Capital Gains Tax (IRPF / IRNR) Always the seller (unless exempt) Difference between adjusted disposal and acquisition values Annual IRPF return (June) / Form 210 within 4 months (NR) AEAT + Regional government
Municipal Capital Gains Tax — Plusvalía (IIVTNU) The seller (unless agreed otherwise) Increase in cadastral land value since last transfer 30 days from deed signing Local council
3% Withholding (non-residents only) Buyer withholds and pays it Declared sale price 30 days from deed (paid by buyer) AEAT

How Much Do You Actually Keep After Selling?

For a realistic calculation of net proceeds, the seller must deduct from the sale price: the costs of the sale itself (agency, lawyer, notary), the municipal capital gains tax, the net capital gains tax and any outstanding mortgage balance. The combined total of these items can represent between 15% and 30% of the sale price depending on the seller’s profile, the holding period and the deductions available.

Capital Gains Tax — the Primary Tax

How It Is Calculated — the Full Formula

The taxable capital gain is the difference between the net disposal value and the net acquisition value. The aim of tax planning is to maximise the acquisition value (by adding documented costs and improvements) and minimise the disposal value (by deducting all selling costs).

Capital gains calculation formula — deductible components

Component What it includes Effect on the gain
(+) Declared sale price Amount received for the property Starting point of the disposal value
(–) Selling costs Agency commission, seller’s lawyer, notary, registry, mortgage cancellation Reduce the disposal value
(–) Municipal capital gains tax paid Amount paid to the local council Deductible from the disposal value
(=) Net disposal value Actual proceeds after costs —
(–) Original purchase price Amount paid at the time of purchase Starting point of the acquisition value
(–) Purchase costs Transfer Tax or VAT, notary, registry, buyer’s lawyer, agency at purchase Increase the acquisition value
(–) Documented improvements Structural works, extensions, renovations with receipts Increase the acquisition value
(=) Net acquisition value Actual adjusted cost of the original investment —
(=) CAPITAL GAIN Taxable difference Tax base

Worked Example — Real Impact of Deductions

Comparative example: sale with and without tax optimisation — property in Marbella

Item Without optimisation With tax optimisation
Sale price €800,000 €800,000
Less: selling costs (agency 4% + lawyer + notary) €0 (not declared) –€38,000
Less: municipal capital gains tax paid €0 (not deducted) –€8,000
Net disposal value €800,000 €754,000
Original purchase price (2012) €400,000 €400,000
Plus: 2012 purchase costs (Transfer Tax 8% + notary + lawyer) €0 (not included) +€44,000
Plus: kitchen and bathroom renovation (receipts) €0 (not declared) +€35,000
Net acquisition value €400,000 €479,000
TAXABLE CAPITAL GAIN €400,000 €275,000
Estimated tax (resident, progressive rates) ~€92,000 ~€57,500
TAX SAVING — ~€34,500

Tax Rates — Residents vs. Non-Residents

A frequently overlooked advantage of non-residents: the flat 19% rate (for EU/EEA residents) is significantly lower than the maximum marginal rate of 28% that applies to residents with large gains. On a gain of €300,000, an EU non-resident pays €57,000 versus approximately €70,000 for a resident. However, residents have access to reinvestment and age-related exemptions that are not available to non-residents.

Capital gains tax rates — Spain 2026

Gain bracket Tax resident (IRPF) Non-resident EU/EEA (IRNR) Non-resident outside EU (IRNR)
Up to €6,000 19% 19% 19%
€6,001 – €50,000 21% 19% 19%
€50,001 – €200,000 23% 19% 19%
€200,001 – €300,000 27% 19% 19%
Above €300,000 28% 19% 19%

Deductions — How to Legally Reduce the Taxable Gain

1. Deductible costs from the original purchase

All costs and taxes paid at the time of acquiring the property increase the acquisition value and therefore reduce the capital gain. Many sellers forget to include them because years or decades have passed since the purchase, but their impact can be very significant.

  • Transfer Tax paid at purchase (typically 7%–10% depending on region and year) or VAT if new-build.
  • Notary fees for the purchase deed.
  • Land Registry fees.
  • Lawyer’s or conveyancer’s fees at purchase.
  • Estate agency commission if the current seller paid one at the time as buyer.

2. Deductible costs from the current sale

  • Estate agency commission (typically 3%–6% of the sale price).
  • Seller’s lawyer’s fees.
  • Notary costs attributable to the seller.
  • Mortgage cancellation costs (conveyancer + registration fees).
  • Municipal capital gains tax paid to the local council.
  • Energy performance certificate if required for the sale.
  • Valuation costs if commissioned at the buyer’s request but borne by the seller.

3. Documented improvements — the most strategic item

Improvements made to the property during the holding period increase the acquisition value and directly reduce the capital gain. This is the item with the greatest optimisation potential, because many sellers have carried out renovations over the years without thinking to keep the invoices for tax purposes.

The key distinction between an improvement (deductible) and maintenance (not deductible): an improvement increases the value, capacity or useful life of the property; maintenance simply preserves the existing condition. The Tax Agency may challenge ambiguous items, so documentation must be precise.

Distinction between deductible improvements and non-deductible maintenance

Item Deductible as improvement? Specific examples
Structural works YES Roof structure change, floor area extension, new internal walls
Full kitchen renovation YES Complete replacement of units, worktop, appliances and plumbing
Full bathroom renovation YES Replacement of sanitaryware, tiles, pipework and furniture
Pool or garden installation YES First installation or significant extension
Energy efficiency improvements YES Solar panels, heat pump, double glazing, insulation
Air conditioning (first installation) YES New climate control system
Crack or damp repairs NO (maintenance) Localised repairs with no structural change
Painting and minor repairs NO (maintenance) Wall painting, minor plumbing repairs
Light bulb or socket replacement NO (maintenance) Replacement of worn elements
Professional cleaning and gardening NO (maintenance) Recurring maintenance services

Exemptions — situations where little or no tax is due

Exemption on Reinvestment in a Main Home

This is the most powerful exemption available to resident sellers in Spain: if you sell your main home and reinvest the entire proceeds in the purchase of another main home — or in repaying the mortgage on the new property — within two years before or after the sale, the capital gain is completely exempt from tax.

Partial reinvestment generates a proportional exemption: if you reinvest 60% of the proceeds, 60% of the gain is exempt and only the remaining 40% is taxed. The two-year deadline is strict and must be evidenced to the AEAT.

Conditions for the reinvestment in main home exemption

Requirement Detail Consequence of non-compliance
Property sold must be main home Primary residence for at least 3 years or exceptional circumstances No exemption
Reinvestment deadline 2 years before or after the sale No exemption; deadline cannot be extended
Destination of reinvestment Purchase of new main home or repayment of mortgage on it No exemption if used for another purpose
Amount reinvested Exemption is proportional to the percentage reinvested Partial exemption if reinvestment is partial
Applicable to Tax residents in Spain only Not available for non-residents
Reporting to AEAT Must be declared in the annual return even if the gain is zero Risk of later investigation

Exemption for Sellers Aged 65 and Over

If the seller is 65 or over and sells their main home, the capital gain is completely exempt with no need to reinvest. This exemption is automatic and applies to the full amount of the gain with no ceiling.

For sellers aged 65 or over who are not selling their main home but a second property or investment asset, the gain is not exempt by reason of age alone. However, there is an alternative: the gain can be exempt if the proceeds are used to purchase an annuity insurance (renta vitalicia asegurada) within six months, up to a maximum exempt gain of €240,000. This option requires specific advice to be structured correctly.

Other Situations of Exemption or Reduction

  • Dación en pago (transfer to mortgage lender): if the property is transferred to the bank in settlement of mortgage debt on a main home, the capital gain may be exempt under certain conditions established by Law 1/2013.
  • Properties acquired before 1994: assets purchased before 31 December 1994 may benefit from reduction coefficients on the gain accrued up to 20 January 2006, though the application of these coefficients has limits and requires specialist calculation.
  • Capital loss: if the net disposal value is below the net acquisition value, a capital loss arises that can be offset against other capital gains in the same year or in the following four years.

Municipal capital gains tax — the local tax many sellers underestimate

What It Is and How It Works

The Plusvalía municipal (Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana, IIVTNU) is a local tax levied on the increase in land value since the previous transfer. It is managed by the local council of the municipality where the property is located and must be settled within 30 days of the deed signing.

The Constitutional Court ruling of October 2021 (STC 182/2021) struck down the automatic calculation method that required payment even when no actual gain had been made. Since then, the tax is only payable where there has genuinely been an increase in land value. If the seller can demonstrate a sale price equal to or below the purchase price, the Plusvalía is not payable.

Calculation Methods — Choose the Most Favourable

The seller can choose the method that produces the most favourable result. In practice the local council calculates using the objective method, but the seller can opt for the real gain method if it gives a lower figure by providing the supporting documentation. The main Costa del Sol municipalities — Marbella, Estepona, Fuengirola, Benalmádena — apply different tax rates, so the specific amount varies by location.

Comparison of Plusvalía municipal calculation methods

Method How calculated When most favourable
Objective method (coefficients) Cadastral land value × coefficient based on years held (set by law) When the actual gain is large but the cadastral value is low
Real gain method Difference between purchase and sale price of land (based on cadastral land-to-total proportion) When the actual land gain is lower than that calculated by coefficients
Non-liability (loss) If total sale price is equal to or below purchase price, evidenced with documentation On sales at a loss or break-even

Typical Amount and Deductibility

In Costa del Sol municipalities, the Plusvalía on a property held for 10 to 15 years typically represents 1% to 3% of the cadastral land value — not the market price — which usually amounts to between €3,000 and €20,000 depending on the municipality and the holding period.

A point many sellers are unaware of: the amount paid as Plusvalía municipal is deductible in the IRPF or IRNR capital gains calculation. By reducing the net disposal value, the Plusvalía paid also reduces the capital gains tax base.

The 3% Withholding for Non-Residents

How the mechanism works

When the seller of a property in Spain is not a Spanish tax resident, the law requires the buyer to withhold 3% of the declared sale price and pay it to the Tax Agency within 30 days (Form 211). This amount is not received by the seller at the notarial signing — it is deducted directly from the price.

This withholding is a guarantee mechanism for the Administration — not an additional tax. Its purpose is to ensure that the IRNR on the capital gain is ultimately settled, even if the non-resident seller leaves Spain after the sale.

Possible scenarios after the 3% withholding

Scenario What happens Action for the non-resident seller
Actual gain generates more tax than the withholding Seller must pay the difference Submit Form 210 within 4 months and pay the balance
Actual gain generates exactly the same tax as the withholding Transaction settled in full Submit Form 210 within 4 months — zero balance
Actual gain generates less tax than the withholding Seller entitled to a refund Submit Form 210 within 4 months and claim the refund
Capital loss (sale below acquisition value) Seller entitled to full refund of the withholding Submit Form 210 within 4 months with documentation of the loss

Liquidity Planning for Non-Resident Sellers

The refund of excess withholding can take between 6 and 18 months, depending on the Tax Agency’s workload and whether the return is subject to review. During that time the withheld amount is unavailable to the seller.

On a property sold for €600,000, the withholding is €18,000. If the actual gain generates tax of €12,000 (IRNR at 19%), the excess of €6,000 may take up to 18 months to be refunded. This delay must be built into the financial planning of the transaction, especially if the sale proceeds are needed for an immediate reinvestment.

Practical Strategy for Sellers on the Costa del Sol

Before Putting the Property on the Market

  • Gather all invoices for renovations and improvements made during the holding period: every documented euro reduces the taxable gain.
  • Obtain evidence of all costs from the original purchase: deed, Transfer Tax settlement, notary and lawyer invoices.
  • Check the cadastral land value at the Catastro to estimate the Plusvalía municipal in advance.
  • Calculate the estimated net proceeds with a tax adviser before setting the target sale price.
  • Confirm tax residency status: the fiscal options available differ completely depending on whether you are a resident or non-resident.
  • If aged 65 or over: verify whether the age exemption applies and whether the property qualifies as a main home.
  • If planning to reinvest in another property: verify the deadlines and conditions of the reinvestment exemption to maximise the benefit.

During the transaction

  • Ensure the reservation contract and the deed correctly reflect the actual transaction price.
  • Document all selling costs: agency commission, lawyer’s fees, mortgage cancellation costs.
  • Verify the Plusvalía amount before signing and confirm the most favourable calculation method is being applied.
  • If non-resident: coordinate with your bank to ensure sufficient funds are available, bearing in mind that 3% of the price will not be received at signing.

After the Sale

  • Residents: include the capital gain in the annual IRPF return for the year in which the deed was signed.
  • Non-residents: submit Form 210 within four months of the deed to settle the IRNR and claim any excess withholding refund.
  • Keep all documentation (deeds, invoices, cost receipts) for at least four years after the sale — the general tax limitation period.
  • If you applied the reinvestment exemption: provide evidence to the AEAT that the reinvestment was completed within two years by submitting the deed of the new property.

Most Common Mistakes — and How to Avoid Them

The five mistakes that cost sellers the most

Common tax mistakes when selling in Andalusia — impact and solution

Mistake Financial impact How to avoid it
Not keeping renovation receipts Loss of deductions that can amount to thousands of euros in taxable gain Keep all improvement receipts in a dedicated folder from the start of ownership
Ignoring original purchase costs Lower acquisition base, higher taxable gain Retrieve the purchase deed and Transfer Tax settlement from the original purchase
Not claiming the 3% excess refund (NR) Unnecessary loss of liquidity for 6–18 months Submit Form 210 within 4 months of the deed
Confusing available exemptions Applying the wrong exemption or losing the right by missing deadlines Confirm with a tax adviser which exemption applies before selling
Not calculating the Plusvalía before closing Last-minute surprise affecting the net proceeds Request an estimated calculation from the local council in advance

Frequently Asked Questions

How much tax is paid when selling a property in Andalusia?

When selling a property in Andalusia, the seller primarily pays capital gains tax (IRPF for residents or IRNR for non-residents) and the Plusvalía municipal. Capital gains tax is charged at 19%–28% progressively for residents depending on the amount of the gain, or at a flat 19% for EU/EEA non-residents. The Plusvalía typically represents 1%–3% of the cadastral land value. The combined total of both taxes can range from 5% to 25% of the gross profit depending on the seller’s profile and holding period.

How is the capital gain calculated when selling a house in Spain?

The capital gain is the difference between the net disposal value (sale price less selling costs and Plusvalía) and the net acquisition value (purchase price plus purchase costs plus documented improvements). Correctly documenting all costs and investments made during the holding period can significantly reduce the taxable base. Including the original purchase costs (Transfer Tax, notary, lawyer) and receipted improvements can reduce the taxable gain by tens of thousands of euros.

What costs are deductible when selling a property in Spain?

On the sale: the estate agency commission, the seller’s lawyer’s fees, notary costs, mortgage cancellation costs and the Plusvalía paid are all deductible. On the original purchase (increasing the acquisition value): the Transfer Tax or VAT paid, notary fees, Land Registry fees and lawyer’s fees are also deductible. Additionally, all structural improvements made during the holding period and evidenced by receipts are deductible.

What is the difference between an improvement and maintenance for tax purposes in Spain?

Improvements are deductible from the capital gain; maintenance is not. An improvement increases the value, capacity or useful life of the property: full kitchen or bathroom renovation, floor area extension, pool installation, solar panels or a new climate control system. Maintenance simply preserves the existing condition: painting, localised repairs, replacement of worn elements. The distinction may be challenged by the Tax Agency, so receipts must be descriptive and issued by registered businesses.

Can I pay zero tax when selling my home in Spain?

Yes, in two specific situations. First: if you are a tax resident in Spain, sell your main home and reinvest the full amount in a new main home within two years before or after the sale, the gain is completely exempt. Partial reinvestment generates proportional exemption. Second: if you are 65 or over, a tax resident in Spain and sell your main home, the gain is exempt with no reinvestment required. In both cases it must be declared in the income tax return even if the liability is zero.

What is the 3% withholding when selling a property in Spain as a non-resident?

When a non-tax-resident sells a property in Spain, the buyer is legally required to withhold 3% of the declared sale price and pay it to the AEAT within 30 days (Form 211). The seller receives only 97% of the price at the notarial signing. This withholding is a payment on account of the IRNR: if the tax on the actual capital gain is less than the withholding, the seller can claim a refund of the excess by submitting Form 210 within four months of the deed. Refunds can take between 6 and 18 months.

How does the reinvestment in main home exemption work in Spain?

The reinvestment exemption means no capital gains tax is due if you sell your main home and reinvest the proceeds in a new main home. The deadline is two years before or after the sale date. For full exemption, the entire net proceeds must be reinvested. If only part is reinvested, the exemption is proportional. The property sold must have been your main home for at least three years (unless exceptional circumstances apply, such as a job change, marriage or separation). Only available to tax residents in Spain.

What is the Plusvalía municipal and how is it calculated?

The Plusvalía municipal (IIVTNU) is a local tax levied on the increase in land value since the last transfer. Following the 2021 Constitutional Court ruling, it is only payable where there has been a genuine gain. The seller can choose between two calculation methods: the objective method (cadastral land value multiplied by a coefficient based on years held) and the real gain method (actual difference in land value). It must be settled with the local council within 30 days of the deed. The amount paid is deductible from the IRPF/IRNR capital gain.

Do sellers aged over 65 pay capital gains tax in Spain?

If the seller is 65 or over, a tax resident in Spain and sells their main home, the capital gain is completely exempt with no ceiling. If selling a second property or investment asset (not the main home), the gain is not automatically exempt by reason of age. However, there is an additional option: the gain from the sale of any property can be exempt up to €240,000 if the entire proceeds are used within six months to purchase an annuity insurance (renta vitalicia asegurada).

Can a capital loss on a property sale be offset against other gains?

Yes. If the net disposal value is below the net acquisition value, a capital loss arises. This loss can be offset against other capital gains in the same tax year (for example, stock market profits or proceeds from other asset sales). If the net balance remains negative, the remainder can be carried forward to the following four years to offset future gains. For non-residents, a loss may entitle the seller to a full refund of the 3% withholding paid by the buyer.

How long must documentation from a property sale in Spain be kept?

Documentation related to a property sale in Spain must be kept for at least four years — the general tax limitation period. If the transaction generated a capital loss being offset in subsequent years, records must be kept until four years after the last year in which the offset was applied. Purchase and sale deeds are recommended to be kept indefinitely, as they may be needed to establish the property’s history in future transfers.

When is it more favourable to be a non-resident than a tax resident when selling in Spain?

For large capital gains, EU/EEA non-residents have an advantage: they pay a flat 19% on the entire gain, while residents pay progressively up to 28% at the highest bracket. On a gain of €400,000, an EU non-resident pays €76,000 (19%) while a resident pays approximately €92,000 (progressive rates). However, residents have access to very valuable exemptions — reinvestment and the over-65 exemption — not available to non-residents, which can completely reverse this advantage.

Mas información :

Idealista: Taxes and cost when selling a property 2026

Selling a Property Guide 

Sources

  • Spanish Tax Agency (AEAT) — aeat.es
  • Junta de Andalucía — Ministry of Finance
  • Personal Income Tax Act — Law 35/2006, Arts. 31–39 (capital gains)
  • Non-Resident Income Tax Act — Royal Legislative Decree 5/2004
  • Local Tax Regulation Act (LRHL) — Plusvalía municipal
  • Constitutional Court Ruling STC 182/2021
  • Law 1/2013 — Mortgage debtor protection (dación en pago)
  • BK Realty — internal market analysis 2026

Did you like this guide? Share!

Other Guides of interest

No recommended guides