Skip to content

Four months and three returns

How the gain on a sale is really calculated

The taxable gain is not the difference between the two prices in the deeds. This is the full arithmetic, item by item: what adds to the purchase value, what comes off the sale value, and what you need to be able to show for each one.

Almost every argument about a sale comes down to a subtraction. The trouble is that the two terms of that subtraction are not the two prices written in the escrituras, the public deeds signed before a notary. Some things have to be added to the purchase price and others taken away from it, and what the transaction cost you has to come off the sale price. People who do the sum with the bare prices usually declare a bigger gain than they have, overpay, and never find out. People who do it the other way round, inflating the purchase value with items that do not count, get the bad news in a tax check three years later.

This guide is the complete arithmetic, item by item, with what you must be able to show for each one.

The formula, and where it comes from

The capital gain or loss on a transfer is the difference between the transfer value and the acquisition value. That is what articles 34 and 35 of the Spanish personal income tax Act (IRPF) say, and the non-resident income tax (IRNR) refers back to those same rules to work out the gain made by someone who does not live here. In other words: even though the tax you file is the non-residents' one, the gain is calculated with the IRPF rulebook.

ItemWhat goes into it
Acquisition valueThe real amount for which the property was acquired, plus investments and improvements, plus the costs and taxes inherent to the acquisition paid by the buyer, minus depreciation
Transfer valueThe real amount for which it is transferred, minus the costs and taxes inherent to the transfer borne by the seller
GainTransfer value − acquisition value

Three words in that table do all the work: inherent, borne and depreciation. Inherent means the cost is tied to the purchase or the sale, not to enjoying the property: the notary counts, the community of owners' fees do not. Borne means paid by you: the plusvalía municipal, the town hall's tax on the increase in land value, counts on your side only if you paid it yourself. And depreciation comes off the purchase value, under a rule of its own explained further down.

What adds to the acquisition value

  • The price stated in the purchase deed. If the property came to you by inheritance or gift, the acquisition value is the one declared for Inheritance and Gift Tax, capped at market value, plus the costs and taxes of that acquisition. It is not the value at which the deceased bought it.
  • The transfer tax (ITP) or the VAT on that purchase. On a new build, the VAT and the stamp duty on documented legal acts (AJD); on a resale, the property transfer tax (ITP). If the region reviewed the value at the time and you paid a supplementary assessment, that amount adds too.
  • Notary, land registry and gestoría (the administrative agency that handles the paperwork) fees for the purchase deed, with their invoices.
  • The costs of the mortgage taken out to buy, to the extent they are inherent to the acquisition. It is a disputed item and it is worth having it documented invoice by invoice.
  • Investments and improvements, which is the big item and the one most fought over. It has a guide of its own: improvement or repair, the boundary of the acquisition value.
  • The estate agent's commission if you paid it when buying, which is unusual but does happen.
What does not add, however much it looks as if it should

Community fees, the IBI (the annual municipal property tax) for all those years, the rubbish charge, insurance, loan interest, furniture, appliances, decoration and maintenance repairs are not part of the acquisition value. They are costs of holding the property, not of buying it, and there is no way of turning them into acquisition value, however respectable a figure they add up to after fifteen years.

What comes off the transfer value

  • The estate agent's commission, with an invoice showing the VAT separately.
  • The notary and gestoría fees for the sale, to the extent they are yours. It is worth knowing that the Spanish Civil Code splits those costs by default: executing the deed falls on the seller, the first and later copies on the buyer, unless the parties agree otherwise. What comes off is what you actually paid.
  • The plusvalía municipal, if you bore it. When the seller is not resident in Spain the buyer steps in as the taxpayer's substitute and pays it to the town hall, so you have to look at who really paid it and what the contract said.
  • The energy performance certificate and the certificate of habitability where it is compulsory.
  • Cancelling the mortgage at the land registry, when the sale forces you to clear it. Paying off the loan itself is not a cost; the notary, registry and gestoría fees for the registry cancellation are.

Depreciation, which comes off even if you never deducted it

If the property was let at any point, the acquisition value is reduced by the depreciation, and the law requires you to count the minimum depreciation whether or not you actually deducted it. It is not a penalty: it follows from the law presuming that the building wears out over time. A flat let for eight years reaches the sale with a tax acquisition value lower than the price paid for it, and therefore with a larger gain. It has a guide of its own, because it is the calculation that causes the most surprises: the depreciation that comes off even if you never deducted it.

A complete case, figure by figure

The figures below are an example built to show the mechanics, not a market reference.

ItemAmount (€)
Purchase price in the deed190,000
ITP and AJD on the purchase15,200
Notary, registry and gestoría on the purchase1,900
Terrace enclosure with licence and invoice (improvement)12,000
Depreciation counted for six years of letting−24,300
Acquisition value194,800
Sale price in the deed265,000
Estate agent's commission−8,470
Notary, gestoría and energy certificate−1,130
Plusvalía municipal borne by the seller−2,400
Transfer value253,000
Capital gain58,200

Look at what happened to the price difference. Between 190,000 paid and 265,000 received there are 75,000 euros. The taxable gain, though, is 58,200: the costs at either end have taken 29,100 euros off the base, the improvement another 12,000, and the depreciation for the years of letting has put 24,300 back. Without the invoices for the improvement and without the receipts for the costs, the same sale would declare a much larger gain. That is exactly where the difference between an orderly file and an improvised one is measured.

From the result to the tax due

A non-resident's gain on selling a property located in Spain is declared on Modelo 210 and taxed at the IRNR rate for capital gains, 19 %, whether the seller lives inside or outside the European Union. Applying 24 % is a frequent mistake: that is the rate for rental income of people resident outside the European Economic Area, not for the gain on a sale. On the gain in the example, mixing them up would cost almost three thousand euros too much.

The 3 % the buyer paid in with Modelo 211 is deducted from that tax. If the 3 % was more than the tax, the excess is refunded; if it was less, you pay the difference. How that is done is in how the 3 % withheld is recovered, and the full timetable in the calendar of a sale.

Four situations that change the sum

SituationWhat changes
The property was acquired before 31 December 1994The transitional regime of the IRPF Act may apply, which reduces the part of the gain generated up to January 2006, with a combined ceiling of 400,000 euros of transfer value for all assets transferred since 2015. You have to keep a running total of earlier transactions.
The property belongs to two or more ownersEach one declares their share, on their own form, with their own percentage and their own tax residence. A married couple does not file a joint return under the IRNR.
Part of the property was inherited and part was boughtThey are calculated separately, with different dates and acquisition values, and the results are then added together.
The seller is resident in the European Union or the European Economic Area and the home was their main residence in SpainThe IRNR Act provides for the exemption for reinvesting in a main residence on terms equivalent to those of the IRPF, with its own evidence requirements. It is worth looking at before signing, not after.
A loss is declared too

If the sale shows a loss there is no tax, but there is still a return to file: it is the only way to recover the 3 % the buyer paid in. Declaring a loss is not a pointless formality; it is the refund claim.

What to have gathered before calculating anything

  • The purchase deed and the sale deed, complete, with their simple copies.
  • Receipts for the taxes and costs of both transactions, invoice by invoice.
  • Invoices for building work, with the licence or declaración responsable (the responsible declaration filed with the town hall) where there was one.
  • The returns for the years the property was let, to rebuild the depreciation, and the tenancy agreements with their dates.
  • The buyer's Modelo 211, with proof of payment.
  • The latest IBI bill, which is needed for the plusvalía municipal.

With that the gain can be calculated and you know, before filing anything, whether the transaction will end in a refund or a payment. If you would like us to do it, the place to start is the property sale intake form: specific questions about your transaction, and at the end you know which forms apply to you and what it costs to have them done.

One last warning, because it is the one that has cost most money to people who arrive late: calculating the gain is not a matter of opinion. Every item you add to the acquisition value has to be shown on paper. In a limited tax check the administration does not argue about whether the work happened: it asks for the invoice. And what gets answered is what you have, not what you remember. We work with the documents that exist, we point out where the risk lies in each item, and we do not promise the outcome of a tax check that does not depend on us.

Two minutes on your i sold a property

That is all the form asks, and you get your deadlines back.

Start here
Book a callWhatsApp