How Personal Income Tax (IRPF) Is Really Calculated When You Sell Property in Spain

Most property owners know that some tax is due, but few understand the exact taxable base or how much they will actually pay.

When clients ask how much Personal Income Tax (IRPF) they will owe upon selling a property, there is rarely a single fixed percentage. It depends on three key factors: actual capital gain (the net profit, not the total sale price), the tax bracket that gain falls into, and whether any tax exemptions apply. Let us break this down step by step.

TRADUCCIÓN (Tipo 4 | Tono a | Idioma: Inglés)

How Personal Income Tax (IRPF) Is Really Calculated When You Sell Property in Spain

Most property owners know that some tax is due, but few understand the exact taxable base or how much they will actually pay.

When clients ask how much Personal Income Tax (IRPF) they will owe upon selling a property, there is rarely a single fixed percentage. It depends on three key factors: actual capital gain (the net profit, not the total sale price), the tax bracket that gain falls into, and whether any tax exemptions apply. Let us break this down step by step.

What Is Actually Taxed

IRPF does not apply to the total sale price. It applies exclusively to the capital gain, which is the difference between the transfer value (net amount received from the sale) and the acquisition value (total original purchase cost). If you purchased a property for €150,000 and sell it for €150,000, there is no capital gain and therefore no tax due, even though money was moved between bank accounts.

How the Acquisition Value Is Calculated

The acquisition value involves more than just the purchase price listed on your title deed (escritura). You may also add:

  • Taxes and fees paid during the purchase (Property Transfer Tax / ITP or VAT / IVA, notary fees, land registry fees, administrative agency / gestoría fees, and real estate agent fees paid by you).
  • The cost of structural improvements made subsequently—excluding routine repairs. Kitchen renovations or installing a lift qualify as property improvements and increase the acquisition value. Repairing a leaking pipe or repainting a wall count as maintenance and cannot be included.

Note: All eligible expenses must be fully documented with valid invoices, deeds, and payment receipts to be tax-deductible. A higher acquisition value reduces the net capital gain reported to the tax authority (Hacienda).

How the Transfer Value Is Calculated

The transfer value is the gross sale price minus the eligible expenses incurred to complete the sale, such as:

  • Notary fees (if paid by the seller)
  • Municipal capital gains tax (plusvalía municipal)
  • Required certificates (energy performance certificate, community debt certificate, technical inspection reports, etc.)
  • Legal, accounting, and real estate agency fees

Deducting these costs reduces the overall capital gain subject to taxation.

Tax Brackets Applied to Capital Gains (2026)

Capital gains are included in the savings tax base (base del ahorro), which is taxed progressively across brackets rather than at a single flat rate:

Capital Gain BracketTax Rate
Up to €6,00019%
€6,000 to €50,00021%
€50,000 to €200,00023%
€200,000 to €300,00027%
Over €300,00030%

This operates in the same manner as progressive income tax on salaries: each bracket applies only to the portion of gain falling within that specific range. A capital gain of €40,000 is not taxed entirely at 21%; the first €6,000 is taxed at 19%, and the remaining €34,000 is taxed at 21%.

It is important to note that capital gains tax on property sales is calculated separately from general personal income tax derived from employment or business activities.

A Simple Calculation Example

Consider a property purchased for €200,000 (including original purchase costs) and sold for €260,000 (after deducting sales costs).

  • Total Capital Gain: €60,000
  • First €6,000 at 19%: €1,140
  • Next €44,000 (up to €50,000) at 21%: €9,240
  • Final €10,000 (from €50,000 to €60,000) at 23%: €2,300
  • Total Tax Payable: €12,680

On a €60,000 gain, this equates to an effective tax rate of just over 21%, rather than the top 23% bracket.

Two Main Exemptions That Can Eliminate Tax Liability

If the sold property is your main residence (vivienda habitual—defined as your continuous effective residence for at least three years, subject to specific legal exceptions), two potential exemptions can reduce this tax liability to zero:

  1. Reinvestment Exemption: Reinvesting the net sale proceeds into a new primary residence within a two-year window (before or after the sale).
  2. Senior Exemption: Sellers aged 65 or older qualify for an immediate, full exemption without any requirement to reinvest.

Neither exemption applies automatically. The sale must still be reported in your tax return (Renta), selecting the appropriate exemption code even when the final tax payable is zero.

Co-ownership Note: If two equal co-owners sell a property and only one is over 65, that owner’s 50% share of the capital gain is tax-exempt. The remaining 50% share held by the younger co-owner remains fully taxable.

Defining the Three-Year Residency Period: A Crucial Distinction

A common misconception concerns how the three-year effective residency requirement is measured. The period does not simply run from the date on the deed of purchase, nor solely from the date of local registration (empadronamiento).

Hacienda evaluates continuous, effective residency using multiple combined indicators: utility consumption (electricity, water), official tax address, official correspondence, and municipal registration. Municipal registration serves as supporting evidence rather than sole proof.

Furthermore, a second essential requirement is often overlooked: the property must be occupied as a primary residence within twelve months of purchase or completion of construction. For example, if a deed is signed in December but physical occupancy and municipal registration occur in June of the following year, that six-month window falls safely within the permitted twelve-month allowance. However, the three-year qualification period commences from the date effective residency actually begins, not the date of the purchase deed.

Consequently, two individuals who purchase a property jointly on the same day may fulfill their respective three-year requirements on different dates, depending on when each actually moved into the residence.

Evaluating the Timing Before Selling

Determining how close a property is to satisfying the three-year effective residency threshold is one of the most financial valuable analyses to perform before setting a closing date:

  • Selling before three years: The full capital gain is taxable. No main-residence reinvestment or age-based exemptions apply. On a gain of €60,000, tax liability would total €12,680.
  • Waiting to complete three years: Provided the proceeds are reinvested in a new primary residence—or if the seller is 65 or older—the tax on that same gain can be reduced to €0.

The financial difference between these scenarios is significant. If a property owner is four or five months away from completing the three-year requirement, delaying the completion date often yields a substantial net financial benefit, provided there is no urgent necessity to complete immediately.

Note: Exceptions to the strict three-year rule exist for specific life events (e.g., job relocation, separation/divorce, or disability requirements), where alternative criteria apply.

Partial Reinvestment: How Tax Is Calculated

The reinvestment exemption does not require reinvesting the total gross sale price, but rather the net proceeds: the sale price minus any outstanding mortgage balance paid off upon closing. Reinvestment must occur within two years before or after the sale.

  • Full Reinvestment (100%): Reinvesting the total net proceeds makes the entire capital gain exempt from tax.
  • Partial Reinvestment: If only a portion of the net proceeds is reinvested, the tax exemption applies proportionally using the formula: Exempt Gain = Total Capital Gain × (Amount Reinvested / Net Sale Proceeds)
Example Calculation:

Assuming a property is sold for €260,000 with a capital gain of €60,000 and an outstanding mortgage of €50,000 cleared at closing:

  • Net Proceeds Available: €210,000 (€260,000 − €50,000).
  • Full Reinvestment: Reinvesting the full €210,000 into a new primary residence results in €0 tax.
  • Partial Reinvestment: Reinvesting €150,000 of the €210,000 equals a 71.4% reinvestment ratio.
    • Exempt Portion: €42,857 (€60,000 × 71.4%)
    • Taxable Portion: €17,143
    • Tax Liability: €1,140 on the first €6,000 (19%) + €2,340 on the remaining €11,143 (21%) = ~€3,480 total tax due.

Carefully calculating these options beforehand helps determine the optimal balance between property investment and retained liquidity.

Documents to Gather Before Selling

To ensure an accurate tax calculation, gather the following in advance:

  1. Original purchase deed (escritura de compra)
  2. Proof of purchase taxes and administrative fees paid
  3. Invoices for qualifying home structural improvements
  4. Itemised estimates of sale expenses
  5. Clear documentation establishing the exact start date of continuous effective residency

Having these records allows for precise financial planning rather than rough estimation.

To review how these tax rules apply to your specific property, please feel free to contact us on +34 692 62 19 19.

2025 real estate balance
2026 mortgages
2026 real estate market forecast in Benalmadena and Costa del Sol
agente de compradores
agente de compradores
agente de propietarios
agente de vendedores
agentes inmobiliarios
agentes inmobiliarios
Ahorro energético
Ahorro energético
aislamiento ventanas

Categories

Search

Isabel Cisneros
Isabel Cisneros
Brand Ambassador
Natalí Carattoli - Hernán Bustos - Real Estate Experts
Hernan Bustos
Isabel Cisneros