Selling a company while resident in Spain can generate one of the largest IRPF charges an individual will ever face. A business built over a decade from a modest investment and sold for several million euros may generate millions in capital gains — all taxed as savings income at rates of up to 28%. Understanding the rules, and the planning options available before a sale, is essential for any business owner contemplating an exit.
The Basic Tax Charge: CGT at 19–28%
For a Spanish tax resident selling shares in a company, the gain (sale price minus the acquisition cost of the shares, adjusted for allowable costs) is taxed as savings income (base del ahorro) at the following rates:
- First €6,000 of gain: 19%
- €6,001 to €50,000: 21%
- €50,001 to €200,000: 23%
- €200,001 to €300,000: 27%
- Above €300,000: 28%
For a company sold for €5 million with a nominal acquisition cost of €10,000, the taxable gain is approximately €4,990,000. The resulting IRPF liability would be approximately €1,377,000 — payable in the tax year of the sale.
Timing the sale across the year-end: Where the sale process permits, structuring completion to straddle a tax year — with part of the consideration in one tax year and part in the next — allows the highest CGT brackets to be applied twice over, potentially reducing the marginal rate on some of the consideration. This requires careful negotiation of the completion timeline.
The Exit Tax Problem: Can You Leave Before the Sale?
The most commonly explored pre-sale strategy is: can I move to a lower-tax country before completing the sale? In theory, yes — but Spain's exit tax under Article 95bis LIRPF substantially limits this option.
Exit tax applies when a Spanish tax resident ceases to be a Spanish tax resident, if they hold:
- Securities with a total unrealised gain exceeding €4,000,000, or
- A stake of 25% or more in a single entity where the unrealised gain on that stake exceeds €1,000,000
Where these thresholds are met, the AEAT charges CGT on the deemed disposal of the shares at market value on the date of departure — as if the shares had been sold immediately before leaving Spain. For an EU or EEA move, the payment of the exit tax can be deferred (in instalments over 5 years or until actual sale), but the obligation is created at departure. For a non-EU move (e.g., to Dubai or the UK post-Brexit), the exit tax is due immediately with no deferral.
| Scenario | Exit Tax Due? | When Payable | Planning Notes |
|---|---|---|---|
| Sale while still Spanish resident | No exit tax | CGT due in year of sale | CGT at 19–28%; no exit complexity |
| Move to EU/EEA before sale (high threshold) | Yes (if thresholds met) | Deferred (up to 5 years or until sale) | EU move defers but does not eliminate |
| Move to non-EU/EEA (UAE, UK, etc.) before sale | Yes (if thresholds met) | Immediately on departure | Immediate cash tax on unrealised gain |
| Move before exit tax thresholds are met | No | — | Must time residency exit before value reaches threshold |
The 4-Year Shadow Residency Risk
Even after formally leaving Spain, the AEAT has power under the LIRPF to treat an individual as still resident in Spain for tax purposes if their departure appears abusive. The practical implications: the AEAT can challenge a change of residence if the individual maintains a permanent home, family, or principal economic activity in Spain. For business owners who remain directors of or active in a Spanish company after nominally moving abroad, the risk of being treated as a continued Spanish tax resident is significant.
Earn-Outs and Instalment Sales
Many M&A transactions include earn-out provisions — additional consideration paid contingent on future performance. Spanish tax treatment of earn-outs is complex:
- If the total consideration (including maximum potential earn-out) is ascertainable at completion, the entire amount is taxable in the year of sale
- If the earn-out is genuinely contingent and cannot be quantified at completion, the AEAT position is evolving — but in principle, each earn-out payment is taxable as a capital gain in the year received, at the savings income rates applicable in that year
- Seller financing (deferred consideration on fixed terms) is generally treated as a split of the capital gain across the years of receipt — known as operaciones a plazos under Art. 14.2 LIRPF
The Empresa Familiar Exemption: Does It Help on Sale?
The empresa familiar regime offers significant IP (Wealth Tax) exemption and up to 95% ISD reduction for qualifying family business shares passed on death or by gift. However, it does not provide CGT relief on an outright sale. A business owner who sells their qualifying family business shares at arm's length to a third party still pays full CGT at savings-income rates — the empresa familiar benefits apply only to transfers by gift or inheritance, not to commercial sales. This is a common misconception.
Restructuring Before Sale: Merger Neutrality Regime
Spain's corporate tax neutrality regime (Régimen especial de fusiones, escisiones, aportaciones de activos y canje de valores — Articles 76 et seq. of the Ley del Impuesto sobre Sociedades) implements the EU Merger Directive. Under this regime, certain corporate reorganisations — mergers, demergers, asset contributions, and share exchanges — can be carried out at book value without triggering immediate corporate tax on any gain. For individual shareholders exchanging shares in a company for shares in a holding company (the canje de valores), the IRPF gain on the exchange can also be deferred under Article 80 LIS.
Pre-sale restructuring can allow a business owner to:
- Introduce a holding company above the operating company
- Segregate assets or business lines before sale
- Allow multiple shareholders to align their ownership structures for a single sale
The neutrality regime requires a genuine economic motive beyond tax avoidance — the AEAT scrutinises pre-sale restructurings carefully, particularly where the reorganisation is completed shortly before a known sale. A period of at least one year between restructuring and sale is generally considered prudent.
Planning a Business Exit from Spain?
The difference between good and poor pre-sale planning can be hundreds of thousands of euros. Jacob Salama advises founders and shareholders on Spanish CGT planning, exit tax analysis, and cross-border M&A tax.
Book a Consultation →Disclaimer: This article is for general informational purposes only and does not constitute legal or tax advice. Spanish tax law changes frequently. Always consult a qualified tax lawyer before making any decisions. SALAMA LEGAL SLP — Colegiado nº 11.294 ICAMálaga.