Capital gains tax calculator for selling property in Spain

Work out in a minute the gain or loss on your sale or gift. Under Spanish income tax (IRPF) or non-resident income tax (IRNR). It can handle property acquired in stages through inheritances or co-ownership (several dates or percentages).

By default it applies the reduction coefficients (coeficientes de abatimiento) if the property was acquired before 31/12/1994, unless you untick the option.

Built for inheritances and acquisitions on several dates.

Fill in the three steps with your share only. If you own 50% of a flat sold for €200,000, enter €100,000.

Acquired your share on several dates, or selling more than one property? ▼

Use one block for each property and, if you acquired your share on different dates, one block for each date.

Example: 50% inherited from your father in 1985 (value: €50,000; sold for €100,000) + 50% inherited from your mother in 2010 (value: €90,000; sold for €100,000). That is two blocks, each with its own dates and amounts.

3Where you are tax resident

Look at the year of the sale. You are tax resident in Spain (art. 9 of the Spanish income tax law) if either of these applies that year:

  • You have spent more than 183 days in Spain. Sporadic absences count as days in Spain, unless you prove you are tax resident in another country.
  • The main centre or base of your business or economic interests is in Spain.

You are presumed to be resident if your spouse, not legally separated, and your dependent minor children habitually live in Spain, unless you prove otherwise. If another country also treats you as resident, the double tax treaty with that country decides.

If you are resident, leave the box unticked: you pay income tax (IRPF). If you are not, tick it: you pay non-resident income tax (IRNR).

Optional.
Optional.
Optional. Salary, pension, rent… after their reductions. It only matters if it is lower than your personal and family allowance.

How the capital gain is worked out when you sell a property

The basic sum is simple: transfer value minus acquisition value. What changes the result is what goes on each side. From the transfer value you take off the costs and taxes of the sale that you have paid yourself, such as the municipal land value tax (plusvalía municipal), the notary or the agency. To the acquisition value you add the costs and taxes from when you bought or inherited, plus improvements, and you take off depreciation.

What the reduction coefficients are and who they affect

They only affect you if you sell a property acquired before 31 December 1994. The ninth transitional provision (disposición transitoria novena, DT 9.ª) of the income tax law splits the gain in two: the part generated up to 19 January 2006, worked out by days, and the rest. The first part gets a reduction of 11.11% for each year of ownership above two, counted up to 31 December 1996 and rounded up. The second part is taxed in full.

What about the €400,000 limit?

The coefficient has a cap. You add the transfer value of the property you are selling to the value of anything you have sold since 1 January 2015 under this same regime. Sales of assets bought after 1994 do not count (binding ruling V5602-26). If the total goes over €400,000, the coefficients apply only to the proportional part of the gain that fits within that limit. The calculator does this for you if you enter what you have already sold since 2015.

How the gain is worked out if you inherited the property

Here the acquisition value changes. If you inherited, what counts is not what the house was worth when your relative died. It is the value that prevailed for inheritance tax (Impuesto sobre Sucesiones), without going above market value. To that value you add the inheritance tax you paid and the other costs of the inheritance: notary, land registry, agency and municipal land value tax (binding ruling V1604-24). The acquisition date is the date of death, not the date of the deed accepting the inheritance.

If the inheritance has not been divided yet, now is the time to think about how to do it, because the value at which you later sell depends on it. That is what I do when I design how an inheritance is divided to pay less.

How much income tax you pay when you sell a property

The gain goes into the savings tax base and is taxed in bands. The scale, which adds the state part and the regional part and has applied since 2025, is 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above that. If you also have interest, dividends or gains from other sales that year, enter them in the calculator and the gain will be taxed in the right bands. If you do not live in Spain, a flat rate of non-resident income tax applies and the buyer withholds 3% of the price.

Example: you inherited a flat in 1990 and sell it in 2026

Your mother died on 30 June 1990. The value declared for inheritance tax was €60,000 and the costs and taxes of the inheritance were €4,000. You sell on 15 September 2026 for €210,000 and pay €9,000 between the municipal land value tax and the agency.

Gross gain (201,000 − 64,000)€137,000
Part generated up to 19/01/2006 (42.97%)€58,862
Coefficient: 7 years to 1996, 5 above two55.55%, reduction of €32,698
Final gain€104,302
Tax to pay€22,869

Without the coefficient, the same sale would pay €30,390. The reduction does not touch the part generated after 2006, which is why a flat from 1990 still pays quite a lot.

Frequently asked questions

Is this calculator the one from the Spanish Tax Agency (AEAT)?

No. It is a tool of mine and gives an estimate. The final return is done in your income tax return, with all your tax data. It helps you know how much to set aside.

What costs can I take off the sale?

The ones you have paid yourself: notary and land registry, including cancelling the mortgage, the estate agent’s commission, the energy efficiency and community debt certificates, and the municipal land value tax. You must be able to prove them (binding ruling V2256-25). With several owners, each one takes off their share.

Do I pay income tax (IRPF) or non-resident income tax (IRNR) on selling my home?

It depends on where you are tax resident in the year of the sale. If you are resident in Spain, you pay IRPF, in bands from 19% to 30%. If you are not, you pay IRNR at 19%, and the buyer withholds 3% of the price as a payment on account. You are resident if you have spent more than 183 days in Spain that year, or if the main centre or base of your business or economic interests is here. I explain it in when you are tax resident in Spain.

Can I offset a loss on one property against a gain on another if I am not resident?

Not if you have no permanent establishment. Each property is taxed separately and a loss on one does not reduce a gain on another (art. 15.1 of the Spanish Non-Resident Income Tax Act). The same applies when you end a co-ownership over several properties or when you sell. I explain it in why a loss on one property cannot offset a gain on another.

Do I have to pay if I sell my main home?

Not always. The gain is excluded if you reinvest everything you receive in another main home, and in proportion if you reinvest less. It is also exempt if you are over 65 or have severe or major dependency. The calculator does not apply these exemptions.

What if we are going to divide the inherited property between siblings?

Before selling, check whether you need to sell. When one of you keeps the house and compensates the others, the usual route is dissolving co-ownership (extinción de condominio). The law does not treat the division of co-owned property as a change in your wealth, although the details depend on how the property is allocated.

What can I do if the tax office has already assessed me and I think I have paid too much?

You can ask for a rectification or appeal, above all if the acquisition value was worked out wrongly or costs or the reduction coefficient were left out. Tell me about your case

Questions about the calculation?

Tell me about your case

Si quieres que mire tu caso, escríbeme.

If you would like my help with an inheritance or with the tax on a notarial deed, get in touch. I will be glad to help.

This website uses its own cookies to work properly. It contains links to third-party websites with their own privacy policies, which you may accept or not when you visit them. By clicking Accept, you agree to the use of these technologies and the processing of your data for these purposes.
Privacy
Call WhatsApp