---
title: "IRPF when selling your Barcelona home in 2026 | Pedro Ochoa"
description: "Calculate the capital gain, apply the savings-tax brackets, keep eligible costs and check the reinvestment exemption when selling in Barcelona."
canonical: "https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/"
image: "https://pedroochoa.com/_astro/irpf-venta-vivienda-barcelona-2026.CksYOdas.jpg"
lang: "en"
sourcePath: "en/blog/irpf-selling-home-barcelona-reduce-tax-2026/index.html"
---

Buying Guide

# Barcelona Home-Sale IRPF: What You Pay and How to Reduce It

A practical 2026 guide for Barcelona sellers: calculate the IRPF capital gain, preserve eligible costs, understand reinvestment relief and separate IRPF from municipal tax.

[![Pedro Ochoa](https://pedroochoa.com/_astro/pedro-ochoa-hero.BBJfVWJQ_vWe13.webp)

Pedro Ochoa Director y Fundador

](https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/)

20 July 2026

15 min read

![Barcelona apartment sale papers, renovation invoices and a calculator beside a window](https://pedroochoa.com/_astro/irpf-venta-vivienda-barcelona-2026.CksYOdas_KoNEF.webp)

Photo by [OpenAI](https://openai.com/)

Selling a Barcelona apartment can produce two very different tax conversations. One is **IRPF**, Spain’s personal income tax for tax residents, where the sale may create a capital gain. The other is Barcelona’s municipal **IIVTNU**, often called _plusvalía municipal_, which has its own taxpayer, evidence and filing rules. They are not two names for the same bill.

For a Spanish tax resident, the starting point for IRPF is simple in form: compare the transfer value with the acquisition value. The difficult part is building those two figures from the deeds, taxes, invoices, sales costs and any years in which the home was rented. The [Spanish Tax Agency’s calculation guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) and [article 35 of the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) set the framework.

This is a 2026 planning guide for individual sellers who are Spanish tax residents. It explains the published savings-tax brackets, the records worth preserving, the main-home reinvestment rules and the situations that deserve a tailored calculation. It does not replace advice on your tax return: inheritance, divorce, split ownership, business use, international residence and incomplete paperwork can change the result materially.

## [The direct answer: IRPF is charged on the gain, not the full sale price](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#the-direct-answer-irpf-is-charged-on-the-gain-not-the-full-sale-price)

If you are resident for Spanish tax purposes, a gain from selling a home normally goes into the savings taxable base. It is not a flat tax on the price shown in the deed. The calculation begins with a net transfer value and a corrected acquisition value, then works through the exemptions and offsets available in the return. The [AEAT’s general transfer rules](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) and [the statutory gain-and-loss rule in the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) are the primary sources for that distinction.

For 2026 planning, this guide uses the published IRPF 2025 savings-base brackets, which are progressive:

| Slice of the savings taxable base | Rate used for that slice |
| --- | --- |
| Up to €6,000 | 19% |
| €6,000 to €50,000 | 21% |
| €50,000 to €200,000 | 23% |
| €200,000 to €300,000 | 27% |
| Above €300,000 | 30% |

The combined rates used here result from adding the [state savings-base scale in article 66.1](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66) and the [autonomous savings-base scale in article 76](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76) of the consolidated IRPF Act. The brackets apply progressively. A gain that crosses €50,000 does not make the whole gain taxable at 23%; only the portion above that threshold reaches the 23% slice.

That answer still has limits. Your final savings taxable base may include other savings income, capital losses may be relevant under the return’s offsetting rules, and an exemption can remove all or part of a qualifying home-sale gain. Treat an online estimate as a cash-planning number, not a filing result. Before you commit to an asking price, build the sale file and compare the likely net proceeds; the [Barcelona pricing guide](https://pedroochoa.com/en/blog/how-to-price-apartment-barcelona-without-losing-money-2026/) explains why price alone is a poor measure of the seller’s outcome.

Warning

This article applies the resident IRPF framework. A non-resident seller is normally within IRNR, a separate tax regime with a buyer withholding obligation discussed below.

## [Build the gain from two audited figures](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#build-the-gain-from-two-audited-figures)

For an ordinary sale for consideration, the core formula is:

**Capital gain or loss = transfer value − acquisition value**

The formula is short; the definitions are not. The transfer value begins with the actual amount received, subject to the statutory market-value rule, and is reduced by costs and taxes inherent to the transfer that the seller paid, as set out in [article 35 of Law 35/2006](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764). The acquisition value starts with the real purchase price, then adds qualifying investments or improvements and acquisition-related costs and taxes paid by the buyer, before subtracting fiscally deductible depreciation where applicable. That is the structure in [AEAT’s detailed calculation page](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) and [article 35 of Law 35/2006](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764).

In practical terms, the acquisition side may include the purchase deed price, Transfer Tax or VAT and stamp duty where paid, notary and registry costs, and documented qualifying improvements. If the property was inherited or received as a gift, special valuation rules apply; the acquisition figure is not simply the family story of what the home “was worth”. The legal source distinguishes transfers for consideration from gratuitous transfers, so inherited homes should be reconstructed from the relevant succession-tax values and documents before you rely on a tax estimate.

On the transfer side, the useful question is whether a cost or tax is inherent to the sale and actually paid by the seller. Real estate agent commission and seller-paid notarial or registry-related costs are common examples to document. Barcelona’s IIVTNU can be a separate municipal cost, but its own filing and liability rules must not be folded into an IRPF spreadsheet without evidence. The [Barcelona IIVTNU procedure](https://seuelectronica.ajuntament.barcelona.cat/APPS/portaltramits/es/ciudadano/descripcio/T08/PTCIU.html) and [AEAT’s IRPF sale calculation](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) describe different taxes with different calculations.

A mortgage balance is a frequent source of confusion. It affects the cash you take home at completion, but the IRPF gain is not automatically reduced just because loan principal must be repaid. Keep the mortgage redemption statement in the completion file for cash planning, then calculate the gain from the statutory acquisition and transfer values. The [document checklist for a Barcelona sale](https://pedroochoa.com/en/blog/documents-sell-apartment-barcelona-2026/) is a good place to assemble deeds, invoices, tax receipts and completion statements before an offer becomes binding.

## [Separate capital improvements from ordinary repairs, and keep the evidence](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#separate-capital-improvements-from-ordinary-repairs-and-keep-the-evidence)

The law allows the cost of **investments and improvements** to form part of acquisition value. That wording is narrower than “every amount spent on the apartment”. A structural refurbishment, a new bathroom that changes or upgrades the asset, a lift contribution or a capital installation may need analysis as an improvement. Routine painting, a small repair after a leak, ordinary maintenance and household replacements often have a different character. The [IRPF Act’s acquisition-value rule](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) and the [AEAT calculation manual](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) are why labels on invoices matter.

Do not try to solve this by changing an invoice description after the fact. The better approach is to preserve the original invoice, proof of payment, licenses or community resolutions where relevant, and a short file note that connects the work to the dwelling. If a project includes repair and improvement work in one contract, ask the supplier for a sensible breakdown while the records are still available. The document may prove both the amount and the nature of the expenditure.

There is a second reason to be disciplined. When the transfer includes a property with separately identifiable improvements, the statutory calculation can require the sale value to be allocated between the original asset and the improvement. That can matter for a pre-1994 asset or an ownership history with several acquisition tranches. The [AEAT’s transition-regime guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/regimen-transitorio-aplicable-ganancias-patrimoniales.html) and [article 34 of the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) explain why a single headline profit may conceal several calculations.

This is also where a sale-preparation decision can become tax-relevant. A proposed renovation may improve marketability, but that does not make every euro a capital improvement for IRPF. Use the [guide to renovations before selling](https://pedroochoa.com/en/blog/worth-renovating-before-selling-2026/) to decide whether the work makes commercial sense. Then retain the evidence needed for a tax professional to classify the cost, rather than assuming the marketing benefit proves the tax treatment.

## [Worked example: a €159,000 gain produces about €35,450 before other return items](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#worked-example-a-159000-gain-produces-about-35450-before-other-return-items)

Here is a deliberately simplified **hypothetical** calculation. Assume that, after applying the acquisition and transfer rules above, one Spanish tax resident has a net capital gain of **€159,000** from a Barcelona home sale. Assume no exemption, no other savings income or losses that affect the result, and the published bracket scale used in this guide.

| Gain slice | Calculation | Tax on the slice |
| --- | --- | --- |
| First €6,000 | €6,000 × 19% | €1,140 |
| Next €44,000 | €44,000 × 21% | €9,240 |
| Remaining €109,000 | €109,000 × 23% | €25,070 |
| **Illustrative total** |  | **€35,450** |

The arithmetic is €1,140 + €9,240 + €25,070 = €35,450. It is a tax illustration, not a valuation of a particular Barcelona property. The combined [state](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66) and [autonomous](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76) savings-base scales supply the progressive brackets, while [AEAT’s transfer-value guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) explains why the underlying gain must be built before the rates are applied.

Two checks make this example more useful. First, do not multiply €159,000 by 23%: that would ignore the lower brackets. Second, do not treat €35,450 as the cost of every €159,000 increase in sale price. An extra euro of sale price may also bring an extra real estate agent fee, a different IIVTNU result and, depending on the facts, a different amount available for reinvestment relief.

The cash-planning step is to make three columns: expected sale proceeds, transaction costs payable at completion, and estimated taxes reserved after completion. Include IRPF and IIVTNU as separate lines. The [municipal capital-gains-tax guide for Barcelona](https://pedroochoa.com/en/blog/municipal-capital-gains-tax-selling-apartment-barcelona-2026/) covers the latter; it does not calculate resident IRPF.

## [Main-home reinvestment: timing and amount decide the exemption](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#main-home-reinvestment-timing-and-amount-decide-the-exemption)

A gain from selling a qualifying main home may be exempt if the amount obtained is reinvested in the acquisition of another qualifying main home, or in the rehabilitation of the home that will become the main home. It is not an automatic exemption. The [AEAT reinvestment page](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html) states that the conditions apply to both homes and points to [article 38 of the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764).

The usual reinvestment period is no more than two years, measured from date to date. It can run after the sale, but a qualifying acquisition made in the two years before the sale can also be relevant. The money may be reinvested in one payment or progressively. Where the sale is paid in installments or on a deferred-price basis, the AEAT describes a separate timing treatment for amounts received. These are operational rules, so make a timeline from the actual deed dates and payment dates rather than writing “two years” in a note and hoping it fits later. The [official AEAT timing guidance](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html) and [the regulation cited by AEAT](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) are the references to check against the transaction.

Partial reinvestment produces a proportional result. If you reinvest less than the total amount obtained, only the corresponding proportion of the gain is excluded from tax, subject to all the conditions. That can still be valuable, but it changes the reserve you should keep for the return. The [AEAT’s explicit partial-reinvestment rule](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html) is more reliable than a rule of thumb based on sale price or mortgage balance.

Before relying on the exemption, answer four documentary questions: Did the sold dwelling qualify as your main home? Does the intended replacement qualify? What is the legally relevant amount obtained? Which dated documents prove the reinvestment? The answers may be less obvious after a move abroad, separation, rental period or delayed completion. If the reinvestment will occur after the year of sale, ensure the intention and required information are handled correctly in the corresponding return; do not wait until the replacement purchase is complete to review the reporting position.

For a step-by-step eligibility check, timeline and evidence list, use the focused guide to the [main-home reinvestment exemption for sellers in Spain](https://pedroochoa.com/en/blog/main-home-reinvestment-exemption-seller-guide-spain-2026/).

## [Age over 65 and former rental use are separate checks](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#age-over-65-and-former-rental-use-are-separate-checks)

For a seller over 65, a gain from the sale of a qualifying main home can be exempt without needing to buy another home. The AEAT also extends that main-home exemption to people in severe or major dependency, subject to the statutory conditions. For this purpose, the agency says the home can qualify if it is the main home at the sale date or had that status on any day within the two previous years. See the [AEAT’s over-65 main-home guidance](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-mayores-65-anos.html) and [article 33 of the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764).

Do not confuse that relief with the separate life-annuity rule. A person over 65 selling assets other than a qualifying main home may be able to exempt a gain by using the proceeds to establish an insured life annuity within six months, subject to detailed requirements and a total €240,000 limit per taxpayer. It is a different exemption with different evidence and product conditions. The [AEAT life-annuity guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-especifico-irpf-2025-personas-anos/rentas-que-no-se-declaran-irpf/transmision-elementos-patrimoniales-65-anos-vitalicias.html) and [the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) should be checked before signing an annuity contract on the assumption that the whole gain will disappear.

The dedicated guide to [selling a home after 65 in Spain](https://pedroochoa.com/en/blog/selling-home-over-65-spain-exemptions-mistakes-2026/) compares both routes, the evidence each one needs and the mistakes that can leave the gain taxable.

Former rental use creates a different issue: **depreciation**. The acquisition value is reduced by fiscally deductible depreciation, and the AEAT states that minimum depreciation is taken into account even if it was not actually claimed as an expense. For rented property, the agency’s manual identifies the relevant minimum rates by historic period and explains that depreciation does not apply to non-depreciable land. Read the [AEAT depreciation rule for transferred property](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) with [the statutory acquisition-value provision](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764).

That means a former landlord should reconstruct the rental years before calculating the gain. Gather filed returns, rental schedules, purchase allocation, depreciation worksheets and any change from rental to own occupation. A quick calculation that adds purchase price and improvements but ignores required depreciation can materially understate the gain. Conversely, an unlet home does not invite an invented depreciation deduction. The record needs to reflect the actual use of the asset.

## [Non-resident sellers: IRNR and the 3% withholding are not resident IRPF](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#non-resident-sellers-irnr-and-the-3-withholding-are-not-resident-irpf)

This article’s bracket calculation is for a Spanish tax resident. A seller who is not resident in Spain normally has a capital gain under **IRNR** rather than resident IRPF, as explained in [AEAT’s property-transfer guidance for non-residents](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html). One immediate completion consequence is that the buyer, whether resident or not, must generally retain and pay **3% of the agreed consideration** to the Treasury as an advance payment on the non-resident seller’s tax. The [AEAT’s IRNR property-transfer guidance](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html) and [the IRNR withholding page](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/retenciones-irnr-sin-establecimiento-permanente/retencion-adquirente-inmueble.html) set out that obligation.

The buyer uses Modelo 211 within one month from the transfer and gives the non-resident seller a copy. The withholding is an advance payment, not necessarily the final tax. The seller declares the gain under the non-resident procedure and can deduct the withholding; the AEAT says an excess can be refunded. The [AEAT’s explanation of Modelo 211 and the refund position](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html) should be part of the notary and conveyancing checklist, together with [Barcelona’s separate IIVTNU procedure](https://seuelectronica.ajuntament.barcelona.cat/APPS/portaltramits/es/ciudadano/descripcio/T08/PTCIU.html).

Residence is not a label to choose for a better rate. It is a factual tax-status question that may involve days, center of interests, treaty issues and prior-year filings. If your status changed around the sale, obtain cross-border tax advice early. It affects the completion statement, the forms, the withholding and potentially the ability to use reliefs described for IRPF residents.

## [Pre-1994 homes and IIVTNU need their own review](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#pre-1994-homes-and-iivtnu-need-their-own-review)

If you acquired the home before 31 December 1994, do not assume that the ordinary gain calculation is the end of the story. A transitional regime may reduce the portion of gain generated before 20 January 2006 for eligible non-business assets. It is subject to conditions, including a combined €400,000 transfer-value limit for assets using the regime since 1 January 2015. The [AEAT transition-regime guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/regimen-transitorio-aplicable-ganancias-patrimoniales.html) and [the consolidated IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) are the starting point for that review.

This is a review item, not a shortcut. The original acquisition date, periods of business use, prior transmissions that used the regime and improvements can all matter. Ask for the calculation before exchange or completion, when old deeds and historic values are still easier to locate. The potential benefit may justify the work; guessing from the year on a family deed does not.

Keep the municipal tax separate at the same time. Barcelona’s IIVTNU concerns the increase in value of urban land under municipal rules, whereas IRPF uses the seller’s acquisition and transfer values for a national income-tax gain. The [Barcelona City Council’s self-assessment procedure](https://seuelectronica.ajuntament.barcelona.cat/APPS/portaltramits/es/ciudadano/descripcio/T08/PTCIU.html) and [AEAT’s property-sale calculation](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) make that boundary clear.

The practical next step is a short pre-sale tax file: purchase deed, sale draft, purchase and sale costs, improvement evidence, rental depreciation record, proof of main-home use, age or dependency evidence where relevant, and prior pre-1994-regime transactions. If selling is still one option among several, read the [sell-or-rent comparison for Barcelona](https://pedroochoa.com/en/blog/sell-or-rent-apartment-barcelona-profitability-2026/) before treating a projected IRPF bill as the entire decision.

## [Frequently asked questions](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#frequently-asked-questions)

### [How much IRPF do I pay when I sell a home in Barcelona?](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#how-much-irpf-do-i-pay-when-i-sell-a-home-in-barcelona)

For a Spanish tax resident, the gain normally enters the savings taxable base. For 2026 planning, this guide uses the published IRPF 2025 rates of 19%, 21%, 23%, 27% and 30% by bracket. The bill is not a percentage of the sale price: it depends on the calculated gain, other savings income and gains or losses in the same return, and any exemption that applies. Check the [state scale in article 66.1](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66), the [autonomous scale in article 76](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76), and [AEAT’s gain-calculation guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html).

### [Can real estate agent fees and renovation invoices reduce the IRPF gain?](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#can-real-estate-agent-fees-and-renovation-invoices-reduce-the-irpf-gain)

Selling costs and taxes inherent to the transfer can reduce the transmission value when paid by the seller. Purchase costs, taxes and qualifying investments or improvements can increase acquisition value. Keep invoices and proof of payment; routine repairs are not automatically improvements and mortgage interest is excluded from acquisition costs. See [article 35 of the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) and [AEAT’s official calculation guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html).

### [Do I pay IRPF if I reinvest in another home?](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#do-i-pay-irpf-if-i-reinvest-in-another-home)

A qualifying gain on the sale of a main home can be exempt if the total amount obtained is reinvested in another main home or its qualifying rehabilitation. The usual window is two years before or after the sale. If less than the full amount is reinvested, the exemption is proportional rather than all-or-nothing. The [AEAT reinvestment guidance](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html) and [the IRPF Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) should be checked against the deed and payment dates.

### [Is the gain on my main home exempt after age 65?](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#is-the-gain-on-my-main-home-exempt-after-age-65)

A person over 65 can generally obtain an exemption for a gain on the sale of their main home without buying another home, subject to the statutory main-home conditions. A different life-annuity relief may apply to other assets when its separate six-month, product and €240,000 lifetime-limit conditions are met. Compare the [AEAT main-home rule for over-65s](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-mayores-65-anos.html) with [AEAT’s life-annuity relief guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-especifico-irpf-2025-personas-anos/rentas-que-no-se-declaran-irpf/transmision-elementos-patrimoniales-65-anos-vitalicias.html).

### [What changes if I previously rented out the Barcelona apartment?](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#what-changes-if-i-previously-rented-out-the-barcelona-apartment)

Rental use can reduce the acquisition value used in the future capital-gain calculation through fiscally deductible depreciation, including minimum depreciation where the rules require it. Reconstruct the rental years and declared depreciation before relying on a headline gain calculated from deeds and invoices alone. The [AEAT depreciation guidance](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) and [the statutory acquisition-value rule](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) explain the adjustment.

### [Is the 3% withholding for non-residents the same as IRPF?](https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/#is-the-3-withholding-for-non-residents-the-same-as-irpf)

No. A seller who is not resident in Spain normally falls under IRNR, not the resident IRPF regime described here. The buyer must generally withhold 3% of the agreed consideration through Modelo 211; it is a payment on account, and the non-resident seller declares the gain and may request a refund of any excess. Review [AEAT’s non-resident transfer guidance](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html) and [AEAT’s Modelo 211 withholding instruction](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/retenciones-irnr-sin-establecimiento-permanente/retencion-adquirente-inmueble.html).

Expert note

> The Spanish Tax Agency explains that a qualifying main-home gain is exempt in whole or in proportion to the amount reinvested, provided the statutory conditions and timing are met.

Agencia Estatal de Administración Tributaria, Official reinvestment guidance, AEAT [AEAT: Main-home sale and reinvestment exemption](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html)

## Sources

1.  [AEAT: General rules for capital gains and losses on transfers](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html) Agencia Estatal de Administración Tributaria · 2026-03-17 · Primary source
2.  [BOE: Personal Income Tax Act, Law 35/2006](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764) Boletín Oficial del Estado · consolidated text accessed 2026-07-20 · Primary source
3.  [BOE: Law 35/2006, article 66.1 — state savings-base scale](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66) Boletín Oficial del Estado · consolidated text accessed 2026-07-20 · Primary source
4.  [BOE: Law 35/2006, article 76 — autonomous savings-base scale](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76) Boletín Oficial del Estado · consolidated text accessed 2026-07-20 · Primary source
5.  [AEAT: Main-home sale and reinvestment exemption](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html) Agencia Estatal de Administración Tributaria · 2026-03-23 · Primary source
6.  [AEAT: Sale of a main home by people over 65](https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-mayores-65-anos.html) Agencia Estatal de Administración Tributaria · 2026 · Primary source
7.  [AEAT: Capital gains on real-estate transfers by non-residents](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html) Agencia Estatal de Administración Tributaria · 2026 · Primary source
8.  [AEAT: Buyer withholding on a non-resident property sale](https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/retenciones-irnr-sin-establecimiento-permanente/retencion-adquirente-inmueble.html) Agencia Estatal de Administración Tributaria · 2026 · Primary source
9.  [AEAT: Transitional regime for assets acquired before 31 December 1994](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/regimen-transitorio-aplicable-ganancias-patrimoniales.html) Agencia Estatal de Administración Tributaria · 2026 · Primary source
10.  [Barcelona City Council: IIVTNU declaration and self-assessment](https://seuelectronica.ajuntament.barcelona.cat/APPS/portaltramits/es/ciudadano/descripcio/T08/PTCIU.html) Ajuntament de Barcelona · 2026 · Primary source
11.  [AEAT: Life-annuity reinvestment by people over 65](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-especifico-irpf-2025-personas-anos/rentas-que-no-se-declaran-irpf/transmision-elementos-patrimoniales-65-anos-vitalicias.html) Agencia Estatal de Administración Tributaria · 2026 · Primary source

Tags:

Barcelona home sale IRPFSpain capital gains tax propertysell apartment Barcelona taxesmain home reinvestment Spainnon-resident property sale Spainrental depreciation capital gains

Compartir:

[](https://wa.me/?text=Barcelona%20Home-Sale%20IRPF%3A%20What%20You%20Pay%20and%20How%20to%20Reduce%20It%20https%3A%2F%2Fpedroochoa.com%2Fen%2Fblog%2Firpf-selling-home-barcelona-reduce-tax-2026%2F)[](https://twitter.com/intent/tweet?text=Barcelona%20Home-Sale%20IRPF%3A%20What%20You%20Pay%20and%20How%20to%20Reduce%20It&url=https%3A%2F%2Fpedroochoa.com%2Fen%2Fblog%2Firpf-selling-home-barcelona-reduce-tax-2026%2F)[](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fpedroochoa.com%2Fen%2Fblog%2Firpf-selling-home-barcelona-reduce-tax-2026%2F)[](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fpedroochoa.com%2Fen%2Fblog%2Firpf-selling-home-barcelona-reduce-tax-2026%2F)[](mailto:?subject=Barcelona%20Home-Sale%20IRPF%3A%20What%20You%20Pay%20and%20How%20to%20Reduce%20It&body=A%20practical%202026%20guide%20for%20Barcelona%20sellers%3A%20calculate%20the%20IRPF%20capital%20gain%2C%20preserve%20eligible%20costs%2C%20understand%20reinvestment%20relief%20and%20separate%20IRPF%20from%20municipal%20tax.%0A%0Ahttps%3A%2F%2Fpedroochoa.com%2Fen%2Fblog%2Firpf-selling-home-barcelona-reduce-tax-2026%2F)

![Pedro Ochoa](https://pedroochoa.com/_astro/pedro-ochoa-hero.BBJfVWJQ_XjIrm.webp)

[

### Pedro Ochoa

Director y Fundador

](https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/)

Fundador de Pedro Ochoa Inmobiliaria con más de 27 años de experiencia en el mercado inmobiliario de Barcelona. Experto en inversión y asesoramiento patrimonial.

[](https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/)[](mailto:info@pedroochoa.com)

## Related Articles

[

![Barcelona apartment deposit contract being reviewed with a maroon pen before signing arras](https://pedroochoa.com/_astro/contrato-arras-barcelona-que-revisar-antes-firmar.CiHMfqXN_ZDlpNY.webp)

Buying Guide

### Barcelona Deposit Contract: Key Checks

Practical checklist for Barcelona sellers and serious buyers before signing arras: deposit type, financing clause, nota simple, charges, documents, possession and special cases.

Pedro Ochoa

28 de junio de 2026

12 min lectura





](https://pedroochoa.com/en/blog/barcelona-deposit-contract-what-to-check-before-signing/)

[

![Desk with apartment sale documents, keys and checklist for selling a Barcelona flat in 2026](https://pedroochoa.com/_astro/documentos-vender-piso-barcelona-2026.DGEaYMqM_Z1D6g0r.webp)

Buying Guide

### Documents to Sell an Apartment in Barcelona in 2026: Practical Checklist

Practical guide for Barcelona sellers showing which documents block earnest money, buyer mortgage, registry checks, or notary signing.

Pedro Ochoa

14 de junio de 2026

15 min lectura





](https://pedroochoa.com/en/blog/documents-sell-apartment-barcelona-2026/)

[

![Person holding the keys to their new home in front of the entrance door](https://pedroochoa.com/_astro/guia-comprar-casa-2025.BtyE1r0O_ZyFijt.webp)

Buying Guide

### Main housing subsidies and grants for buying a home in Spain in 2026

Updated guide to public housing aids for buying your first home in Spain in 2026: ICO guarantees, the National Housing Plan, Catalonia programs, tax costs and affordability checks.

Pedro Ochoa

7 de febrero de 2026

5 min lectura





](https://pedroochoa.com/en/blog/housing-subsidies-grants-buying-home-spain-2026/)

## Can we help you find your next property?

Our team of experts in the Barcelona real estate market is ready to advise you. Find the perfect home with us.

[Contact now](https://pedroochoa.com/en/contact/) [Sell your flat with Pedro](https://pedroochoa.com/en/sell-with-pedro/) [WhatsApp](https://wa.me/34680808844)

```json
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "Barcelona Home-Sale IRPF: What You Pay and How to Reduce It",
  "description": "A practical 2026 guide for Barcelona sellers: calculate the IRPF capital gain, preserve eligible costs, understand reinvestment relief and separate IRPF from municipal tax.",
  "image": {
    "@type": "ImageObject",
    "url": "https://pedroochoa.com/_astro/irpf-venta-vivienda-barcelona-2026.CksYOdas.jpg",
    "width": 1200,
    "height": 630,
    "encodingFormat": "image/jpeg",
    "name": "Barcelona Home-Sale IRPF: What You Pay and How to Reduce It",
    "caption": "Barcelona Home-Sale IRPF: What You Pay and How to Reduce It",
    "description": "Featured image for Barcelona Home-Sale IRPF: What You Pay and How to Reduce It"
  },
  "author": {
    "@type": "Person",
    "@id": "https://pedroochoa.com/en/about/#person-pedro-ochoa",
    "name": "Pedro Ochoa",
    "url": "https://pedroochoa.com/sobre-mi/",
    "image": {
      "@type": "ImageObject",
      "url": "https://pedroochoa.com/_astro/pedro-ochoa-hero.BBJfVWJQ.jpeg",
      "width": 1143,
      "height": 1600,
      "caption": "Pedro Ochoa - Author"
    },
    "jobTitle": "Founder & Director",
    "sameAs": [
      "https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/"
    ]
  },
  "publisher": {
    "@type": "Organization",
    "@id": "https://pedroochoa.com/#organization",
    "name": "Pedro Ochoa Inmobiliaria",
    "url": "https://pedroochoa.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://pedroochoa.com/images/brand/logo-full.jpg",
      "width": 400,
      "height": 100,
      "caption": "Pedro Ochoa Inmobiliaria"
    },
    "contactPoint": {
      "@type": "ContactPoint",
      "telephone": "+34 680 808 844",
      "contactType": "customer service",
      "availableLanguage": [
        "Spanish",
        "English"
      ]
    },
    "sameAs": [
      "https://www.facebook.com/pedroochoainmobiliaria",
      "https://www.instagram.com/pedroochoa.es/?hl=es",
      "https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/"
    ]
  },
  "datePublished": "2026-07-20T10:00:00.000Z",
  "dateModified": "2026-08-25T10:00:00.000Z",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/",
    "name": "Barcelona Home-Sale IRPF: What You Pay and How to Reduce It",
    "url": "https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/",
    "description": "A practical 2026 guide for Barcelona sellers: calculate the IRPF capital gain, preserve eligible costs, understand reinvestment relief and separate IRPF from municipal tax.",
    "inLanguage": "en-US"
  },
  "keywords": "Barcelona home-sale IRPF 2026, Spain property capital gains tax, sell apartment Barcelona tax, main home reinvestment exemption Spain",
  "about": {
    "@type": "Thing",
    "name": "personal-income-tax-property-sale"
  },
  "mentions": [
    {
      "@type": "Neighborhood",
      "@id": "https://pedroochoa.com/#neighborhood-eixample",
      "name": "Eixample"
    },
    {
      "@type": "Person",
      "@id": "https://pedroochoa.com/en/about/#person-pedro-ochoa",
      "name": "Pedro Ochoa",
      "url": "https://pedroochoa.com/sobre-mi/",
      "image": "/_astro/pedro-ochoa-hero.BBJfVWJQ.jpeg",
      "sameAs": [
        "https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/"
      ],
      "jobTitle": "Founder & Director"
    },
    {
      "@type": "Service",
      "name": "property-sale-advisory"
    },
    {
      "@type": "Service",
      "name": "tax-planning"
    },
    {
      "@type": "RealEstateAgent",
      "@id": "https://pedroochoa.com/#organization",
      "name": "Pedro Ochoa Inmobiliaria",
      "sameAs": [
        "https://www.facebook.com/pedroochoainmobiliaria",
        "https://www.instagram.com/pedroochoa.es/?hl=es",
        "https://www.linkedin.com/in/pedro-ochoa-durall-venta-y-alquiler-de-inmuebles-de-lujo-en-barcelona-09213938/"
      ],
      "url": "https://pedroochoa.com",
      "telephone": "+34 680 808 844",
      "email": "info@pedroochoa.com",
      "address": {
        "@type": "PostalAddress",
        "addressLocality": "Barcelona",
        "addressRegion": "Catalonia",
        "addressCountry": "ES"
      },
      "areaServed": {
        "@type": "City",
        "name": "Barcelona"
      }
    }
  ],
  "citation": [
    {
      "@type": "CreativeWork",
      "name": "AEAT: General rules for capital gains and losses on transfers",
      "url": "https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-03-17",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "BOE: Personal Income Tax Act, Law 35/2006",
      "url": "https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764",
      "publisher": {
        "@type": "Organization",
        "name": "Boletín Oficial del Estado"
      },
      "datePublished": "2026-07-20",
      "genre": "legislation",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "BOE: Law 35/2006, article 66.1 — state savings-base scale",
      "url": "https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66",
      "publisher": {
        "@type": "Organization",
        "name": "Boletín Oficial del Estado"
      },
      "datePublished": "2026-07-20",
      "genre": "legislation",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "BOE: Law 35/2006, article 76 — autonomous savings-base scale",
      "url": "https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76",
      "publisher": {
        "@type": "Organization",
        "name": "Boletín Oficial del Estado"
      },
      "datePublished": "2026-07-20",
      "genre": "legislation",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Main-home sale and reinvestment exemption",
      "url": "https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-03-23",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Sale of a main home by people over 65",
      "url": "https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-mayores-65-anos.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Capital gains on real-estate transfers by non-residents",
      "url": "https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Buyer withholding on a non-resident property sale",
      "url": "https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/retenciones-irnr-sin-establecimiento-permanente/retencion-adquirente-inmueble.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Transitional regime for assets acquired before 31 December 1994",
      "url": "https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/regimen-transitorio-aplicable-ganancias-patrimoniales.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "Barcelona City Council: IIVTNU declaration and self-assessment",
      "url": "https://seuelectronica.ajuntament.barcelona.cat/APPS/portaltramits/es/ciudadano/descripcio/T08/PTCIU.html",
      "publisher": {
        "@type": "Organization",
        "name": "Ajuntament de Barcelona"
      },
      "datePublished": "2026-01-01",
      "genre": "official municipal guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Life-annuity reinvestment by people over 65",
      "url": "https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-especifico-irpf-2025-personas-anos/rentas-que-no-se-declaran-irpf/transmision-elementos-patrimoniales-65-anos-vitalicias.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    }
  ],
  "isBasedOn": [
    {
      "@type": "CreativeWork",
      "name": "AEAT: General rules for capital gains and losses on transfers",
      "url": "https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/reglas-generales-calculo.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-03-17",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "BOE: Personal Income Tax Act, Law 35/2006",
      "url": "https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764",
      "publisher": {
        "@type": "Organization",
        "name": "Boletín Oficial del Estado"
      },
      "datePublished": "2026-07-20",
      "genre": "legislation",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "BOE: Law 35/2006, article 66.1 — state savings-base scale",
      "url": "https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66",
      "publisher": {
        "@type": "Organization",
        "name": "Boletín Oficial del Estado"
      },
      "datePublished": "2026-07-20",
      "genre": "legislation",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "BOE: Law 35/2006, article 76 — autonomous savings-base scale",
      "url": "https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76",
      "publisher": {
        "@type": "Organization",
        "name": "Boletín Oficial del Estado"
      },
      "datePublished": "2026-07-20",
      "genre": "legislation",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Main-home sale and reinvestment exemption",
      "url": "https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-03-23",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Sale of a main home by people over 65",
      "url": "https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-mayores-65-anos.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Capital gains on real-estate transfers by non-residents",
      "url": "https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/cuestiones-especificas-sobre-tributacion-inmuebles/ganancia-patrimonial-derivada-transmision.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Buyer withholding on a non-resident property sale",
      "url": "https://sede.agenciatributaria.gob.es/Sede/no-residentes/irnr-sin-establecimiento-permanente/retenciones-irnr-sin-establecimiento-permanente/retencion-adquirente-inmueble.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Transitional regime for assets acquired before 31 December 1994",
      "url": "https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c11-ganancias-perdidas-patrimoniales/determinacion-importe-ganancias-perdidas-patrimon-generales/derivadas-transmisiones-onerosas-lucrativas/regimen-transitorio-aplicable-ganancias-patrimoniales.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "Barcelona City Council: IIVTNU declaration and self-assessment",
      "url": "https://seuelectronica.ajuntament.barcelona.cat/APPS/portaltramits/es/ciudadano/descripcio/T08/PTCIU.html",
      "publisher": {
        "@type": "Organization",
        "name": "Ajuntament de Barcelona"
      },
      "datePublished": "2026-01-01",
      "genre": "official municipal guidance",
      "isAccessibleForFree": true
    },
    {
      "@type": "CreativeWork",
      "name": "AEAT: Life-annuity reinvestment by people over 65",
      "url": "https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-especifico-irpf-2025-personas-anos/rentas-que-no-se-declaran-irpf/transmision-elementos-patrimoniales-65-anos-vitalicias.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-01-01",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    }
  ],
  "subjectOf": {
    "@type": "Quotation",
    "text": "The Spanish Tax Agency explains that a qualifying main-home gain is exempt in whole or in proportion to the amount reinvested, provided the statutory conditions and timing are met.",
    "spokenByCharacter": {
      "@type": "Person",
      "name": "Agencia Estatal de Administración Tributaria",
      "jobTitle": "Official reinvestment guidance",
      "worksFor": {
        "@type": "Organization",
        "name": "AEAT"
      }
    },
    "citation": {
      "@type": "CreativeWork",
      "name": "AEAT: Main-home sale and reinvestment exemption",
      "url": "https://sede.agenciatributaria.gob.es/Sede/vivienda-otros-inmuebles/que-ocurre-cuando-vendo-inmueble/transmision-vivienda-habitual-reinversion.html",
      "publisher": {
        "@type": "Organization",
        "name": "Agencia Estatal de Administración Tributaria"
      },
      "datePublished": "2026-03-23",
      "genre": "official tax guidance",
      "isAccessibleForFree": true
    },
    "additionalType": "paraphrase"
  }
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://pedroochoa.com/en/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Blog",
      "item": "https://pedroochoa.com/en/blog/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Barcelona Home-Sale IRPF: What You Pay and How to Reduce It",
      "item": "https://pedroochoa.com/en/blog/irpf-selling-home-barcelona-reduce-tax-2026/"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "How much IRPF do I pay when I sell a home in Barcelona?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "For a Spanish tax resident, the gain normally enters the savings taxable base. For 2026 planning, this guide uses the published IRPF 2025 rates of 19%, 21%, 23%, 27% and 30% by bracket. The bill is not a percentage of the sale price: it depends on the calculated gain, other savings income and gains or losses in the same return, and any exemption that applies."
      }
    },
    {
      "@type": "Question",
      "name": "Can real estate agent fees and renovation invoices reduce the IRPF gain?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Selling costs and taxes inherent to the transfer can reduce the transmission value when paid by the seller. Purchase costs, taxes and qualifying investments or improvements can increase acquisition value. Keep invoices and proof of payment; routine repairs are not automatically improvements and mortgage interest is excluded from acquisition costs."
      }
    },
    {
      "@type": "Question",
      "name": "Do I pay IRPF if I reinvest in another home?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A qualifying gain on the sale of a main home can be exempt if the total amount obtained is reinvested in another main home or its qualifying rehabilitation. The usual window is two years before or after the sale. If less than the full amount is reinvested, the exemption is proportional rather than all-or-nothing."
      }
    },
    {
      "@type": "Question",
      "name": "Is the gain on my main home exempt after age 65?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A person over 65 can generally obtain an exemption for a gain on the sale of their main home without buying another home, subject to the statutory main-home conditions. A different life-annuity relief may apply to other assets when its separate six-month, product and €240,000 lifetime-limit conditions are met."
      }
    },
    {
      "@type": "Question",
      "name": "What changes if I previously rented out the Barcelona apartment?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Rental use can reduce the acquisition value used in the future capital-gain calculation through fiscally deductible depreciation, including minimum depreciation where the rules require it. Reconstruct the rental years and declared depreciation before relying on a headline gain calculated from deeds and invoices alone."
      }
    },
    {
      "@type": "Question",
      "name": "Is the 3% withholding for non-residents the same as IRPF?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. A seller who is not resident in Spain normally falls under IRNR, not the resident IRPF regime described here. The buyer must generally withhold 3% of the agreed consideration through Modelo 211; it is a payment on account, and the non-resident seller declares the gain and may request a refund of any excess."
      }
    }
  ]
}
```
