Selling property in Spain entails various tax obligations that can differ depending on the municipality and autonomous community. A crucial factor to consider when planning a sale is the potential capital gain and its taxation: the Personal Income Tax (IRPF) for Spanish tax residents or the Non-Resident Income Tax (IRNR) for non-residents. Additionally, sellers must pay the municipal tax on the increase in the value of urban land, known as IIVTNU or Plusvalía municipal.
Calculating these taxes involves many variables: duration of ownership, purchase and sale prices, owner status, owner’s age, local tax benefits and deductions, among others. Professional advice from a knowledgeable real estate agent or tax consultant can be invaluable. This article outlines the key points for each tax to help you understand how calculations are made and what to expect.
Capital Gains on Property Sales in Spain
Capital gain is the difference between the purchase price (acquisition cost) and the sale price (disposal value) of the property.
Both residents and non-residents can generally deduct taxes and expenses related to buying, selling, or improving the property. These include real estate agency and notary fees, Plusvalía tax, property transfer tax (ITP) or VAT (IVA), stamp duty (IAJD), land registry fees, and costs for improvements supported by invoices. Routine maintenance or repairs do not qualify as deductible expenses.
Personal Income Tax (IRPF)
When calculating IRPF on a property sale, consider the following:
- Acquisition and sale prices: Capital gain—the tax base—is the difference between the sale price and purchase price, allowing deductions for certain taxes and expenses.
- Ownership period for primary residence: Sellers of their main home may qualify for a tax exemption if they have lived in the property for at least three years and reinvest the proceeds into another primary residence. If the entire sale amount is reinvested, the exemption is 100%; if only part is reinvested, the exemption is proportional. Additional conditions include purchasing the new primary residence within two years of sale and residing there for at least one year, as verified by official registration. Mortgage repayments at the time of sale are also considered in reinvestment calculations.
- Age-related exemptions: Owners over 65 years old selling their primary residence are exempt from tax regardless of profit or reinvestment. For owners over 65 selling non-primary residences, exemption applies if proceeds are used to purchase a lifetime annuity.
- Plusvalía tax: This municipal tax must also be accounted for, as it affects the tax base calculation (explained below).
If there is a capital gain without reinvestment in a new primary residence, IRPF is calculated on a progressive scale:
- Up to €6,000 — 19%
- €6,000 to €50,000 — 21%
- €50,000 to €200,000 — 23%
- €200,000 to €300,000 — 27%
- Above €300,000 — 30%
Non-Resident Income Tax (IRNR)
While residents pay IRPF, non-residents are subject to a similar tax called IRNR. The capital gain calculation is the same:
Sale price – (purchase price + improvements + deductible expenses and taxes) = Capital gain
Unlike the progressive IRPF, IRNR is taxed at a flat rate of 19%. A 50% tax relief applies to owners who purchased property between May 12 and December 31, 2012, provided the transaction was not between close relatives (up to second degree).
For tax residents of the EU, Iceland, Norway, and Liechtenstein—countries with tax information exchange agreements with Spain—selling their primary residence in Spain may benefit from reinvestment relief. Capital gains can be exempt from IRNR if the entire amount is reinvested in a new primary residence in Spain. Partial reinvestment results in proportional relief.
Another important point: when a non-resident sells property in Spain, the buyer must withhold 3% of the transaction price. This is not an additional tax but an advance payment on the IRNR. The buyer must remit this amount to tax authorities within one month of the sale, filing form 211. The seller then has three months to file form 210 to finalize the tax calculation based on actual profit or loss:
- If the initially withheld 3% is less than the tax due, the seller must pay the difference.
- If the seller incurs a loss or the tax due is less than 3%, they can request a refund via form 210.
Municipal Tax on the Increase in Urban Land Value (IIVTNU)
Commonly called Plusvalía municipal or simply Plusvalía, this municipal tax varies by locality, with rates, exemptions, and payment plans set locally. Two methods are used to calculate it:
- Objective method using coefficients.
- Actual profit method.
The tax applies only to the increase in land value, never to the building itself. For example, the property tax receipt (IBI) shows cadastral values for land and buildings separately; only the land value is used for Plusvalía.
The objective method uses the cadastral value of the land at purchase, multiplied by a coefficient based on years of ownership. Nationally, maximum coefficients range from 0.09% to 0.40%, but municipalities may reduce them. The government plans to increase these coefficients in 2026, pending final approval.
The actual profit method calculates the difference between the land’s sale and purchase values.
The tax base from either method is taxed at a rate capped nationally at 30%.
The objective method is the default. Sellers wishing to use the actual profit method must notify the notary at the time of signing. Recommendations for method choice:
- Use the objective method if land value has significantly increased.
- Use the actual profit method if the increase is minimal or the value has decreased.
No tax is due if there is no increase or if there is a loss on land value.
For non-resident sellers, the buyer is responsible for withholding and paying Plusvalía to the local government, typically alongside the 3% IRNR withholding, within 30 calendar days. Many municipalities offer exemptions ranging from 50% to 95%.
Property Tax (IBI)
The annual property tax (IBI) is unrelated to the sale transaction itself. At closing, there must be no outstanding IBI payments, as the notary will require proof of the latest payment. The registered owner as of January 1 of the tax year is responsible for the tax. However, the tax can be prorated between buyer and seller for the year of transfer, based on ownership periods, if agreed and documented in the reservation contract.
Common Mistakes When Selling Property in Spain
These errors often lead to higher taxes and increased sale costs:
- Lack of invoices for improvement works on the property.
- Confusing routine maintenance with improvements: only certain works increase the acquisition value and are deductible. Improvements include foundation, facade, engineering systems, electrical, plumbing, gas works, environmental upgrades, energy efficiency, insulation, heating and cooling installations, etc.
- Poor tax planning and failure to apply all available deductions and exemptions.
