Municipal capital gains tax: how it is calculated, Madrid and when it is not payable

When selling a property in Spain, municipal capital gains tax - known as the Tax on the Increase in Value of Urban Land (IIVTNU) - frequently comes up in conversation. It is managed by the town hall of the municipality where the property is located. In principle, it taxes the increase in land value between acquisition and transfer, rather than the total value of the house.
This guide explains the calculation logic and common scenarios following the reform introduced by Royal Decree-Law 26/2021. It does not replace tailored tax advice: every case depends on dates, cadastral values and local municipal ordinances.
Who pays and when it is settled
In a standard sale, the taxable person is the seller (transferor). The self-assessment or tax return must be submitted to the town hall within the period stipulated by national regulations and local municipal ordinances. Delays may result in surcharges and interest.
The buyer does not replace the seller for this tax unless otherwise agreed in a private contract, which does not alter the tax liability towards the municipality if the law states otherwise. Usually, the seller covers it as part of their selling expenses.
What exactly IIVTNU taxes
The subject of the tax is urban land, even if you are transferring an apartment under a horizontal property regime. This is why the cadastral land value and the period of ownership come into play, rather than just the sale price of the entire property.
If the land has not experienced an increase in value according to legal assessment methods, the tax amount due may be zero. This is not the same as "being exempt because it is your primary residence": these are separate legal paths that must be evaluated on a case-by-case basis.
The RDL 26/2021 reform in brief
Royal Decree-Law 26/2021 made significant changes to IIVTNU to align it with situations where the actual market value had not increased, yet the objective method still generated tax liability. Since then, two methods coexist, each with its own technical rules:
- Objective method, based on the cadastral land value and coefficients that depend on the years of ownership.
- Real method, linked to the actual increase between the acquisition and transfer value of the land, subject to formal requirements and limits.
Taxpayers can choose whichever method is most favourable to them whenever regulations permit. This choice requires specific data (dates, values and transaction documentation), and it is advisable to calculate both options before submitting a self-assessment.
Comparison of legally established methods for determining the tax base
The Consolidated Text of the Local Tax Authorities Law sets out two alternative methods for calculating the tax base of this local tax.
| Legal criterion | Objective method | Real increase estimation method |
|---|---|---|
| Calculation base | Cadastral land value at the tax point date multiplied by coefficients set by local municipal ordinance. | Difference between the transfer value of the land and its acquisition value. |
| Taxpayer option | Standard application rule under the local tax system. | Applicable at the taxpayer's request when the real increase is lower than the result under the objective method. |
| Effect if no gain exists | Applies to the fixed cadastral value unless proven evidence of no increase is submitted. | If subtracting values yields a zero or negative result, non-subjection under Article 104.5 applies. |
Legal criterion
Calculation base
Objective method
Cadastral land value at the tax point date multiplied by coefficients set by local municipal ordinance.
Real increase estimation method
Difference between the transfer value of the land and its acquisition value.
Legal criterion
Taxpayer option
Objective method
Standard application rule under the local tax system.
Real increase estimation method
Applicable at the taxpayer's request when the real increase is lower than the result under the objective method.
Legal criterion
Effect if no gain exists
Objective method
Applies to the fixed cadastral value unless proven evidence of no increase is submitted.
Real increase estimation method
If subtracting values yields a zero or negative result, non-subjection under Article 104.5 applies.
Information extracted from Royal Legislative Decree 2/2004 and its amendments under Royal Decree-Law 26/2021.
Fuente: BOE: Arts. 104 y 107 del Texto Refundido de la Ley Reguladora de las Haciendas Locales
Objective method: where town halls start
In general terms, the objective method takes the cadastral land value at the relevant tax point and applies coefficients reflecting the period of ownership. The tax rate set in the local municipal ordinance (within legal limits) is then applied to that tax base.
Details typically requested by the local tax office or online portal include:
- Cadastral reference and broken-down cadastral value (land vs building).
- Date of acquisition and date of transfer.
- Transaction document (title deed or valid legal title).
Coefficients and tax rates can be updated. Do not copy a tax assessment from years ago or rely on a generic internet template.
Real method: when the market showed no capital gain on the land
The real method compares the land value at transfer with its value at acquisition, following the rules and caps set by current regulations. It can be useful if you sell for less than you paid or if the land has not actually increased in value.
Proving values requires solid documentary evidence (title deeds, recognized calculation bases). Errors in documentary proof may require you to rectify your filing or force you to be taxed under the objective method if conditions are not met.
When no tax may be payable (or when it is significantly reduced)
Common scenarios where it is wise to check with the town hall or a tax advisor before accepting an amount include:
- No increase in value according to the relevant method (objective or real).
- Transfers with specific legal treatment (inheritances, certain capital contributions, or transfers without consideration). Each has its own distinct conditions.
- Municipal tax reliefs under local ordinances (not all towns offer them, nor do they apply them in the same way).
The fact that your neighbour "paid nothing" does not mean you will be exempt: the purchase year, cadastral land value or municipality may differ.
Municipal capital gains tax and IRPF: they are not the same
IIVTNU is a local tax on land value. Personal income tax (IRPF) taxes capital gains on property sales under separate national rules. You may owe tax on one, both, or face more complex scenarios depending on values and exemptions. Confusing them when estimating your net proceed is a common mistake; we explain this in our guide on IRPF on property sales.
Municipal capital gains tax in Madrid
If the property is located within the municipality of Madrid, IIVTNU is managed by the Ayuntamiento de Madrid. National regulations establish the legal framework (liability, tax base and calculation options), while local municipal ordinances define specific tax rates, updated coefficients and channels for self-assessment or settlement.
Before estimating the tax amount for a sale in Madrid:
- Check the official tax factsheet on the Ayuntamiento de Madrid portal and its online tax office.
- Use the cadastral land value in force at the tax point date, not the total unitemised value from your IBI council tax bill.
- Determine whether the objective method or the real method is more advantageous using the details from your title deed.
- Do not rely on examples from another municipality: Alcobendas, Móstoles or Pozuelo have their own local ordinances.
The municipal webpage for the Tax on the Increase in Value of Urban Land is the starting point for deadlines, forms and documentation: IIVTNU on madrid.es.
Municipal capital gains tax on inheritances
In transfers due to death (mortis causa), the taxable person for IIVTNU is generally the acquirer (heir or beneficiary), not the deceased. The deadline and method of assessment are governed by national regulations and the ordinance of the town hall where the land is located.
Municipal capital gains tax on an inheritance is separate from Inheritance and Gift Tax. It is also distinct from the valuation used if you subsequently sell the inherited property. For property valuation in that context, see how to value an inherited property.
If the inheritance involves bare ownership or usufruct, the IIVTNU tax base is divided according to specific rules: do not assume the same tax amount as in an arm's length sale without reviewing the title deed.
What to check before setting your required net price
- Obtain updated cadastral information for the property.
- Request a tax simulation from the town hall or a gestoría specialising in local taxes for that municipality.
- Calculate both the objective and real methods where applicable, and select the legally most favourable option.
- Incorporate the calculation into your expense breakdown alongside agency fees, mortgage cancellation fees and estimated IRPF (costs of selling a property).
Common mistakes when self-assessing
- Using the total cadastral value instead of the land value alone.
- Confusing the deed signature date with the tax point date when linked transactions occur.
- Failing to file on time and incurring avoidable surcharges.
- Assuming that "losing money on the sale" automatically means no tax is due, without assessing the land value separately.
Guidance, not tax advice
Regulations governing IIVTNU are technical and operate alongside local ordinances. Before signing a deposit agreement (arras), it is advisable to obtain a written estimate of the municipal capital gains tax in your municipality and confirm it with a tax advisor or gestor if the transaction is substantial, involves a recent inheritance, or features unclear property values.
At Sky Real Estate, we help streamline the sales process and coordinate timelines with the notary and buyer; specific tax calculations should be verified by your tax professional. If you require professional sales support, you can explore our service for property sales and marketing.
Frequently asked questions
Who is the taxable person for IIVTNU in a transaction for consideration?
Fuente: BOE, Art. 106.1.a del Texto Refundido de la Ley Reguladora de las Haciendas Locales
Is municipal capital gains tax payable if the sale does not generate an increase in land value?
Fuente: BOE, Art. 104.5 del Texto Refundido de la Ley Reguladora de las Haciendas Locales
What methods for calculating the tax base are established by national regulations?
Fuente: BOE, Art. 107 del Texto Refundido de la Ley Reguladora de las Haciendas Locales
Who is the taxable person for IIVTNU in a transfer due to death?
Fuente: BOE, Art. 106.1.b del Texto Refundido de la Ley Reguladora de las Haciendas Locales
Is municipal capital gains tax in Madrid the same as in other municipalities?
Fuente: Ayuntamiento de Madrid, Ficha municipal del IIVTNU (Ayuntamiento de Madrid)