Which Costs Reduce Your Capital Gains Tax When Selling in Spain? Deductible Improvements vs Repairs
Learn which costs legally reduce your capital gains tax when selling property in Spain — from acquisition fees to capital improvements — and what Hacienda will reject.

This article is general information, not legal, tax, or immigration advice. Rules and figures change — verify with an official source or a licensed professional before acting.
Which Costs Reduce Your Capital Gains Tax When Selling in Spain? Deductible Improvements vs Repairs
When you sell a property in Spain as a non-resident (or resident) owner, capital gains tax (CGT) is calculated on the difference between your acquisition value and your transfer value — not on the gross sale price. That means every euro you can legitimately add to what you paid, or subtract from what you received, directly lowers your tax bill.
The catch: Spanish tax authorities (Agencia Tributaria / Hacienda) distinguish sharply between capital improvements (deductible) and ordinary repairs and maintenance (not deductible). Getting this classification wrong — or losing the invoices — is the single most common reason foreign sellers overpay CGT in Spain.
This guide walks you through what actually reduces your taxable gain, what doesn't, and how to document it. Rules and thresholds change; always confirm current treatment with a licensed Spanish tax advisor (asesor fiscal) or gestor before filing.
How the Spanish Capital Gains Formula Works
The taxable gain is calculated as:
Transfer Value − Acquisition Value = Capital Gain
Where:
- Acquisition Value = purchase price + taxes and costs paid on the way in + capital improvements made during ownership − amortisation (if the property was rented).
- Transfer Value = sale price − taxes and costs paid on the way out.
For non-residents, the gain is generally taxed at a flat rate (currently 19% for EU/EEA residents and non-EU residents alike on property gains — confirm the current rate on the Agencia Tributaria site). Residents pay on the progressive savings income scale. The buyer of your property is also required to withhold 3% of the sale price (Modelo 211) and pay it to Hacienda on account of your CGT — you reconcile it later via Modelo 210.
Because both sides of the equation can be adjusted, both matter equally.
Deductible Costs on the Acquisition Side (What Increases Your "Cost Basis")
These are costs you paid when you bought the property, plus qualifying works during ownership. Keep the original invoices with your NIE, the property address, and IVA breakdown — Hacienda routinely rejects generic receipts.
- Transfer Tax (ITP) on resale purchases, or VAT (IVA) + Stamp Duty (AJD) on new builds.
- Notary fees for the escritura pública.
- Land Registry (Registro de la Propiedad) fees.
- Gestoría fees tied to the purchase.
- Legal fees for the abogado who handled your closing (with a proper factura showing IVA).
- Real estate agent commission, if you (as buyer) paid it directly and have an invoice — unusual in Spain, but possible.
- Plusvalía municipal, if you paid it as buyer under contract (normally seller pays).
- Capital improvements (mejoras y ampliaciones) — see below.
Deductible Costs on the Sale Side (What Reduces Your "Transfer Value")
These come off the sale price before the gain is calculated:
- Plusvalía municipal (municipal capital gains tax on land value) paid by you as seller.
- Real estate agent commission, with a proper invoice showing your name, the property, and IVA.
- Legal and gestoría fees for the sale.
- Energy Performance Certificate (Certificado de Eficiencia Energética) — mandatory to sell.
- Cédula de habitabilidad or licencia de segunda ocupación fees where required by the region.
- Cancellation of mortgage costs — notary, registry and gestoría fees to formally cancel a mortgage on the title (not the loan repayment itself).
Improvements vs Repairs: The Distinction That Costs the Most Money
This is where Hacienda pushes back hardest. The Spanish tax code (Ley del IRPF) allows you to add inversiones y mejoras (investments and improvements) to your acquisition value, but explicitly excludes gastos de conservación y reparación (maintenance and repair expenses).
What counts as a deductible improvement (mejora)
An improvement extends the useful life of the property, increases its capacity or value, or adds something that wasn't there before. Typical examples:
- Installing a swimming pool where none existed.
- Building an extension, adding a room, or enclosing a terrace (with proper planning permission).
- Installing air conditioning or central heating for the first time.
- Adding solar panels or a photovoltaic system.
- Full kitchen or bathroom renovations that replace the layout, plumbing and electrics — not just cosmetic updates.
- Structural reinforcement, damp-proofing works, or roof replacement (as opposed to patching).
- Installing an elevator in a building that lacked one.
- Aluminium or double-glazed window systems replacing single-pane originals (energy upgrades often qualify).
What Hacienda treats as non-deductible repairs (gastos de conservación)
Repairs restore the property to its previous condition. They keep it functional but don't upgrade it:
- Repainting interior or exterior walls.
- Replacing broken tiles, taps, or a boiler with an equivalent model.
- Fixing leaks, damp patches, or cracks.
- Servicing air conditioning, cleaning gutters, pest control.
- Replacing worn flooring with a similar product.
- Community fees, IBI (annual property tax), rubbish tax, utilities, insurance — none of these ever add to your cost basis on sale.
The line is not always obvious. Replacing a 20-year-old kitchen with a modern equivalent may be argued either way; a full gut renovation with new plumbing and layout is far more defensible. When in doubt, assume Hacienda will classify borderline works as repairs unless you have strong documentary evidence otherwise.
Documentation: The Rule That Actually Wins Disputes
You may have spent €40,000 on a beautiful renovation, but if you paid the builder in cash with no factura, it does not exist for tax purposes. To survive a Hacienda review, each invoice should include:
- Your full name and NIE (or the SRL/entity that owns the property).
- The property address or cadastral reference.
- The contractor's tax ID (NIF/CIF) and registered address.
- A clear description of the works — vague "reforma general" invoices are often challenged.
- IVA broken out separately.
- Proof of payment by bank transfer (cash payments over the legal cash-transaction limit are illegal and disallowed).
- Where relevant, the building permit (licencia de obras) from the town hall.
Keep everything for at least four years after filing (the general statute of limitations), and realistically longer — Hacienda can revisit older files in some circumstances.
Special Situations Foreign Sellers Should Know
- Inherited or gifted property. Your acquisition value is the value declared for Inheritance and Gift Tax (ISD) purposes, plus the ISD you actually paid and associated costs. You cannot use what the deceased originally paid.
- Pre-1994 acquisitions. Transitional reduction coefficients (coeficientes de abatimiento) may still apply up to a cumulative €400,000 transfer-value cap per taxpayer. Ask your asesor whether any of your gain qualifies.
- Rented properties. If you claimed depreciation (amortización) against rental income, that amount reduces your acquisition value on sale — increasing the gain. Non-resident landlords who filed Modelo 210 quarterly are affected here.
- Reinvestment exemption (exención por reinversión en vivienda habitual). If you are a Spanish tax resident selling your main home and reinvest the proceeds into another main home within two years, the gain can be fully or partially exempt. Non-residents from the EU/EEA may also qualify under harmonised rules — check current conditions.
- Sellers over 65. Spanish tax residents over 65 selling their habitual residence are exempt from CGT on that sale.
- The 3% withholding. If your actual CGT liability is less than the 3% withheld (or the sale was at a loss), you file Modelo 210 to reclaim the difference. Refunds typically take several months.
Common Pitfalls
- Assuming all "reforma" costs are deductible. They aren't — only genuine improvements with permits and proper invoices.
- Lost original purchase escritura or ITP receipt. Without proof of what you paid on acquisition, Hacienda uses only the escritura price — you lose all the ancillary costs.
- Cash-paid works. Undocumented spending is invisible to the tax office.
- Mixing personal and property expenses on a single invoice.
- Forgetting plusvalía municipal. It's deductible on the sale side but often overlooked.
- DIY Modelo 210 filings. The form is short but unforgiving; a small gestoría fee often saves multiples in tax.
Short FAQ
Can I deduct the mortgage interest I paid over the years? No. Financing costs during ownership are not part of your acquisition value for CGT purposes on your habitual or investment home.
Are furniture and appliances deductible? Generally no — moveable items don't form part of the property's tax basis. Fixed built-in kitchens installed as part of a documented renovation are treated differently.
Does a new pool always count as an improvement? Yes, if built with proper permits and invoiced correctly. A pool repair does not.
What if I did works without a licence? You can still try to deduct them, but expect challenge. Unpermitted works also complicate the sale itself.
Tax law, rates and thresholds in Spain change frequently. Before filing Modelo 210 or making decisions based on this guide, confirm the current rules with the Agencia Tributaria (agenciatributaria.gob.es) and a licensed Spanish asesor fiscal or abogado.
More guides in Selling Process
- Energy Certificate and Cédula de Habitabilidad: What Sellers Must Provide in Spain
- The Arras Deposit Contract Explained for Sellers: Securing the Buyer Before Completion in Spain (2026)
- Selling Your Spanish Property from Abroad in 2026: Using Power of Attorney to Close Remotely
- What Documents Do You Need to Sell a Property in Spain? The 2026 Seller's Checklist
- The Real Cost of Selling a House in Spain in 2026: Taxes, Fees and Agent Commission Breakdown
- Plusvalía Municipal When Selling in Spain: Who Pays It and the Two 2026 Calculation Methods