Extranjeros

Crypto tax calculator for Spain: gains and losses with FIFO

Upload your exchange history and work out, for free, the gain or loss on each sale with the FIFO method the Spanish tax office applies. The calculation runs in your browser: your file never leaves your device.

It calculates spot purchases, sales and coin-to-coin swaps. It does not cover futures, margin, DeFi or NFTs. Common tax territory (territorio común) only: it does not work for the Basque Country or Navarre.

Privacy: the file is read in your browser and is not sent to any server. To value things in euros we ask our server only for the coin name and the day of each operation (for example "BTC, 2026-03-01"), with no amounts and no account data.

How we calculate: FIFO per coin across all your exchanges together; in a swap the value is the greater of the two market values (if one of the two coins is dollar-pegged, we value the swap from that coin: this is our simplification, not a tax-office rule); fees raise the purchase cost or lower the sale value, in a swap too (DGT V0648-24); how we split a swap fee between the two values is our reading; the year follows Madrid time. Prices: ECB reference rates for currencies, National Bank of Ukraine for the hryvnia. Dollar-pegged coins (USDT, USDC, DAI and similar) are counted as 1 dollar: an approximation. You type the price of other coins yourself. The tax office sets no official price source: keep the downloaded detail as evidence.

Official sources (in Spanish): Spanish tax agency: Renta 2025 practical manual, virtual currencies · Spanish tax agency: Modelo 100 help, gains and losses on virtual currencies · BOE: Law 35/2006 on personal income tax, consolidated text

A result that does not add up, or a file that will not load?

Guidance tool only. It is not tax advice and does not replace an adviser. Check the figures before filing: you are responsible for your return.

Order a guide or ask a question

Tell us which guide you need or your question — we’ll get it and reply on Telegram.

No spam. This is not individual legal advice.

General information, not individual legal advice. Check the official source and consult a professional for your case.

Want to keep up with changes for foreigners in Spain?

One email every Tuesday. Free gift: the «Arraigo in Spain: the 5 types» guide (PDF). No spam · privacy

Have a question about your case?

Describe your situation and your questions — we study them and reply in writing. The first look is free.

Leave my questions →

If you prefer, also directly to @spain_asesor on Telegram (the form is better).

Get the free guide

Guide «Arraigo in Spain: the 5 types» (PDF), instantly

No spam · privacy

or on Telegram
Get it on Telegram

Can’t find what you need? Message us on Telegram →