Kointax.ioKointax.io

Crypto tax planning: legal strategies to reduce taxes

Legal tax planning techniques for crypto investors in Spain: loss offsetting, sales timing, donations, and efficient structures.

Equipo declaracrypto·April 15, 2026·8 min read

Crypto tax planning: legal strategies to reduce taxes

Tax planning is not evasion; it is using the legal framework intelligently to pay only what the law requires, no more and no less. These are the most effective strategies for crypto investors in Spain.

1. Tax loss harvesting: realizing losses before December 31st

If you have positions with unrealized losses at the end of the year and you also have realized gains, you can sell the losing positions to offset those gains.

Example:

  • Realized gains in 2025: €20,000.
  • ETH with unrealized losses: −€8,000.
  • If you sell the ETH before 31/12 → you declare only €12,000 in net gain.
  • Tax savings: €8,000 × 21% ≈ €1,680.

Remember: if you repurchase the same asset, the conservative 2-month rule applies.

2. Offsetting losses from previous tax years

Capital losses and negative returns on movable capital can be carried forward for up to 4 tax years. Check if you have negative tax bases pending to be offset from 2021, 2022, 2023, or 2024.

3. Timing of sales between tax years

If you anticipate a large gain on a sale, consider whether you can defer it to the following year. This is especially useful in December.

Why it works: Each tax year has its own savings tax base. If your 2025 gain is already large, adding more pushes it into higher tax brackets (23-28%). Deferring to 2026 allows you to start from 0 in the lower brackets (19%).

4. Pension plan contributions

Although contributions to pension plans reduce the general tax base (not the savings base), they reduce the marginal rate, which can lower the overall tax liability from other items.

The limit is a €1,500 personal contribution (plus €8,500 if there is a company contribution).

5. Donating crypto with large capital gains to NGOs

If you have crypto with massive capital gains and want to make a charitable donation:

  • You declare the capital gain (same as selling).
  • But you get a deduction of 80% for the first €150 and 35% for the rest of the donation.
  • For very large donations to NGOs, the net result can be similar to having sold and donated the cash, but with the added tax deduction.

6. Cross-offsetting: gains and losses of different natures

Capital gains and losses offset each other. If you have losses in stocks, you can offset them with crypto gains (and vice versa). Excess capital losses can offset up to 25% of the positive balance of returns on movable capital.

7. Using tools to identify strategic FIFO lots

With multiple purchases over time, the FIFO order is fixed by law. However, knowing exactly what cost the next lot to be sold has according to FIFO allows you to accurately calculate the impact of a sale before executing it.

What is NOT tax planning (and may be fraud)

  • Hiding operations or failing to declare.
  • Simulating losses with circular transactions between related parties.
  • Paying taxes in a country where you are not a real resident.
  • Artificially splitting operations to stay below thresholds.

Conclusion

Legal tax planning can save you thousands of euros a year without any risk. The trick is to act before December 31st, not after. Simulate different scenarios with your tax tool before making investment decisions.

Ready to calculate your crypto taxes?

Connect your exchanges, import your history and generate your IRPF report in minutes.

Start free — no card needed