Cabanillas Real Estate

Taxes when selling a property in Spain if you don’t live here

Selling a property in Spain as a non-resident has a tax cost that few calculate properly before signing. In some cases that cost is zero, because there is an exemption that eliminates the tax entirely, but most sellers don’t know it exists or don’t find out in time to apply it.

The tax framework for these operations involves three elements: the Non-Resident Income Tax (IRNR, the tax that levies gains obtained in Spain by those who do not have their tax residence here), a mandatory withholding that the buyer practices on the sale price and, in certain cases, the possibility of being exempt from payment if certain requirements are met. Having professional advice from the start of the process avoids mistakes that later become difficult to correct.


When is the gain tax-free?

Before going into the tax calculation, it’s worth explaining this point: it’s the most relevant for many non-resident sellers and the least known.

Since 2015, if you reside in a country of the European Union, Norway, Iceland or Liechtenstein, you can be exempt from IRNR on the gain obtained from the sale of your property in Spain, provided that you reinvest that amount in the purchase of a new main residence. The legal basis is the Seventh Additional Provision of the consolidated text of the Non-Resident Income Tax Law.

If the reinvestment is partial, the exemption is applied proportionally to the amount reinvested.

Requirements to access the exemption

Requirements to access the exemption

For the exemption to be applicable, all of these conditions must be met:

  • Residence in the EU or EEA. The seller must be a tax resident in a Member State of the European Union, or in Norway, Iceland or Liechtenstein. Those residing outside this scope cannot benefit from this advantage.
  • The property sold must have been your main residence in Spain. A residence is considered habitual if you have lived in it effectively and continuously for at least three years. The property can continue to qualify as habitual even if you no longer occupy it, provided that no more than two years have elapsed from when you stopped living in it until the date of sale.

This last point has recent case law: the Central Economic-Administrative Court, in its resolution no. 7402/2022 of April 2026, confirmed that the exemption does not apply when the sale occurs more than two years after you ceased to occupy the property. If you abandoned the property more than two years before selling it, the exemption is ruled out except in very specific exceptions.

  • Reinvestment within a two-year period. The amount obtained from the sale must be used to purchase a new main residence within a maximum period of two years before or after the transfer. The new property can be in any country, not necessarily in Spain.
  • Documentation. You must be able to prove both the sale of the main residence in Spain and the purchase of the new one. The Tax Agency requires documentary evidence to recognize the exemption.

As for the declaration mechanism: if you already purchased the new property before filing your IRNR return, you can apply the exemption directly in Form 210 using the income type code 33 or 34 depending on the timing of the reinvestment. If you purchase after filing Form 210 and paying the tax, you can request a refund through Form 228 within three months of acquiring the new property.


What taxes does a non-resident pay when selling a property?

  • Non-Resident Income Tax (IRNR). This tax levies the gain obtained from the sale, that is, the difference between the price at which you sell and the price at which you bought it at the time. The applicable rate is 19% for residents in the EU or EEA, and 24% for residents in the rest of the countries, including the United Kingdom, United States or Canada.
  • Municipal capital gains tax. Its official name is Tax on the Increase in Value of Urban Land, and it is a tax that calculates how much the value of the land has increased between the date you purchased it and the date you sell it. It is collected by the municipality where the property is located. When the seller is a non-resident, the law allows the buyer to act as a substitute for the taxpayer, although in practice the distribution of this cost between the parties is usually agreed upon in the deed.

How the gain is calculated

The gain is obtained by subtracting the original purchase price from the sale price, with some adjustments on both sides. The sale price is reduced by the expenses and taxes of the operation that correspond to the seller. The purchase price is increased by the expenses that were paid at the time: notary, registration, taxes and accredited improvements.

To understand how it works in practice, let’s take a specific case: if the property was purchased for 200,000 euros with 16,000 euros in expenses, and sold for 320,000 euros with 8,000 euros in sale expenses, the gain is 96,000 euros. Applying the 19% rate, the resulting tax would be 18,240 euros, on which a withholding tax will have already been withheld by the buyer.


The 3% withholding: how it works and why it exists

In every sale and purchase in which the seller is a non-resident, the buyer has the legal obligation to withhold 3% of the sale price and remit it directly to the Tax Agency. This withholding exists because the Tax Authority needs to guarantee collection of the tax when the seller has no tax domicile in Spain and may leave without filing their return.

This withholding is not the final tax but a payment on account of the IRNR that the seller will settle later.

The mechanism works like this: at the time of signing the public deed, the buyer withholds that 3% of the agreed price and remits it to the Tax Agency through Form 211 within a maximum of one month from the date of the operation. Once remitted, it delivers a copy of the payment receipt to the seller.

The seller therefore receives the sale price minus that 3%. That withheld amount remains in their favor as a credit against the Tax Authority: when they file their own return, they will deduct it from the resulting tax liability.

If the 3% withholding exceeds the final calculated tax, the seller can request a refund of the excess. If the withholding is less than the tax liability, they must pay the difference. If the operation has resulted in a loss, there is no tax to pay and the entire withheld amount can be claimed by filing Form 210 with that result.

Deadlines for filing after the sale

The non-resident seller has four months from the date of the deed to file their self-assessment: the buyer has one month to submit Form 211, and the seller has three additional months from that deadline to file Form 210.


Professional advice for non-residents on the Costa del Sol

We have been managing real estate operations in Estepona and the Costa del Sol for over six decades, with a significant presence of international buyers and sellers. We understand the tax implications of these transactions and we work with a specialized legal department that accompanies the seller at each step of the process: from property valuation to tax management after signing.

If you have a property in Estepona and are considering selling it, contact us. We analyze your situation, evaluate whether you can apply the reinvestment exemption and we ensure that the operation closes correctly.

¿Qué tan útil fue esta publicación?

¡Haz clic en una estrella para calificarla!

Calificación promedio 5 / 5. Recuento de votos: 1

¡Aún no hay votos! Sé el primero en calificar esta publicación.

Carmen Cabanillas Sánchez

Leave a Reply