---
title: "Spain crypto tax calculator 2026: FIFO, swaps, Modelo 721"
description: "Selling 0.4 BTC in 2025 for €36,000, bought for €16,016 (FIFO, fees in), gives a €19,954 gain and €4,070 of tax in Spain. Paste your trades for yours."
url: "https://borbur.net/tools/spain-crypto-tax-calculator/"
language: "en"
author: "Borja Burguillos"
date_modified: "2026-11-27T18:00:00+04:00"
alternate_es: "https://borbur.net/es/herramientas/calculadora-impuestos-criptomonedas/"
---

Free tool · Spain, 2026

# Spain crypto tax calculator: your gains with FIFO and the tax on them

By [Borja Burguillos](https://borbur.net/about/) · Updated 27 November 2026

## In short

Paste your crypto trades, or open a CSV file, and the calculator works out the gain or loss on every sale and swap with the first-in, first-out (FIFO) method that Spain’s tax authorities apply across all wallets and exchanges. Crypto-to-crypto swaps count as disposals at market value, and fees add to the cost of a purchase and reduce the proceeds of a sale. It then applies the 2026 savings-base scale, from 19% to 30%, and checks whether crypto held with providers abroad must go on Modelo 721. Everything runs in your browser: your trades are not sent anywhere. The figure is an estimate for the common regime, not tax advice.

*Interactive calculator: open the page in a browser to use it.*

## Go deeper in the book

Go deeper in the book

### [Why Bitcoin Had to Exist](https://borbur.net/books/why-bitcoin-had-to-exist/)

The story of broken money

[Buy in English](https://www.amazon.com/dp/B0GMX929H3) · [Buy in Spanish](https://www.amazon.es/dp/B0GNNYG5DD)

[About the book](https://borbur.net/books/why-bitcoin-had-to-exist/)

## Key facts

- **Method:** First in, first out (FIFO) per crypto, across all your wallets and exchanges
- **What is taxed:** Sales for euros and crypto-to-crypto swaps, at market value; holding is not taxed
- **Scale 2026:** 19% to €6,000; 21% to €50,000; 23% to €200,000; 27% to €300,000; 30% above
- **Fees:** Add to the cost of purchases and reduce the proceeds of sales
- **Modelo 721:** Crypto with providers abroad over €50,000 on 31 December; filed by 31 March
- **Your data:** Calculated in your browser. Nothing is uploaded or stored

## How to use it

### 1. Export your trades

Download the history of trades from each exchange, or use the template. You need, for every trade: the date, the type (buy, sell or swap), the crypto, the amount, its value in euros and the fee in euros.

### 2. Put them together

Paste all the trades from every exchange and wallet in one list. FIFO applies across all of them, so the oldest coins you bought anywhere are the first you sell.

### 3. Choose the year

The calculator shows the gains and losses of that year, the tax by band, what you still hold and, if you enter your balance abroad, whether Modelo 721 applies.

## How the calculation works

Spain taxes a crypto gain when you dispose of the coins: when you sell them for euros, swap them for another crypto or pay with them. The gain is the value received minus what the coins cost. Fees on the purchase add to the cost and fees on the sale reduce what you received. In a swap, the crypto you receive starts with a cost equal to its market value on that day.

To know what the coins you sold cost, Spain’s Directorate General of Taxes (DGT), part of the Ministry of Finance, applies first in, first out across all your wallets and exchanges: the first coins you bought are the first you sell. The calculator keeps a queue of purchases per crypto and takes from the oldest. The Basque High Court has ruled that FIFO does not bind under Basque rules, so the calculator covers the common regime only.

Net gains go to the savings base, taxed in 2026 at 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above. Crypto held with providers outside Spain worth more than €50,000 on 31 December goes on Modelo 721, filed by 31 March, and again when the balance rises by more than €20,000. Spanish providers report your balances on Modelos 172 and 173, and from 2026 EU providers report them under DAC8.

The rules explained, step by step: [How bitcoin is taxed in Spain in 2026](https://borbur.net/topics/bitcoin-tax-spain/) · [Spain investment tax calculator](https://borbur.net/tools/spain-investment-tax-calculator/)

Sitting on a loss? What to do before 31 December for it to count on the 2026 return: [Crypto losses and tax in Spain, 2026](https://borbur.net/topics/spain-crypto-losses-tax-2026/)

## Questions

How is crypto taxed in Spain in 2026?

Gains from selling or swapping crypto are savings income, taxed at 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above. Holding crypto is not taxed as income.

Are crypto-to-crypto swaps taxed in Spain?

Yes. Swapping bitcoin for ether, for example, is a disposal: the gain is the market value of what you receive minus what the bitcoin cost, even if no euros change hands.

Which method does Spain use for crypto cost: FIFO or average?

FIFO, first in first out, applied per crypto across all your wallets and exchanges, according to the Directorate General of Taxes. The Basque Country is an exception after a ruling of its High Court.

Do I need to file Modelo 721 for my crypto?

Only if crypto you hold with providers outside Spain was worth more than €50,000 on 31 December. Crypto in your own wallet does not go on it. After the first filing, you file again when the balance rises by more than €20,000.

Can I offset crypto losses in Spain?

Yes. In the same year, losses are set against other gains, and a net loss against up to 25% of interest and dividends. What is left can be used in the next four years.

Does the calculator upload my trades?

No. The calculation runs in your browser. The trades you paste or open are not sent to any server and are not stored.

## Quote or link to this page

Free to quote. Please credit Borja Burguillos and link to this page. Copy the key figure, a ready-made link or a citation:

### Key figure to quote

> Selling 0.4 BTC in 2025 for €36,000, bought for €16,016 (FIFO, fees in), gives a €19,954 gain and €4,070 of tax in Spain.

### Link for your page (HTML)

### Citation

## Sources

1. [Raisin, Tramos del IRPF 2025-2026: escala de la base del ahorro](https://www.raisin.com/es-es/tributacion/declaracion-de-la-renta/tramos-irpf/)
2. [Cuatrecasas, Criptomonedas: el método FIFO y la Hacienda foral (28 de febrero de 2025)](https://www.cuatrecasas.com/es/spain/fiscalidad/art/criptomonedas-metodo-fifo-hacienda-foral)
3. [Guía Fiscal, Cómo sabe Hacienda que tienes criptomonedas (modelos 172, 173 y 721, DAC8, consultas DGT)](https://guiafiscal.es/irpf/como-sabe-hacienda-que-tienes-criptomonedas/)
4. [OCU, Criptomonedas en el extranjero: hasta el 31 de marzo para presentar el modelo 721 (25 de marzo de 2026)](https://www.ocu.org/inversiones/fiscalidad-y-derechos/impuestos/articulos/2026/03/criptomonedas-en-el-extranjero-hasta-el-31-de-marzo-para-presentar-el-modelo-721)
5. [Agencia Tributaria, Manual práctico de Renta 2025: compensación de partidas negativas de la base del ahorro](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-ayuda-presentacion/irpf-2025/8-cumplimentacion-irpf/8_1-base-imponible-general-base-ahorro/8_1_4-compensaciones-partidas-negativas-base-ahorro.html)
6. [TaxDown, DAC8: qué es y cómo funciona](https://taxdown.es/criptomonedas-declaracion-renta/dac8-que-es-como-funciona)

Updated: 27 November 2026

## More books

[Book**Why Bitcoin Had to Exist**The story of broken money](https://borbur.net/books/why-bitcoin-had-to-exist/) · [Book**Stablecoins for a Better World**Financial inclusion and social good](https://borbur.net/books/stablecoins-for-a-better-world/) · [Book**Beyond the Game**Web3 and the future of sports](https://borbur.net/books/beyond-the-game/) · [Coming soon**España, caballo ganador**Change the incentives and you change the country](https://borbur.net/books/espana-caballo-ganador/)

## [Borja Burguillos](https://borbur.net/about/)

Borja writes for people who want to understand money and incentives without the jargon. Born in Madrid and based in Dubai since 2012, he has advised companies on people and pay, built tech startups, and co-chairs the People & Organisation Committee at the Middle East Stablecoin Association.

WorldatWork Total Rewards and CAIA certified, CFA Investment Foundations, executive programmes at Wharton and IE Business School.

[X @Borbur](https://x.com/Borbur) · [LinkedIn](https://www.linkedin.com/in/borjaburguillos) · [Telegram](https://t.me/borbur) · [YouTube](https://www.youtube.com/@BorjaBurguillos)

---
Source: https://borbur.net/tools/spain-crypto-tax-calculator/ · By Borja Burguillos (borbur.net). Index of all pages: https://borbur.net/llms.txt
