Blog / Article

Everything you need to know about taxes when selling your house

Taxes when selling a house

Selling a property in Spain isn't just about finding the ideal buyer, agreeing on a fair price, and signing before a notary. Behind every real estate transaction are a series of tax obligations and legal costs that it's important to know in advance to avoid unpleasant surprises. In this article, we clearly and comprehensively break down the taxes payable when selling a house, the expenses involved in selling an apartment, how they are calculated, who must pay them, and what exceptions or tax benefits are provided by current Spanish legislation.

1. What taxes are paid when selling a house?

The sale of a home generates a series of mandatory taxes, both at the state and municipal levels. In general, the seller must face two major taxes:

to) Personal Income Tax – Personal Income Tax

The sale of a property can generate a capital gain, which must be declared in the corresponding tax return. This gain is calculated by subtracting the purchase price (plus expenses and improvements) from the sale price (net of expenses).

How is capital gain calculated?

The formula is as follows:

Profit = Transfer value – Acquisition value

  • Transmission value: Selling price less associated expenses (notary, capital gains, real estate commission, etc.).
  • Acquisition value: Purchase price plus taxes paid (such as property transfer tax or VAT), notary and registry fees, and possible investments in improvements.

Tax rates applicable in 2025:

  • Up to €6,000: 19 %
  • From €6,000.01 to €50,000: 21 %
  • From €50,000.01 to €200,000: 23 %
  • More than €200,000: 27 %
  • More than €300,000: 28 % (new section added in the 2024 tax reform)

This tax must be declared on the Personal Income Tax return for the year following the sale. However, there are important exemptions, as we will see later.

b) Municipal capital gains – Tax on the Increase in Value of Urban Land (IIVTNU)

This local tax taxes the increase in the value of urban land from the moment the property is acquired until its sale. It is charged by the corresponding city council.

Who pays municipal capital gains tax?

As a general rule, the seller is the taxpayer, except in cases of inheritance or donation, where it falls on the beneficiary.

How is it calculated?

Since the reform introduced by the Royal Decree-Law 26/2021, there are two calculation methods:

  • Target system: A fixed coefficient is applied to the cadastral value of the land and the number of years elapsed.
  • Real system: The difference between the sale value and the acquisition value is calculated by applying a proportion to the cadastral value.

The taxpayer may choose the most favorable method. In addition, if there was no profit, there is no obligation to pay (Constitutional Court ruling of 2021).

2. Other expenses when selling a flat

Apart from taxes, we must assume various expenses associated with the operation, which may represent a significant percentage of the sale value.

a) Notary fees

Although notary fees are usually borne by the buyer, the seller may have to pay:

  • Part of the public deed of sale, if so agreed.
  • Mortgage cancellation (if the property is mortgaged).
  • Granting of powers of attorney, in case of legal representation.

b) Registration cancellation of the mortgage

If the home was sold with a current mortgage, the seller must cancel it before the Property Registry, which implies:

  • Notarial deed of cancellation
  • Registry fees
  • Management fees

This process can cost between 600 and 1,000 euros, depending on the amount and the autonomous community.

c) Energy efficiency certificate

Since 2013, it is mandatory to provide the buyer with a energy certificate valid, issued by a qualified technician. Its cost usually ranges between 70 and 250 euros.

d) Certificate of habitability

Although it is not required in all autonomous communities, it may be necessary to formalize the sale. It is valid for 15 years and costs about 50-100 euros.

e) Real estate agency fees

In case of selling through an agency, the seller usually pays a commission on the final sale price, which in Spain is usually between 3% and 5%, plus VAT.

3. Tax Exemptions: When are sales tax exemptions?

The law provides special situations in which the seller may be totally or partially exempt from paying personal income tax or capital gains tax.

a) Exemption for reinvestment in habitual residence

If the amount obtained from the sale is reinvested in the purchase of a new one habitual residence, you can apply for exemption from personal income tax on capital gains. These requirements must be met:

  • The property sold must have been the taxpayer's habitual residence for at least three years.
  • The reinvestment must be made within a period of two years from the sale (before or after).
  • The entire amount obtained must be allocated.

b) People over 65 years old

People over 65 are exempt from paying taxes on the profit they make if they sell their primary residence, regardless of whether they reinvest.

Also, if you sell a second home and reinvest the money in a insured life annuity, up to a maximum of 240,000 euros, may also benefit from a partial exemption.

c) Sale at a loss

If the transaction generates a loss (i.e., if it is sold for less than its cost), it is not subject to personal income tax, and can also be offset against other capital gains.

4. What happens if a home is inherited or donated?

Although it is not a traditional purchase and sale, the transfer of real estate by inheritance or donation also entails certain tax obligations:

  • In the case of inheritance, the heirs must pay the Inheritance and Gift Tax and the municipal capital gains.
  • If a property is donated, the donor must declare the capital gain in the Personal Income Tax, and the recipient pays the Gift Tax.

5. What expenses are the buyer's responsibility?

Although this article focuses on taxes and fees affecting the seller, it's important to know what the buyer is responsible for, as it can influence the negotiation:

  • Purchase taxes (ITP or VAT)
  • Notary fees (unless otherwise agreed)
  • Registration in the Property Registry
  • Financing (appraisal, opening fee, management, etc.)

6. Keys to tax optimization of sales

There are several legal strategies that can help you minimize the tax burden When selling a property in Spain:

  • Accredit all the improvement costs (renovations, extensions) with bank invoices and payments, to increase the acquisition value.
  • Include all deductible expenses in the calculation of personal income tax.
  • Plan ahead reinvestment in primary residence if you wish to apply the exemption.
  • If you're selling a second home, explore options such as an annuity or planned gift.

Having the advice of a tax advisor or attorney specializing in real estate law is key to avoiding errors that could lead to penalties or unnecessary payments.

7. Selling Luxury Properties: Special Considerations

In the case of high-end properties, such as Exclusive villas, estates in premium areas or luxury apartments on the coast, the amounts at stake may involve a considerable tax burden.

In addition to standard taxes, it is worth considering aspects such as:

  • The tax residence of the buyer or seller (especially if one of the parties resides abroad).
  • The possible subjection to the Wealth Tax.
  • Regional regulations (for example, in the Balearic Islands, Catalonia, or Andalusia) that affect high-value transfers.

For this reason, it is advisable to go to agencies specialized in the premium segment of the luxury properties, which offer not only a network of reliable buyers, but also legal, tax, and technical support throughout the entire process.

8. What if taxes are not declared correctly?

The Tax Agency closely monitors real estate transactions. If errors or omissions are detected in the declaration, the seller may face:

  • Economic sanctions (from 50 % to 150 % of the tax debt)
  • Surcharges for late filing
  • Late payment interest
  • Even criminal liability in serious cases

As we can see, selling a home in Spain is not just a commercial transaction; it's also a tax transaction. Knowing the details of the taxes to pay when selling a house, that expenses when selling an apartment must be taken into account and how to properly plan each step can make the difference between a profitable sale and an expensive experience.

If you're thinking about selling your property—whether it's your primary residence, a second home, or a luxury property—learn more, seek advice, and surround yourself with professionals who will look out for your interests.

Related Tags
Related Post
Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Search
Categories
Tag
en_USEnglish
contact us

Let your consultation