How tax residence affects crypto taxation
Tax residence determines in which country you pay taxes on your crypto gains. Choosing poorly—or failing to plan in time—can mean paying taxes in two countries or being investigated for tax evasion.
When are you a tax resident in Spain?
You are a tax resident in Spain if you meet at least one of these criteria (Article 9 of the IRPF):
- Presence: Being in Spain for more than 183 days in the calendar year.
- Center of economic interests: Your base of operations or main source of income is in Spain.
- Family presumption: Your non-separated spouse and minor children habitually reside in Spain.
Days of sporadic absence count as days in Spain, unless you can prove tax residence in another country.
Taxation of non-residents
If you are not a tax resident in Spain, your crypto gains are not taxed in Spain, even if you use Spanish exchanges.
In that case, you will pay taxes in your country of tax residence, according to its local regulations.
Exit tax: the departure tax
If you leave Spain with unrealized capital gains (market values of your cryptos higher than the acquisition cost), Spain may require you to pay the departure tax (exit tax, Article 95 bis of the IRPF).
When it applies: If the total unrealized gain exceeds €4,000,000 (or €1,000,000 if there is a significant shareholding in companies).
For crypto portfolios, in practice, this threshold is beyond most individual investors, but it is relevant for large holders.
Portugal and the tax trap
For years, Portugal was the favorite destination for European crypto-nomads for being "tax-free" for individual crypto investors. However, in 2023, Portugal introduced a 28% rate on crypto gains. The advantage has largely disappeared.
Can I move to Dubai or Andorra?
Yes, but under strict conditions:
- Residence must be effective and real—a residence permit is not enough.
- You must actually spend more than 183 days outside of Spain.
- You cannot maintain your "center of vital interests" in Spain (family, business, primary properties).
- Spain can initiate a tax residence accreditation procedure and require you to prove your effective residence in the other country.
The AEAT actively investigates changes of residence for individuals with large crypto assets.
Double taxation agreements
Spain has agreements with more than 90 countries to avoid double taxation. If you pay taxes in another country for your crypto gains and it later turns out that you also owe in Spain, the agreement determines which has preference and how double taxation is eliminated.
Conclusion
Tax residence is the cornerstone of your crypto taxation. If you plan to change countries, do so by seeking advice from an expert in international tax law before moving assets or closing positions, not after.


