# Tax on selling your company in Spain: what you pay

URL: https://melso.ai/en/blog/selling-a-company-in-spain-tax
Published: 2026-10-18 · Updated: 2026-10-18

What tax you pay when selling a company in Spain in 2026: savings income tax of 19% to 30%, the minimum value of unlisted shares, earn-outs and deferred price, selling through a holding company and its limits, and a €12 million worked example.

## How much tax do you pay when selling a company in Spain? The short answer

When selling a company in Spain, the tax depends on who sells. If you sell the shares yourself, the gain is taxed as savings income: in 2026, from 19% to 30%, and on a large sale almost all of it at 30%. If your holding company sells and meets the requirements, it pays around 1.25%, but the money stays inside.

> [!RESUMEN]
> - The gain is the price minus what the shares cost you and the costs of the sale. If the price is not a market price, the tax authorities can apply a minimum value.
> - As an individual you pay the 2026 savings scale, from 19% to 30%. Every euro of gain above €300,000 is taxed at 30% and goes in the following year's tax return.
> - If a holding company that has held at least 5% for a year sells, 95% of the gain is exempt: an effective 1.25% at the general 25% rate. Taking the money out is then taxed as a dividend.
> - If part of the price arrives more than one year later, you can spread the gain over the years you are paid, including a variable price.
> - Moving the shares into a holding just before selling has limits: if it sells within two years, the built-in gain is not exempt, and without valid business reasons the tax authorities can reverse the advantage.

This guide covers selling shares (participaciones in an SL, Spain's private limited company, or acciones in an SA) in an unlisted company while resident in the common tax territory. The Basque Country and Navarre have their own income tax.

## How is the capital gain on selling a company calculated?

The sale produces a capital gain: the transfer value minus the acquisition value ([article 35 of the Income Tax Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a35), the law on IRPF, Spain's personal income tax).

- **Transfer value:** the price you receive, minus the sale costs you pay yourself (M&A adviser, lawyers, notary).
- **Acquisition value:** what you paid for the shares, plus costs. If you founded the company, the capital you put in at incorporation and in later capital increases.

### The minimum value of unlisted shares

[Article 37.1.b](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a37) sets a floor. Unless you prove the price is what independent parties would have agreed under normal market conditions, the transfer value cannot be lower than the higher of these two:

| Minimum value | How it is calculated |
|---|---|
| Net equity | Your shares' portion of net equity in the balance sheet of the last financial year closed before the sale |
| Capitalised profits | The average result of the last three closed financial years, capitalised at 20% (multiplied by five); dividends and transfers to reserves count |

With an independent buyer, a real negotiation is the best proof that the price is a market price. The rule bites on sales to a partner, a manager or a child below that floor: you are taxed on the minimum value, which becomes the buyer's acquisition value.

### If you have held the shares since before 1995

For unlisted shares acquired before 31 December 1994, the [ninth transitional provision](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#dtnovena) reduces the part of the gain generated up to 19 January 2006 by 14.28% for each year held up to 1996, from the third year on. But it only covers the part of the price that, added to your sales with this reduction since 2015, does not exceed €400,000. On a multi-million sale, it barely matters.

## What income tax rate applies to the gain?

The gain goes into the savings base ([article 46](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a46)) and is taxed on the scale in [articles 66](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a66) and [76](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a76): half state, half regional, both set in the state law, so it is the same in every common-regime region. Since 2025, under Law 7/2024, anything above €300,000 is taxed at 30%.

| Taxable savings base | Rate in 2026 | Cumulative tax at the top of the band |
|---|---|---|
| Up to €6,000 | 19% | €1,140 |
| €6,000 to €50,000 | 21% | €10,380 |
| €50,000 to €200,000 | 23% | €44,880 |
| €200,000 to €300,000 | 27% | €71,880 |
| Over €300,000 | 30% | €71,880 plus 30% of the excess |

On a multi-million sale the average rate gets close to 30%: on a gain of €11,700,000, it is 29.8%.

### When you declare and pay

Nobody withholds anything: [article 75 of the Income Tax Regulation](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820#a75) provides no withholding on the sale of shares in a company. You pay through the annual income tax return (the Renta) for the year of the sale: a 2026 sale goes in the 2026 return, filed in 2027. If you file on time, you can pay 60% when filing and 40% in the second instalment, interest-free ([article 62.2 of the regulation](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820#a62)).

> [!CONSEJO]
> Set the tax aside the day you are paid, in an account you do not use for investing. More than twelve months can pass between signing and the tax return.

## Do you pay municipal capital gains tax, VAT or transfer tax on a share sale?

No. The municipal land value tax (plusvalía municipal) applies when urban land changes hands ([article 104 of the Local Finance Act](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4214#a104)), and if you sell the shares the property stays with the company. A sale of securities is exempt from VAT and from ITP, Spain's transfer tax ([article 338 of Law 6/2023](https://www.boe.es/buscar/act.php?id=BOE-A-2023-7053#a3-67)), except when the buyer takes control of a company whose assets are at least 50% Spanish property not used in a business: then, unless proven otherwise, it is taxed as a sale of property.

If instead the company sells its business (an asset deal), the gain is taxed in the company's corporate income tax (Impuesto sobre Sociedades) at the general rate of 25% ([article 29 of that Act](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a29)), and again in your income tax when you take the money out. And the company does pay the municipal tax on its urban land.

## What if part of the price is deferred or an earn-out?

Many deals include deferred payments, an escrow or an earn-out, a variable price that depends on how the business performs afterwards. [Article 14.2.d of the Income Tax Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a14) gives you a choice: if more than one year passes between handing over the shares and the last payment, you can report the gain proportionally as each payment falls due. Otherwise, it all goes into the year of the sale.

For a variable price, the Dirección General de Tributos (the DGT, whose binding rulings the tax agency follows) set out the method in [ruling V1642-26](https://petete.tributos.hacienda.gob.es/consultas/?num_consulta=V1642-26) in June 2026: you estimate the total price, including the variable part, and report on that estimate. If you later receive a different amount, you correct it with a supplementary return, with late-payment interest, or by requesting rectification. And you can combine this with the instalment rule.

- **Spreading the gain barely lowers the rate** on a large sale, because anything above €300,000 a year is taxed at 30%. What you gain is paying when you are paid.
- **If you stop being resident before you are paid**, the pending income is allocated to the last year you file in Spain ([article 14.3](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a14)); if you move to another EU state, you can declare it as you receive it.

## What if your holding company sells?

If the shares belong to your holding company and it sells them, the sale falls under corporate income tax. [Article 21 of that Act](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a21) exempts the gain if the holding owns at least 5% of the company sold and has kept it throughout the previous year. The exemption is 95%, because section 10 deducts 5% as management costs: at the general 25% rate, the effective charge is 1.25%.

Before you count on that 1.25%:

- **If the company sold is a passive asset-holding company** (more than half its assets are securities or assets not used in a business, under [article 5.2](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a5)), only the part of the gain matching undistributed profits earned while you held it is exempt (article 21.5.a).
- **The money stays in the holding.** If you take it out as a dividend, it is taxed in your income tax at 19% to 30%. The holding defers your personal tax; it does not remove it.
- **Idle cash has consequences.** The money from selling a stake of at least 5%, held for a year and managed with the holding's own resources, does not count as a non-business asset for corporate income tax in the year of the sale and the next two (article 5.2), but afterwards it does. And for wealth tax, the exemption on your holding's shares only covers the part of their value tied to business assets ([article 4.Ocho.Dos of the Wealth Tax Act](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392#a4)).

When a holding makes sense is covered in the guide to the [family holding company](/en/blog/family-holding-company-spain); setting one up follows the same steps as any SL.

![If you sell, the gain is taxed as savings income, almost all at 30%, and the money is yours. If your holding company sells after holding at least 5% for a year, it pays an effective 1.25% at the 25% rate, but the money stays in the holding and is taxed as a dividend at 19% to 30% when paid out.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/vender-empresa-impuestos/1-compare-e6b9f303d5.png?w=1600&h=1414&m=1&mw=1080&mh=2715 "State rules for 2026. Articles 66 and 76 of the Income Tax Act and article 21 of the Corporate Income Tax Act.")

## Can you move your shares into a holding company just before selling?

Articles [80](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a80) and [87](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a87) of the Corporate Income Tax Act let you contribute shares to a company without paying tax at that point (a share-for-share exchange or a contribution in kind). The holding takes them at your tax value and your acquisition date: the gain does not disappear, it is deferred. And there are two limits:

1. **Two years.** If the holding sells within two years of the contribution, the exemption does not apply to the difference between the shares' tax value and their market value when contributed (article 21.4.b), unless you have sold your shares in the holding within that period. With the sale already negotiated, that difference is almost the whole gain.
2. **Valid business reasons.** [Article 89.2](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a89) denies the regime when the operation is not driven by reasons such as restructuring or rationalising activities, but merely by obtaining a tax advantage. The tax authorities then remove the effects of that advantage, and the TEAC (Spain's central tax appeals board), in a position repeated in 2024, accepts that this can also reach the initial deferral when needed to correct the abuse ([decision of 27 May 2024, RG 6513/2022](https://serviciostelematicosext.hacienda.gob.es/TEAC/DYCTEA/criterio.aspx?id=00%2F06513%2F2022%2F00%2F0%2F1)).

Business reasons are assessed case by case and must be documented; a tax saving on its own is not one. The operation must also be notified to the tax agency: failing to do so on time is a serious infringement with a fixed fine of €10,000 per operation (article 89.1).

> [!IMPORTANTE]
> With an offer or letter of intent already signed, moving the shares into a holding does not make the sale exempt: for the next two years the earlier gain is taxed in the holding (article 21.4.b), and if the main aim was tax, the authorities can deny the tax-neutral treatment (article 89.2).

## Illustrative example: Marta sells her SL for €12 million

Marta is 54, lives in Barcelona and founded an industrial software SL in 2011 with €60,000 of capital, her acquisition value. In 2026 an unrelated industrial group buys 100% for €12,000,000: €9,000,000 on signing in June 2026, then €1,500,000 in June 2027 and another €1,500,000 in June 2028. She pays €240,000 to her M&A adviser and lawyers. We assume she has no other savings income, that her personal allowances are used in the general base and that the 2026 scale still applies in 2027 and 2028.

**Step 1. The gain.** €12,000,000 − €240,000 − €60,000 = €11,700,000. The price comes from a negotiation with an independent third party, which Marta documents.

![Sale price of €12,000,000, minus €240,000 of sale costs and €60,000 of acquisition value: the capital gain is €11,700,000.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/vender-empresa-impuestos/2-breakdown-a2b0af12d6.png?w=1600&h=864&m=1&mw=1080&mh=1464 "Illustrative example. Articles 35 and 37.1.b of the Spanish Income Tax Act.")

**Step 2. The whole gain in 2026.** She pays €71,880 on the first €300,000 and 30% of the remaining €11,400,000, which is €3,420,000. Total: €3,491,880, or 29.8% of the gain.

**Step 3. Using the instalment rule.** The last payment arrives more than a year later, so she can report the gain as she is paid: 75% in 2026 and 12.5% in each of 2027 and 2028.

| Year | Payment | Gain reported | Income tax |
|---|---|---|---|
| 2026 | €9,000,000 | €8,775,000 | €2,614,380 |
| 2027 | €1,500,000 | €1,462,500 | €420,630 |
| 2028 | €1,500,000 | €1,462,500 | €420,630 |
| **Total** | **€12,000,000** | **€11,700,000** | **€3,455,640** |

She pays €36,240 less than in step 2, because the first €300,000 of each year falls in the lower bands. What matters more: she pays each part when she receives it.

**Step 4. Paying.** In her 2026 return, filed in 2027, the tax on the savings base is €2,614,380. If she files on time, she can pay €1,568,628 (60%) when filing and €1,045,752 (40%) in the second instalment.

**Step 5. What if her holding had sold?** If the shares had belonged since 2015 to a holding company of hers, with the same €60,000 tax value, the holding would pay €146,250 of corporate income tax (€11,700,000 × 5% × 25%) and keep €11,613,750. If it then paid everything out as a dividend, Marta would pay €3,466,005 of income tax: €3,612,255 in total, more than selling herself. The holding only changes the result if the money stays inside, invested.

![Selling herself and reporting everything in 2026, she pays €3,491,880. With the deferred price, €3,455,640. If her holding sold, it would pay €146,250, but paying everything out as a dividend would bring the total to €3,612,255.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/vender-empresa-impuestos/3-bars-a42fde2973.png?w=1600&h=868&m=1&mw=1080&mh=1467 "Illustrative example using the 2026 savings scale, assumed unchanged in 2027 and 2028, and the general 25% corporate rate.")

Then comes 31 December: the cash Marta holds that day counts for her 2026 wealth tax (Impuesto sobre el Patrimonio), at her region's rates. Her shares may have been exempt as a family business; the money is not.

> [!MELSO]
> The hard part is deciding the structure and the timing before you sign: who sells, how the price is paid and where the money sits on 31 December. At [Melso Private](/en/private-wealth#contacto), AI models these scenarios under each country's rules, tax advisers review them and choose the measures, and you see each one with its legal basis, risk and cost before approving it.

## Is there an exemption if you reinvest the proceeds?

There is no general reinvestment relief. [Article 38 of the Income Tax Act](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a38) has two cases that fit here:

- **New or recently created companies.** If you claimed the [article 68.1](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a68) deduction when you bought the shares (50% of the amount subscribed, on a maximum base of €100,000 a year), the gain can be excluded if you reinvest everything you receive in other such companies. It is a rule designed for investors in young companies, with strict conditions.
- **Over 65.** The gain is excluded if, within six months, you put the proceeds into an insured life annuity for yourself, up to €240,000. If you reinvest less than you received, only the proportional part is excluded.

## What changes after the sale: wealth tax, solidarity tax and residence?

Wealth tax looks at what you own on 31 December ([article 29 of its Act](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392#a29)). Your shares may have been exempt as a [family business](/en/blog/family-business-exemption-spain) if you held at least 5% (or 20% with your family) and your pay for running it was more than 50% of your employment and business income. The sale proceeds are not: a 2026 sale shows up in your 2026 wealth tax, filed in 2027, and if your net wealth exceeds €3,000,000, also in the solidarity tax on large fortunes (Grandes Fortunas), which accrues on the same day and remains extended ([article 3 of Law 38/2022](https://www.boe.es/buscar/act.php?id=BOE-A-2022-22684#a3)). How much you pay depends on your region: see [wealth tax by region](/en/blog/wealth-tax-spain-by-region).

The 60% joint cap on income and wealth tax does not help in the year of the sale: [article 31](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392#a31) leaves out gains on assets held for more than one year, and the income tax on them.

If you plan to leave Spain, the order matters. With shares worth more than €4,000,000, or more than €1,000,000 in a company in which you hold more than 25%, and after being resident for 10 of the last 15 years, leaving triggers tax on the built-in gain: Spain's [exit tax](/en/blog/exit-tax-spain) under [article 95 bis](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a95bis). And if you live here under the special regime for inbound workers ([article 93](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a93), the Beckham Law), you are taxed only on income obtained in Spain, and selling a Spanish company is exactly that ([article 13.1.i of the Non-Resident Income Tax Act](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a13)).

## Common mistakes when selling your company

- **Thinking about structure after the letter of intent.** With the sale negotiated, a new holding runs into the two-year rule and the valid-business-reasons test.
- **Selling to a partner or a child below the minimum value.** You are still taxed on the higher of net equity and capitalised profits.
- **Treating the holding's 1.25% as the final tax.** The money is taxed again when it reaches you.
- **Not setting the tax aside, or moving abroad with payments still due.** There is no withholding, and when you stop being resident, any income still to be reported goes into your last Spanish return.

## How Melso helps

Melso Private provides lawful tax planning for people with net wealth from €1 million, and selling a company, before, during and after signing, is one of its cases. Tax advisers work with AI that reads deeds, returns and statements and models scenarios; the advisers choose the measures and stand behind them, and you approve each one after seeing its legal basis, risk and cost. Melso coordinates with your notary, your private bank and your advisers in other countries, and files the returns agreed (income tax, wealth tax or your holding's corporate income tax) after you approve the exact version. The first conversation lasts 45 minutes and is free of charge: **Request a conversation** at [melso.ai/en/private-wealth](https://melso.ai/en/private-wealth).

> This article is for information only and does not replace professional advice for your case. Last reviewed: 18 October 2026.

## Frequently asked questions

### How much tax do you pay when selling a company in Spain?

If you sell the shares as an individual, the gain (price minus acquisition value and sale costs) is taxed in the savings base of Spanish income tax (IRPF). In 2026 the bands are 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above that. On a multi-million sale the average rate gets close to 30%. If a holding company that meets article 21 of the Corporate Income Tax Act sells, it pays around 1.25%.

### How is the capital gain on selling shares in a Spanish SL calculated?

Take the sale price, subtract the sale costs you pay yourself (advisers, lawyers, notary) and subtract the acquisition value: what you paid for the shares, or the capital you put in when you founded the company and in later capital increases. For unlisted shares, unless you prove the price is a market price, the sale value cannot be lower than the higher of the net equity in the last balance sheet and the average profit of three years capitalised at 20%.

### Can I sell my shares to a partner or to my child below their value?

You can agree any price you like, but for tax purposes you are taxed on a minimum. Under article 37.1.b of the Spanish Income Tax Act, unless you prove the price is what independent parties would agree, the sale value is at least the higher of the net equity attributable to the shares and their average profit over three years capitalised at 20%. The same figure then becomes the buyer's acquisition value.

### Do you pay municipal capital gains tax when selling a company that owns property?

Not if you sell the shares. The municipal land value tax (plusvalía municipal) applies when urban land changes hands, and the property stays with the company. A sale of securities also carries no VAT or transfer tax, except under the anti-avoidance rule in article 338 of Law 6/2023, when the buyer takes control of a company whose assets are at least 50% Spanish property not used in a business. If the company sells its own property, it does pay the municipal tax.

### How is an earn-out or deferred price taxed when you sell a company in Spain?

According to binding ruling V1642-26 of the Dirección General de Tributos, issued in June 2026, you estimate the total price, including the variable part, and report the gain on that estimate; if you later receive a different amount, you correct it with a supplementary return or a request for rectification. If more than one year passes between the sale and the last payment, you can use article 14.2.d of the Income Tax Act and report the gain as each payment falls due.

### Is it better to sell the company through a holding company?

It depends on what you will do with the money. If the holding has held at least 5% for more than one year, 95% of the gain is exempt and the effective tax is 1.25% at the general 25% rate. But the cash stays in the company: if you pay it out as a dividend, it is taxed in your income tax at 19% to 30%, and the total can be higher than selling the shares directly.

### Does it help to set up a holding company just before selling?

You can contribute your shares to a holding without paying tax at that point, but there are limits. If the holding sells within the next two years, the gain that already existed at the contribution is not exempt (article 21.4.b of the Corporate Income Tax Act). And if the operation has no valid business reasons, only tax ones, the tax authorities can remove the tax advantage; according to the TEAC, that can include the initial deferral.

### When do you report and pay the income tax on the sale of a company?

In the annual income tax return (Renta) for the year of the sale, filed the following year: a 2026 sale goes in the 2026 return, filed in 2027. There is no withholding on the sale of shares in a company, so you receive the full price and must set the tax aside yourself. If you file on time, you can pay 60% when filing and the remaining 40% in the second instalment, interest-free.

### What if I am not resident in Spain or I am under the Beckham Law?

If you are not resident in Spain and sell shares in a Spanish company, the gain counts as income obtained in Spain and is taxed under non-resident income tax at 19%, unless an exemption or the tax treaty with your country says otherwise. Under the special regime for inbound workers (the Beckham Law) you are taxed only on income obtained in Spain, and the sale of a Spanish company is taxed on the same 19% to 30% scale.

### Is there an exemption if I reinvest the proceeds of the sale?

There is no general one. Article 38 of the Income Tax Act has only two cases: reinvesting in new or recently created companies, when you claimed the article 68.1 deduction on the shares you sold, and taxpayers over 65 who put the proceeds, within six months, into an insured life annuity, up to €240,000. On a multi-million sale, neither changes the result much.

## Sources

- [Law 35/2006 on Personal Income Tax (IRPF), consolidated text: articles 14, 35, 37, 38, 46, 66, 68, 76, 93, 95 bis and ninth transitional provision](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764), BOE, accessed 2026-10-18
- [Royal Decree 439/2007, Income Tax Regulation, consolidated text: articles 62 and 75](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820), BOE, accessed 2026-10-18
- [Law 27/2014 on Corporate Income Tax, consolidated text: articles 5, 21, 29, 80, 87 and 89](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328), BOE, accessed 2026-10-18
- [Law 19/1991 on Wealth Tax, consolidated text: articles 4, 29 and 31](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392), BOE, accessed 2026-10-18
- [Royal Legislative Decree 5/2004, Non-Resident Income Tax Act: articles 13 and 25](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527), BOE, accessed 2026-10-18
- [Royal Legislative Decree 2/2004, Local Finance Act: article 104 (municipal land value tax)](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4214), BOE, accessed 2026-10-18
- [Law 6/2023 on Securities Markets and Investment Services: article 338 (VAT and transfer tax exemption on securities)](https://www.boe.es/buscar/act.php?id=BOE-A-2023-7053), BOE, accessed 2026-10-18
- [Binding ruling V1642-26 of 18 June 2026: sale of shares with a variable price and timing of the gain](https://petete.tributos.hacienda.gob.es/consultas/?num_consulta=V1642-26), Dirección General de Tributos, accessed 2026-10-18
- [TEAC decision of 27 May 2024 (RG 6513/2022): which effects of the tax advantage are removed under article 89.2 of the Corporate Income Tax Act](https://serviciostelematicosext.hacienda.gob.es/TEAC/DYCTEA/criterio.aspx?id=00%2F06513%2F2022%2F00%2F0%2F1), TEAC, accessed 2026-10-18
- [Law 38/2022: article 3, Temporary Solidarity Tax on Large Fortunes (taxable event, accrual and extension)](https://www.boe.es/buscar/act.php?id=BOE-A-2022-22684), BOE, accessed 2026-10-18
