Tax timing in crypto: the guide to selling at the right time
“When to sell” doesn't just have a market price dimension; It also has a fiscal dimension. Selling the same asset with the same profit at two times of the year (or in different years) can mean thousands of euros of difference in your tax bill. This guide analyzes the legal timing strategies available in Spain.
Fundamental principle: accrual
In Spanish personal income tax, capital gains and losses are taxed in the year in which they occur (the year of the taxable event). With cryptocurrencies:
- If you sell on December 30 → pay taxes in the current year.
- If you sell on January 2 → pay taxes in the following year.
- A day difference can change in which fiscal year the gain is taxed.
Strategy 1: Defer earnings to the following year
If you have a huge latent gain in November (e.g. BTC went up a lot), consider whether:
- You already have a lot of profits this year (you would fill the 28% bracket).
- Next year you will have more compensable losses.
- You are going to change your income bracket (e.g.: less income next year because you are retiring).
Tactic: Do not sell until January 2nd. The gain is declared in the following year's personal income tax.
Risk: The price may fall between December 31 and January 3. It is necessary to assess whether the tax savings offset the market risk.
Strategy 2: Crystallize losses before December 31
If you have assets with latent losses in your portfolio, selling them before December 31 allows you to:
- Offset those losses with profits from the same year → pay less taxes.
- If losses exceed gains → up to 25% of the return on capital is compensable + carryover of up to 4 years.
Example: You have €10,000 of profits in BTC this year. You also have ALT that has fallen by 80% and you have €8,000 of latent losses. You sell the ALT before December 31 → you only pay taxes on €2,000 of net gain.
The two-month rule (washing losses)
If you sell crypto at a loss and buy it back in the 2 months before or after (for listed securities):
- Losses are not deductible in that year (they are deferred).
- Important: Cryptocurrencies are not securities admitted to trading in Spanish regulated markets → this rule technically does not apply.
- But the AEAT can argue that it applies if cryptocurrencies are admitted in recognized markets.
- Cautious stance: wait 2 months and one day before repurchasing the same asset to avoid having a debate.
Strategy 3: Spread big gains across years
If you plan to sell a large position (e.g. €200,000 of Bitcoin profits), you can split the sale:
- Sell on December 31: you declare part in the current year.
- Sell on January 2: the rest in the following year.
This avoids rising to the maximum range of 28% in a single exercise.
Sections of the savings base (2025):
| Section | Type |
|---|---|
| 0-6,000€ | 19% |
| €6,001-€24,000 | 21% |
| €24,001-€60,000 | 23% |
| €60,001-200,000 | 27% |
| +200,000€ | 28% |
If you have €400,000 of profit in BTC, the savings of dividing it over two years is:
- Year 1: €200,000 → tax ≈ €53,000.
- Year 2: €200,000 → tax ≈ €53,000.
- Total: €106,000.
If you sell everything in one year: ~€114,000 tax.
→ Savings: ~€8,000 simply due to timing.
Strategy 4: Optimize FIFO strategically
With the mandatory FIFO method in Spain, you always sell the oldest assets first. This can be favorable (if older ones have a higher acquisition cost) or unfavorable.
You cannot choose which "lot" to sell within the same asset, but you can:
- Decide how much to sell: if you sell only part, you are really using the oldest lots (the lowest cost if you bought when the price was low).
Strategy 5: Compensate for losses from previous years
If in previous years (maximum 4 carry-forward years) you had uncompensated capital losses, calculate how many profits you can "absorb" with those carry-forwards before generating more net profits.
Plan the timing of the sale to fully use the pending carryforwards in the year that best suits you.
Strategy 6: Fiscal year and change of residence
If you are considering changing your tax residence to a country with lower crypto taxation:
- The residence changes on January 1 of the following fiscal year (if you change on July 15, 2025, it will not take effect on the 2025 personal income tax).
- Latent capital gains at the time of the change can activate the Exit Tax.
- All this requires specific advice.
Fast savings simulation by timing
Before December 31, do this simulation:
- How much profit do I already have in the year? → What section am I on?
- Do I have latent losses in any assets? → How much profit can I compensate?
- Do I have losses from previous years pending carryover? → How much do I drag?
- Do I have plans to sell large assets? → Should I defer to next year?
Updated: April 2026 | Fiscal year: 2025


