Rental management in Madrid Request a call WhatsApp

How much does it cost to sell a flat in Madrid? Costs, taxes and what you will actually receive

2 December 2026

Fachada de un edificio residencial en Madrid con balcones de forja, piso en venta

Planning to sell a flat in Madrid? Before putting your flat on the market, it is worth doing a calculation that many owners leave until the end: how much selling will cost you and how much money you will actually keep. Between taxes, notary fees, cancelling the mortgage and agency fees, the gap between the sale price and what reaches your account can be significant.

This guide covers the usual costs and taxes when you sell a flat in Madrid, the documents you need and the points to review before setting the price.

Sell a flat in Madrid: costs and taxes

1. The taxes the seller pays

When you sell a flat in Madrid, the seller normally pays two taxes:

  • Municipal capital gains tax (plusvalía municipal). This is the tax on the increase in the value of the land. It is charged by Madrid City Council and paid by the seller within 30 working days of signing. It can be calculated using the objective method (based on the cadastral value of the land) or the real method (based on the gain shown in the deeds), and the lower of the two applies. If you sell for less than you paid, there is no tax, but you must prove it.
  • Income tax on the capital gain. You pay tax on the difference between what you get from the sale and what the property cost you. Spanish residents declare it in the following year’s income tax return (IRPF); non-residents pay non-resident income tax.

The property transfer tax on a second-hand home is paid by the buyer, not the seller.

2. How the capital gain is calculated

The gain is not simply the sale price minus the purchase price. The law allows several items to be added and deducted:

  • Sale value: the price, minus the costs you pay as the seller (agency fees, municipal capital gains tax, energy certificate).
  • Purchase value: what you paid, plus the costs and taxes of the purchase (notary, land registry, taxes) and any improvements and renovations you can prove with invoices.
  • Gain: the difference between the two. For Spanish residents it is taxed in the savings base, at rates ranging from 19% to 30% in 2026 depending on the amount.

That is why, before you sell a flat in Madrid, it is important to keep the purchase deed, renovation invoices and receipts for expenses: each one reduces the gain and, with it, the tax.

3. When the sale may be exempt from income tax

  • Reinvestment in a main home. If you sell your main home and reinvest the proceeds in another main home within two years before or after, the gain may be fully or partly exempt.
  • Over 65s. The sale of the main home of a person over 65 is exempt.
  • Selling at a loss. If you sell for less than it cost you, you pay no income tax and can offset the loss against other gains.

Every decision to sell a flat in Madrid is different and the rules change, so we recommend reviewing your situation with a tax adviser before setting the price. Tax procedures are not part of our service, but we can put you in touch with partner advisers.

4. Other selling costs

In addition to taxes, when you sell a flat in Madrid you usually cover these costs:

  • Energy performance certificate. It is mandatory to advertise and sell the property.
  • Notary. By law, the seller pays for the original deed of sale, unless otherwise agreed.
  • Cancelling the mortgage. If there is outstanding debt, it is paid off with part of the price on the day of signing. Check whether the loan has an early repayment fee and add the cost of cancelling it at the Land Registry.
  • Estate agency fees, if you instruct an agency to sell.
  • IBI and community fees. The year’s property tax (IBI) is paid by whoever owns the property on 1 January, although it is common to share it with the buyer. Community fees must be up to date before signing.

5. The documents you need

  • Title deed of the property.
  • Land Registry extract (nota simple) to check ownership and charges.
  • Energy performance certificate.
  • Latest IBI receipt.
  • Certificate from the owners’ community on the status of fees.
  • Bank certificate of the outstanding debt, if there is a mortgage.
  • Identity document and, if you are a foreign national, your NIE.

If you want to sell a flat in Madrid smoothly, gathering them in good time avoids delays between the deposit contract (arras) and signing before the notary.

6. If you live outside Spain

If you are not tax resident in Spain and decide to sell a flat in Madrid, the buyer must withhold 3% of the price and pay it to the Spanish Tax Agency on account of your tax. You will then have to declare the actual gain and, depending on the result, pay the difference or recover part of the amount withheld.

The sale can be handled almost entirely remotely: viewings and paperwork are coordinated in Madrid and the signing can be done through a power of attorney. We explain it on our page on management for non-resident owners.

7. Do the maths before setting the price

With all of the above, you can estimate what you will actually receive when you sell a flat in Madrid:

  • Sale price.
  • Minus the outstanding mortgage and the cost of cancelling it.
  • Minus municipal capital gains tax, notary, certificates and fees.
  • Minus the income tax you will have to pay, unless an exemption applies.

Doing this calculation at the start helps you set a realistic asking price and a negotiating margin you are comfortable with.

Sell or let?

If the numbers show that selling now does not pay off, letting the property can be an alternative: you keep the asset and earn income while the market evolves. Find out how much it costs to manage a rented flat in Madrid and what the service includes.

Frequently asked questions: how to sell a flat in Madrid

What taxes do I pay when selling a flat in Madrid?

Usually municipal capital gains tax and income tax on the gain. The property transfer tax is paid by the buyer.

Can I sell if the property has a mortgage?

Yes. On the day of signing, part of the price is normally used to pay off the debt, and the mortgage is then cancelled at the Land Registry.

Can I sell a flat that is let?

Yes. The lease remains in force with the new owner and the tenant may have a right of first refusal, unless they validly waived it in the contract.

Do I need to be in Spain to sell a flat in Madrid?

Not necessarily. Much of the process can be handled remotely and the signing can be done through a power of attorney.

How long does it take to sell a flat in Madrid?

It depends on the price, the area and the condition of the property. A well-presented flat at a realistic price usually gets viewings within the first few weeks, and the steps between the deposit contract and signing before the notary often take one to two months.

Tell us about your case

If you are thinking about how to sell a flat in Madrid, tell us about your situation. We will give you an initial valuation and send you a written proposal for our property marketing and sales service, with the scope and fees, before you decide.