The IRPF income tax to be applied on the sale of a property in Spain depends on the profit obtained.
Income tax when selling property in Spain
Income tax when selling property in Spain Freepik

When selling property in Spain, there are several taxes that have to be considered. One of these is income tax (known in Spain as IRPF), and the amount to be paid depends on how much of a profit you make when selling the property. Therefore, depending on your situation, age and the amount obtained, you will have to apply an IRPF withholding rate. This is how to calculate how much IRPF income tax is to be paid when selling property in Spain

Calculate the increase in wealth

If you sold a home in 2022, you have to declare the result in the your 2023 IRPF tax return in Spain. The first thing to do to find out the amount of income tax to be paid is to calculate the capital gain obtained in the sale. To do this, you have to subtract the purchase price of the property from the transfer value (sale price).

Transfer value

The transfer value of a property refers to the net gain you obtained from the sale of your property. This should include:

  • The sale price of the house
  • The costs associated with the transaction, e.g. notary fees
  • The taxes you had to pay for the transaction
  • Real estate commission, if any

Acquisition value

On the other hand, the acquisition value refers to the total investment made on the property, from the time you bought it until you sold it. Some of the issues to take into account are:

  • The purchase price of your home
  • Renovations, repairs, etc.
  • Expenses and taxes derived from the purchase
  • Mortgage

Example of IRPF home tax

For example, if you bought a property for 100,000 euros and you obtain 150,000 euros (having already paid the expenses derived from the operation; notary, taxes, fees, etc.), you are left with an increase in assets of 50,000 euros. On this amount you will have to apply the IRPF withholding tax, which in this case is 21%.

Calculation of IRPF for housing

If you have lost money with the operation, you will not have to apply any type of withholding. If, on the other hand, you have made a profit, you must apply one of the following IRPF income tax brackets, which depends on the amount gained:

  • Up to 6,000 euros of profit: 19%.
  • Between 6,000 and 50,000 euros: 21%.
  • Between 50,000 and 200,000 euros: 23%.
  • More than 200,000 euros: 26%

Is it compulsory to pay personal income tax on the sale of property in Spain?

As a general rule, yes, but there are cases in which it is not obligatory to apply any IRPF withholding on a home sale transaction in Spain. This is the case in the following situations:

  • Exemption from IRPF personal income tax on the sale of a primary residence for the over 65s: you do not have to declare the capital gain derived from the transfer, whether for valuable consideration or for profit, of your main residence if you are over 65 years of age or if you are a person in a situation of dependency. Therefore, you do not have to apply the IRPF.
  • There is no capital gain: if you have not made a profit on the sale of a property, you do not have to apply any type of IRPF withholding.
  • IRPF exemption for dation in payment (dación en pago): if you have had to hand over your house to the bank because you could not afford the mortgage, known as "dación en pago", you can apply an exemption in the payment of IRPF. To do so, you must prove that you do not have the solvency or other assets to pay the debt.
  • Exemption for reinvestment in your main residence: if the total gain you obtain when you sell your home is destined to the purchase of another one or the renovation of the one that is going to be your main residence, you are exempt from applying IRPF. The application of the exemption is not automatic, but you must notify your wish to take advantage of it. The reinvestment must be made within a period of no more than two years, either before or after the sale of your main residence.

Personal income tax deductions for work on a primary residence

Spanish Inland Revenue (known in Spain as Hacienda) offers income tax deductions for people who have carried out energy efficiency improvement work on their main residence or rented property. These are as follows:

Deduction of 20%

Those people who have carried out work on their main residence that represents a heating saving of 7% can apply for this deduction. You will have to prove it by presenting the energy certificate before and after the work.

40% deduction

You will be eligible for this deduction if the works you have carried out reduce the non-renewable primary energy consumption indicator by at least 30%. This is also the case if you achieve an improvement in the energy rating of the house to obtain an energy class A or B. You will have to prove this by presenting the energy certificate before and after the work.

Deduction of 60%

Those who have carried out renovation works that have meant an improvement in energy efficiency for complete buildings of predominantly residential use can benefit from this deduction. The deduction is valid for natural persons who are owners of buildings, i.e. it cannot be applied for by legal entities. In order to qualify, it must be proven that the consumption of non-renewable primary energy has been reduced by at least 30%.

What is considered to be a habitual residence?

According to the Tax Agency, in order for the home to be considered a main residence in Spain, you must reside there for a continuous period of three years. It may be considered habitual residence when, while you have not been living there for that period, circumstances occur that require a necessary change of residence.

Personal income tax reduction for rental income

If you have obtained income from the rental of a habitual residence, expenses can be deducted from the income obtained. For example, you can deduct the costs of repairs and maintenance of the property, community fees, insurance, rubbish collection and property tax, among others.