Spanish Exit Tax on Shares When You Move to Portugal

An illustrative household. Names and details are invented.
Short answer
Spain treats the rise in value of shares as a gain when a person loses Spanish tax status, if they were resident for at least ten of the fifteen tax periods before the last one to be declared and hold shares worth more than EUR 4,000,000 in aggregate or, where that is not met, a stake above 25 percent worth more than EUR 1,000,000, in which case only that stake is taxed (article 95 bis, Ley 35/2006). On a move to another EU state, or to an EEA state with effective exchange of tax information, and under the terms of Law 36/2006, first additional provision, paragraph 4, the person may opt into special rules under which the self-assessment falls due only on one of three triggers within the ten periods following the last period to be declared.
Marta is 51 and has lived in Madrid all her life. She founded a logistics company and owns 30 percent of it, a stake worth about EUR 2.5 million, which is above 25 percent and above EUR 1 million. It is her only holding, and she has been resident in Spain for far more than ten of the last fifteen years. So the EUR 4,000,000 aggregate test is not met and the stake test applies. In January she and her husband move to Lisbon. She writes to you: "Spain wants tax on a gain I have not realised. Can I wait, and what happens if we move on again?"
The question: does leaving Spain trigger tax on a company stake, and can it be deferred?
Losing Spanish residence brings forward a gain on the shares
Article 95 bis of the Personal Income Tax Law (Ley 35/2006) treats the difference between the market value of shares and their acquisition value as a capital gain when the taxpayer loses status by changing residence. The look-back requires at least ten of the fifteen tax periods before the last one to be declared. The rule applies if the shares exceed EUR 4,000,000 in aggregate, or if a stake above 25 percent in one entity is worth more than EUR 1,000,000. Where only the stake test is met, the rule applies only to that stake.
The gain counts as savings income and is attributed to the last tax period to be declared, with a complementary self-assessment where applicable, under the conditions set by regulation, and without penalty, late-payment interest or surcharge. The Spanish tax period is the calendar year, except that it is shorter where the taxpayer dies on another day, and a change of residence does not interrupt it.
What ends the deferral
On a move to another EU state, or to an EEA state with effective information exchange, Marta may opt to defer the gain. The self-assessment then falls due only if, within the ten periods following the last period to be declared, one of three things happens. The shares are transferred during her lifetime (inter vivos), she loses EU or EEA residence, or she breaches the duty to notify.
The notification, in the terms set by regulation, covers the option, the gain, the destination state with her address and any later changes, and her continued ownership of the shares. A later move from Lisbon to a country outside the EU and EEA would end her residence in an EU or EEA Member State, which is a trigger. A move to another EU or EEA state does not end that residence and is not one of the three triggers.
Returning without transferring the shares allows a refund
If Marta becomes a Spanish taxpayer again without having transferred the shares, she may ask for a correction of the self-assessment and a refund of what was paid on the gain. Late-payment interest on the refund runs from the date of payment until the refund is ordered.
The paths, starting with doing nothing
If nothing changes: Marta loses Spanish residence. If the residence and threshold tests are met, the gain is attributed to the last period to be declared. It is settled, where applicable, by a complementary self-assessment.
Path A: opt for the deferral. The notification covers the option, the gain, the destination state with her address and any later changes, and her continued ownership of the shares. The tax falls due on a transfer of the shares, a loss of EU or EEA residence, or a breach of the notification duty within the ten periods following the last period to be declared.
Path B: return to Spain without transferring the shares. She may then ask for a corrected self-assessment and a refund.
What this does not settle
- The valuation of her stake for the exit gain, and the amount of tax.
- How Portugal taxes the shares and any later sale while she lives there.
- Which path Marta takes. That decision belongs to her and her professional.
Marta's question was whether she can wait. That depends on whether she opts for the deferral, and on whether she transfers the shares, loses EU or EEA residence, or breaches the duty to notify within the ten periods that follow the last period to be declared. A move out of the EU and EEA matters through the second of those. A move to another EU or EEA state does not.
Run it on your client's facts.
Questions professionals ask
Does Spain tax unrealised gains on shares when you leave?
It can. A person who loses Spanish status by change of residence, after at least ten of the fifteen tax periods before the last one to be declared, is taxed on the rise in value of shares if holdings exceed EUR 4,000,000 in aggregate. Where that is not met, a stake above 25 percent worth more than EUR 1,000,000 is taxed on that stake only.
Can the Spanish exit tax be deferred?
On a move to another EU state, or an EEA state with effective information exchange, the taxpayer may opt to defer the gain.
What ends the deferral of the Spanish exit tax?
Only if, within ten periods after the last tax period to be declared, one of these occurs: a transfer of the shares inter vivos, loss of EU or EEA residence, or a breach of the duty to notify.
Sources
This is general information, not tax advice for a particular household.
NettWorth
Wondering how to act on the insights in the article? Click here to apply this framework to your own wealth portfolio.
NettWorth reads your actual documents and applies what you just learned to your specific accounts, balances, and timeline — not a hypothetical.
No charge if you cancel. Your data stays yours.
Continue Reading
Crypto When You Leave Denmark, Austria, Portugal or Spain
Is crypto taxed when you leave? Denmark treats it as sold at market value on the day you go. Austria names it in the exit rule. Portugal treats loss of residence as a sale with a 365-day exclusion whose reach is unsettled. Spain's exit rule covers shares only.
Leaving Portugal: Share-Exchange Gains and Payment Options
What happens to a share-exchange gain when a person leaves Portugal? Value not taxed at the time of a share exchange, merger or demerger is treated as a capital gain for the year residence is lost. For a move to an EU or EEA state, the tax can be paid at once or deferred, and a later move outside the EU or EEA calls in the outstanding tax.
When Your Move Out of Spain Takes Effect for Tax
When do you stop being a Spanish tax resident? Spain tests 183 days, the centre of economic interests and a family presumption, treats the calendar year as one block, and in general dates a first-half move from 1 January that year and a second-half move from 1 January the next.