Property Sale Tax Calculator Spain 2026 | dospunto5

House sale tax
calculator for Spain.

Free tool · Sellers

This house sale tax calculator works out how much money you actually keep when selling your property in Spain, after capital gains tax, municipal plusvalía tax and agency commission. Tax exemptions can reduce these to zero in certain cases. Figures updated for 2026.

I'm selling I'm buying
Calculator: tax when selling your property
Indicative estimate — not a substitute for an exact tax return or professional tax advice
Your propertyTax situationCommissionTaxesResult
Step 1 of 5
Your property

The basic details of the deal, to work out the real costs.

Transfer tax or VAT + notary + registry you paid when buying
Full renovations with an invoice (these reduce the taxable gain)

What taxes do you pay
when selling a house.

What taxes do you pay when selling a house is the first question almost everyone has when they start thinking about it. The short answer: two taxes and three costs, though not all of them apply in every case.

  • Capital gains tax on the profit. This is the big one. It taxes the difference between what you paid and what you receive, on a banded scale from 19% to 30%. It can come down to zero through reinvestment in a main home or by being over 65. If you want to work out the capital gains tax on your property sale, the calculator above estimates it using your own figures.
  • Municipal plusvalía tax (IIVTNU). Charged by the local council, it taxes the increase in the value of the land, not the property itself. Since 2021, if there's no proven real increase in value, it can come out at zero.
  • Agency commission. Not a tax, but the cost that weighs the most: anywhere from 2.5% to 6% plus VAT depending on the agency.
  • Mortgage cancellation at the land registry. Only if there's still a balance outstanding. Between €400 and €1,000 across notary, registry and paperwork.
  • Other common costs. Energy performance certificate (€100–250), habitability certificate if your region requires it, a zero-debt certificate from the homeowners' association, and, unless agreed otherwise, the notary fee for the sale deed.

One detail that surprises a lot of people: the current year's property tax (IBI) is legally owed by whoever owned the property on 1 January, although it's common practice to split it pro-rata between the parties in the deed.

Tax on selling
a property in Madrid.

When you sell a property in Madrid, the sale price isn't what you take home. The tax on selling a property in Madrid can vary a lot from case to case: it depends on the gain made, how long you owned the property, and whether any exemption applies.

There are four costs that reduce the final amount: agency commission, municipal plusvalía tax, capital gains tax on the profit, and, if it applies, mortgage cancellation at the land registry. The calculator above estimates all of them using your real figures, and works as both a tax calculator and a cost calculator for the sale.

Capital gains tax on selling a property in Madrid

Capital gains tax on selling a property in Madrid is calculated on the taxable gain — the difference between the sale price and the purchase price, after deducting purchase costs (transfer tax, notary, registry), any improvements made with an invoice, and sale costs such as agency commission, which the Spanish tax office accepts as a deductible expense. Rates run from 19% to 30% and apply in bands, not as a single percentage on the whole gain. To work out capital gains tax on a property sale you need both deeds and the invoices for any improvements to hand — without that data, any capital gains calculator gives an indicative figure at best. Two exemptions, however, can remove this tax entirely:

  • Reinvestment exemption: if the property sold was your main home and you reinvest the full amount received in another main home within the legal window of 2 years (before or after the sale), tax can come down to €0 if all requirements are met.
  • Age exemption (over 65): if you're over 65 and the property sold was your main home, the gain is exempt from tax with no need to reinvest. This exemption doesn't apply to second homes or investment properties.

Municipal plusvalía tax on selling in Madrid

Municipal plusvalía tax in Madrid (IIVTNU) is managed by the city council and taxes the increase in the value of the land from purchase to sale. Since the 2021 reform, if there's no proven real increase in value, it can be zero or very low. The exact amount depends on the cadastral value of the land (not the whole property), the years of ownership, and each council's local tax ordinance — factors that vary case by case. That's why it appears as an adjustable slider in the calculator: check the exact figure with your accountant before signing. We have a dedicated guide to municipal plusvalía tax in Madrid, with the full calculation and filing deadlines.

Agency commission on selling in Madrid

Agency commission on selling a property in Madrid ranges between 2.5% and 6% plus VAT depending on the agency. For comparison: dospunto5 charges a fixed 2.5% + VAT, seller only, versus the 5% typical of traditional agencies — under our model, the commission falls exclusively on the seller. On a €400,000 property, that difference can top €12,000. The calculator lets you compare both scenarios with your real price.

Use the calculator above to enter your sale price, purchase price and tax situation — or switch to the "I'm buying" tab to work out how much you need saved. The result shows the estimated net amount you'll receive, or the total savings you need before signing.

How we work out
the result.

There are two separate calculations and it pays not to mix them up. The first tells you how much you've gained for tax purposes; the second, how much money actually lands in your account.

First · how much you've gained for tax

Acquisition value = purchase price + purchase taxes and costs + improvements backed by an invoice
Transfer value = sale price − the costs and taxes of the sale
Taxable gain = transfer value − acquisition value

That gain is the base for capital gains tax, charged in bands from 19% to 30%. If you sell at a loss, there's no tax.

Then · how much money you keep

Sale price
− agency commission
− municipal plusvalía tax
− capital gains tax
− mortgage cancellation at the land registry, if there was a mortgage
= subtotal
− outstanding mortgage
= net you receive

The mortgage appears in the second calculation and not in the first. It's a debt owed to your bank, not a cost of the sale or a tax. That's why it reduces the money you receive without reducing the taxable gain by a single euro.

A note on the registry cancellation fees: we take them off the money you receive, because you pay them, but we don't take them off the taxable gain. They belong to the loan rather than the sale, and their deductibility isn't settled. Check with your adviser.

The questions people ask most
when selling a property.

How much money do I keep if I sell my house?

Four things come off the sale price: the agency commission (between 2.5% and 5%, plus VAT), capital gains tax on the profit (19% to 30%, in bands, and it can be zero if an exemption applies), the municipal plusvalía tax (which depends on the cadastral value of the land and how long you've owned it) and the outstanding mortgage, if there is one. On a €450,000 sale with €100,000 of mortgage outstanding, the seller usually receives around €293,000.

Is the outstanding mortgage deducted from the taxable gain?

No. The mortgage plays no part in the gain calculation, neither adding nor subtracting: borrowing money doesn't create a tax loss and repaying it doesn't either. What it does do is reduce the money you receive, because the balance is settled at the notary's office on completion day. Selling a €400,000 flat you bought for €200,000 and still owe €100,000 on does not make the gain €100,000.

What costs can I deduct when selling a property?

Two groups. From the purchase: the transfer tax or VAT you paid back then, the notary, the land registry and the paperwork agency, plus improvements backed by an invoice. From the sale: the agency commission, the municipal plusvalía tax, the energy performance certificate and any notary fees you take on. Council tax, service charges, utilities and routine maintenance don't count — painting, fixing a fault or replacing an appliance are not improvements. Everything you deduct has to be evidenced with an invoice.

How much capital gains tax do you pay on selling a house in Spain?

It isn't a single percentage on the whole gain: it applies in bands. 19% up to €6,000, 21% from €6,000 to €50,000, 23% from €50,000 to €200,000, 27% from €200,000 to €300,000 and 30% above that. On a gain of €88,400 the tax comes to around €19,200. It can be zero through reinvestment in a main home or by being 65 or over.

Is the municipal plusvalía tax always payable?

No. It's a council tax on the increase in urban land value. If there's been no increase, there may be nothing to pay, but you have to prove it. It depends on the cadastral value of the land and how long you've owned the property, so the amount has to be checked with your council: it can't be worked out from the purchase and sale prices alone.

Five worked
examples.

All with a 2.5% + VAT commission and an assumed municipal plusvalía figure. Compare the last column with the first: the taxable gain is never the money you receive.

Case Taxable gain Tax Net you receive
1 · Straightforward sale, €200,000 → €300,000€72,925€15,653€272,272
2 · With improvements, €250,000 → €400,000€88,400€19,212€364,188
3 · With €100,000 mortgage outstanding€166,387€37,149€293,488
4 · The same sale, with reinvestment€166,387€0€330,637
5 · Seller aged 65 or over€264,505€0€362,505

Case 3 · Selling with a mortgage outstanding

You bought for €250,000 and paid €15,000 in tax and costs. You sell for €450,000 and still owe €100,000. Commission 2.5% + VAT; assumed plusvalía €5,000.

The tax calculation: acquisition value €265,000, transfer value €431,387, taxable gain €166,387, tax €37,149.

The money: 450,000 − 13,613 (commission) − 5,000 (plusvalía) − 37,149 (tax) − 750 (registry cancellation) = €393,488, less the €100,000 mortgage = €293,488 you receive. Notice: the gain is €166,387 and you receive €293,488. Neither figure explains the other. The mortgage hasn't reduced the gain by a single euro; it has reduced what reaches your account by €100,000.

Case 4 · The same sale, reinvesting in another main home

Same figures, but it was your main home and you're buying another. The gain doesn't change — €166,387 — but the tax drops to €0 if the requirements are met, so you receive €330,637: €37,149 more. Because there was a mortgage on the property, the amount you'd need to reinvest for full exemption isn't the €431,387 transfer value but €331,387: the capital you owed the bank is deducted.

Case 5 · Seller aged 65 or over

You bought your main home in 1998 for €90,000, with €8,000 in costs, and sell it today for €380,000. The taxable gain is €264,505 — a high figure after nearly thirty years — but it is exempt from capital gains tax, with no need to reinvest in anything. That said, the municipal plusvalía is still payable, as is the commission. You receive €362,505.

Indicative figures using the current savings-income scale (19%, 21%, 23%, 27% and 30%). For simplicity a 2.5% + VAT commission is used and a municipal plusvalía figure is assumed in each case: the real one depends on the cadastral value of the land, the years of ownership and your council's ordinance, and cannot be worked out from the purchase and sale prices. The final tax varies with the costs you can evidence, your personal circumstances and the rest of your savings income for the year. An outstanding mortgage does not reduce the taxable gain, but it does reduce the net you receive. The calculator above works out your specific case.

Frequently asked questions about the
property sale tax calculator.

Is there a house sale capital gains tax calculator for Spain?

Yes — the tool above. Enter your sale price, purchase price and deductible costs, and it works out the taxable gain, applies the savings-income bands automatically and subtracts any outstanding mortgage to show what actually reaches your account. It also checks whether the reinvestment exemption or the over-65 exemption removes the tax entirely. Like any online capital gains calculator, treat the result as indicative: it doesn't include personal deductions or an exact municipal plusvalía figure, so confirm the final number with an accountant before filing.

What taxes do you pay when selling a property in Spain?

Two: capital gains tax on the profit, declared in the tax return for the year after the sale, and the municipal plusvalía tax the local council charges on the increase in land value. On top of that come costs that aren't taxes but reduce what you receive the same way: agency commission, mortgage cancellation at the land registry if there's still a balance, an energy performance certificate and a zero-debt certificate from the homeowners' association. Separately, if you have a mortgage, there's the outstanding debt: not a tax and not a cost, but paid to the bank on completion day.

How is the taxable gain calculated?

It isn't simply the sale price minus the purchase price. The tax office compares two values. The acquisition value is what the property actually cost you: the price you paid, plus the taxes and costs of that purchase (transfer tax or VAT, notary, land registry, paperwork), plus any improvements backed by an invoice. The transfer value is what you actually take in from the sale: the price, less the costs and taxes of the sale that you pay, such as agency commission or the municipal plusvalía. The difference between the two is the taxable gain. One important nuance: not everything you've spent on the property counts. Improvements do (extending, rewiring, a full refurbishment), but maintenance doesn't (painting, replacing appliances, fixing a fault). Council tax, service charges and utility bills don't count either. Everything you deduct has to be backed by an invoice.

How much capital gains tax do you pay on a property sale?

It isn't a single percentage: the gain is split into bands and each band is taxed at a different rate. The current scale is 19% up to €6,000, 21% from €6,000 to €50,000, 23% from €50,000 to €200,000, 27% from €200,000 to €300,000 and 30% above €300,000. On a gain of €100,000, for example, you don't pay 23% on all of it: you pay 19% on the first €6,000, 21% on the next band and 23% only on the rest. Bear in mind this scale applies to all your savings income for the year, so if you've had other gains the effective rate can be higher.

Does an outstanding mortgage reduce the taxable gain?

No. This is the most common confusion and it's worth being clear about. If you bought for €200,000, sell for €400,000 and still owe €100,000 to the bank, the gain does not become €100,000. The mortgage plays no part in that calculation, neither adding nor subtracting: borrowing money doesn't create a tax loss, and repaying it doesn't either. What the mortgage does do is reduce the money that reaches your account, because that balance is settled at the notary's office on completion day. The mortgage does have a specific effect on the reinvestment exemption, but that's a separate matter.

What's the difference between the taxable gain and the money I receive?

They're two figures that almost never match and they serve different purposes. The taxable gain is a tax concept: it exists only to work out how much capital gains tax you pay. The money you receive is what's left in your account after paying taxes, costs and clearing the mortgage. For example: on a €450,000 sale with €100,000 of mortgage outstanding, the seller receives around €293,000, while the taxable gain on that same transaction is around €166,000. Neither figure explains the other, and the gain is not what you've made in the everyday sense.

How does the reinvestment exemption work?

If the property you're selling was your main home and you put the money into buying another main home, the gain can be exempt from capital gains tax. You have two years to do it, and purchases made in the two years before the sale also count. The exemption isn't all or nothing: if you reinvest the full amount obtained, the gain is fully exempt; if you reinvest only part, the exemption is proportional to that part and the rest is taxed. And a detail almost nobody knows: if there was a mortgage on the property sold, the amount you have to reinvest is reduced by the capital you owed the bank. If you sell for €450,000 (€431,387 once commission and plusvalía are deducted) and clear €100,000 of mortgage, reinvesting €331,387 would be enough for full exemption. You have to report it in the tax return for the year of the sale, even if the purchase comes later.

Are people aged 65 or over exempt when selling their home?

They're exempt from capital gains tax on the profit, not from everything else. The distinction matters. If you're 65 or over and you sell what is or has been your main home, the gain is exempt from capital gains tax with no need to reinvest in anything. But the municipal plusvalía is still payable where it applies, as are the agency commission and the other costs of the transaction. The exemption covers the main home: it doesn't apply to a second home or an investment property, although other routes with their own requirements exist in that case.

What if I sell at a loss?

If the transfer value is lower than the acquisition value, there's no gain and no capital gains tax to pay. That loss can also be offset against other capital gains in your tax return, within the limits and time periods set by law. The municipal plusvalía is a separate tax with its own rules: if there's been no increase in land value there may be nothing to pay, but you have to prove it. Check before you complete.

Does this calculator work for an inherited property?

It works as a guide, but an inherited property has particularities worth reviewing. When you inherited, you already paid inheritance tax and, where applicable, the municipal plusvalía on the transfer on death. That's done and it isn't paid again when you sell. What changes on selling is the starting point of the calculation: your acquisition value isn't a purchase price, because you didn't buy. It's the value declared for inheritance tax, plus the taxes and costs of that acquisition. If you enter that value in the calculator instead of a purchase price, the estimate works for you.

Is the result exact?

It's an estimate, not a tax assessment. It works from the figures you enter and from reasonable assumptions, but the final amount depends on which costs you can evidence, on your personal circumstances, on the rest of your savings income for the year and on the exact plusvalía calculation in your municipality. There are also cases with their own rules that the calculator doesn't cover: properties acquired before 1995, properties that have been rented out, and sales with more than one owner. Before you complete, go over the figures with a tax adviser, and keep your deeds and invoices: without paperwork, many of these deductions can't be applied.

dospunto5 — Botón flotante del asistente