Free tool · Spain, 2026

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

By · Updated

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.

Calculate your crypto tax

Calculator by Borja Burguillos · open the full version on borbur.net ↗

Go deeper in the book

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 · 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

Embed this calculator

Free to use on your website or blog. Copy the code below and paste it into your page’s HTML. Please keep the credit link.

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
  2. Cuatrecasas, Criptomonedas: el método FIFO y la Hacienda foral (28 de febrero de 2025)
  3. Guía Fiscal, Cómo sabe Hacienda que tienes criptomonedas (modelos 172, 173 y 721, DAC8, consultas DGT)
  4. OCU, Criptomonedas en el extranjero: hasta el 31 de marzo para presentar el modelo 721 (25 de marzo de 2026)
  5. Agencia Tributaria, Manual práctico de Renta 2025: compensación de partidas negativas de la base del ahorro
  6. TaxDown, DAC8: qué es y cómo funciona

Updated:

Free tools

Calculators built on the official rules, with their sources. Free, no sign-up.

See all free tools →

More books

Guides

How bitcoin is taxed in Spain in 2026When bitcoin is taxed in Spain, the 19% to 30% scale, crypto-to-crypto swaps, FIFO and the Modelo 721.What is Bitcoin, and why does it exist?What it is, who made it, and why a money with fixed rules had to exist.Bitcoin from zero: a free course in six short lessonsA free course in six short lessons: what Bitcoin is, transactions, wallets, safety, scams and tax in Spain.Can you be paid your salary in crypto or stablecoins?Can your salary be paid in crypto or stablecoins? The rules in the UAE and Spain.What are stablecoins, and why do they matter?Digital dollars: how they hold their value, why they matter and the rules arriving.Money and pay: why money loses value and how pay is changingInflation, total rewards, pay transparency and what digital money changes for HR.Web3 and the business of sportFan tokens, crypto sponsorship and prediction markets: how money is changing sport.The best books to understand Bitcoin, for beginnersThe best books to understand Bitcoin, from first steps to the technical detail.The best books on stablecoinsThe best books and reports to understand stablecoins, from inclusion to regulation.Which banks are launching stablecoins, and what does it mean for you?Qivalis, Santander, BBVA, CaixaBank: which banks are launching stablecoins, and what it means for customers.Books on Web3 and sport: what to read firstThe few books worth reading on Web3, fan tokens and the business of sport, and what each one is for.Stablecoins in the UAE: what is allowed, who issues them and what it means for youWhat the UAE allows, who regulates it, and the first dirham stablecoins: AE Coin, DDSC and RAKBank.Open lists in Spain: how Spaniards vote today, and what would changeHow Spaniards vote for Congress and the Senate today, and what open lists would change.How does the D’Hondt method work? Spain’s seat formula, step by stepHow Spain turns votes into seats, with a worked example, and why the province matters more than the formula.How to vote from abroad in Spain’s 29 November 2026 electionHow Spaniards living abroad vote on 29 November 2026: the consulate urn, postal vote and deadlines.How many votes does a seat cost in Spain? Province by province, 29 November 2026How many voters stand behind each seat in Congress, province by province, for 29 November 2026.Postal vote for 29 November 2026: send it by 25 NovemberPostal vote for 29 November 2026: the request closed on 19 November. If you requested it, send it at Correos by 25 November.Polling station duty on 29 November 2026: pay, hours and time offCalled to sit on a polling station on 29 November 2026? Pay, hours, time off work and what to do if you cannot go.Can stablecoins make sending money home cheaper?Do stablecoins make sending money home cheaper? What the World Bank and IMF data show.How pay works in the UAE: basic salary, allowances and gratuityBasic salary, allowances, gratuity, no income tax: what a UAE pay package really means.Can you pay salaries in stablecoins? What the law allows in the UAE, Spain, the US and the UKCan a company pay salaries in stablecoins? What the law allows in the UAE, Spain, the US and the UK, the models that work and who carries the currency risk.Take-home pay index 2026: how much of your salary you keep in nine countriesHow much of a $40,000 to $250,000 salary you keep in nine countries, under 2026 rules.Spain vs Dubai salary 2026: what you keep, and the Spanish salary that matches DubaiWhat the same salary leaves in Spain and in Dubai, and the Spanish salary that matches a Dubai one.How AI is changing the job market: what the major reports sayWhat the WEF, IMF, ILO, Stanford and PwC data say about AI, jobs and pay.Will Bitcoin be the money of AI agents? How machines pay, and what is still missingAI agents are starting to pay for things. Cards, stablecoins and Bitcoin compared as money for machines.Why does Bitcoin go up and down so much?Fixed supply, big funds, interest rates and leverage: why Bitcoin’s price swings so much.How a Bitcoin transaction works, step by stepWhat happens between pressing send and the payment being final: the queue, the fee, the block and the confirmations.What is a Bitcoin wallet? Keys, seed phrase and custodyA wallet does not hold coins: it holds keys. What the seed phrase is, and custody by an exchange versus your own.How to keep bitcoin safe: six habits for beginnersSix habits that protect bitcoin: the seed phrase on paper, never online, small tests, updates and a plan for your family.Bitcoin scams: the most common ones and how to spot themThe most common bitcoin scams, what they have in common, and how to check a platform before you send money.Token compensation explained: grants, vesting, lockups and taxHow token grants, vesting, cliffs and lockups work, how they differ from shares, and when they are taxed.Jobs in stablecoins and digital money: the roles, the levels and how to get hired (2026)The five job families stablecoins create, four levels each, what US, EU and UAE rules require, what the roles pay and how to get hired.Crypto salary 2026: what stablecoin and crypto jobs pay, and how to price them when there is no marketWhat stablecoin and crypto jobs pay in 2026, why the published numbers disagree, and a six-step method to set fair pay.The vanishing analyst: is AI really cutting junior finance jobs?Is AI really cutting junior finance jobs? The measured data, the claims nobody measured, and why the bigger cost comes later.Don’t retire your veterans: why risk judgement is the scarcest skill in digital moneyWhy stablecoins failed so far: reserves and risk, not code. And why the people who know those risks are the scarcest talent in digital money.Who owns the stablecoin? How a bank should organise the team that issues oneHow a bank should organise the company that issues its stablecoin: the legal vehicle, the org chart, the roles to keep in-house and a team that never closes.Measuring people when AI does the work: what performance reviews should reward nowPerformance reviews still count what AI agents now produce in seconds. What managers say, why self-reports mislead, and a five-part scorecard.Finance education is behind digital money: what bankers, lawyers, accountants and treasurers should learn by 2027The rules for digital money are now detailed; the syllabus is still introductory. What bankers, lawyers, accountants and treasurers should learn by 2027.The Gulf’s chance: why the UAE could train digital-money talent faster than London or New YorkThe UAE’s stablecoin rules came two to three years before London’s and the US federal regime. Why that head start could make it the place where people learn to run regulated money.The CHRO’s digital-money playbook: 10 questions to answer before 2027The 10 questions an HR leader should answer before 2027 on jobs, pay, payroll, pay transparency, AI and skills, with a free readiness check.What could go wrong with digital money? Three scenarios and what HR should do in eachThree scenarios for stablecoins and the people who run them: adoption stalls, AI hollows out the roles, the rules split. The signals to watch and what HR should do.Paid in a dollar stablecoin: who carries the exchange-rate risk?If part of the pay is a dollar stablecoin, who carries the exchange-rate risk: the employer or the employee? Four designs, with examples.Financial literacy at work: why digital money makes it HR’s jobOnly a third of adults reach the OECD’s minimum level of financial literacy. Why digital money makes it an HR question, and what a basic programme covers.Digital money for HR: the glossary (60 terms)60 terms in plain English, from stablecoin and multi-issuance to token grants and pay gap reports, each with why it matters for HR.Spain’s minimum wage in 2027: €1,286 a month, and how much you take home€1,286 a month in 14 payments from 1 January 2027, €18,004 a year, and no income tax. Gross to net, 12 or 14 payments, and who is affected.How much will Spanish pensions rise in 2027? 3.5%, with the CPI month by monthPensions rise with the average CPI from December 2025 to November 2026. With November’s flash estimate at 4.1%, that is 3.5%. Table and examples.Spain’s Christmas extra pay 2026: when it is paid, how it is calculated and the net amount by salaryWhen December’s extra payment arrives, how it is calculated and what is left after tax: €1,791 net on a €30,000 salary. Table by salary.Crypto losses in Spain: how to offset them on your tax return before 31 December 2026A crypto loss only counts for 2026 if you sell by 31 December. What it offsets, the 25% limit, the four years and the buy-back rule, with a table.How to pay less income tax in Spain before 31 December 2026: seven moves and what each one savesSeven moves that only count on the 2026 return if they happen by 31 December: pension plan, donations, pre-2013 mortgage, electric car, charger, energy works and solar.Does my employer in Spain have to raise my pay with inflation? The five cases, and how much you need in 2026No law ties pay to the CPI. The minimum wage, your collective agreement or your contract can. A table of the five cases, and what 4.1% inflation does to a €30,000 salary.What are fan tokens? How they work, what they give you, and what they have done to fans’ moneyA vote in small club decisions and some perks, bought with crypto. Not a share. Seven big tokens have lost more than 98% since 2021: the table, the rules and the tax.UAE gratuity after a salary cut: old or new basic salary? The five cases, and what a cut costsGratuity uses your last basic salary. A cut you signed and MoHRE registered lowers it for all your years; one you never agreed to may not count. The five cases and what a 20% cut costs.Can employees be paid in crypto or stablecoins in the UAE? (2026)Can employees be paid in crypto or stablecoins in the UAE? Labour law, the Wage Protection System, the Central Bank’s rules and the Dubai court rulings, in one table.Who is responsible when an AI agent gets it wrong?An AI agent cannot be held to account, so the company is. The Air Canada case, the UAE and EU rules, and five things every agent needs.Tax on salaries in 2026: what an employee keeps in 20 countriesHow much of €30,000, €60,000 and €120,000 an employee keeps in 20 countries, the full tax wedge, and the same comparison at purchasing power.AI makes everything cheaper. So why is your money worth less?AI is making almost everything cheaper to produce. So why does your money buy less every year? Spain and Dubai, in numbers.Insurance is a promise in money. What happens when the money changes?Is blockchain reinventing insurance? The first wave failed. What is new is bitcoin as the money of the promise, from Bermuda to Dubai.Your first HR hire in a UAE start-up: when you need one, what it costs, and what goes wrong without itWhen a UAE start-up needs its first HR person, what a full-time Head of People costs, and the legal duties that start at employee one.UAE vs UK: what an employee really costs the employer in 2026On the same salary, a UK employer pays about 16% on top and a UAE employer about 3.5% for an expat. Why the gap is smaller for a start-up’s first hires.Spain vs Portugal: what an employee costs the employer in 2026Portugal is cheaper to employ in up to about €80,000 a year; above that, Spain is, because only Spain caps contributions. Figures by salary, 2026.Germany vs Netherlands: what an employee costs the employer in 2026A German employer pays 21.3% on top of salary, a Dutch one 15.61%, and the Dutch ceiling is lower. On €100,000 the gap is €5,713 a year.US vs Canada: what an employee costs the employer in 2026Canada’s payroll charges stop at about CAD 6,219 a year per employee; the US charges 7.65% up to $184,500. On $150,000 the gap is $7,340.UAE vs Singapore: what an employee costs the employer in 2026For a foreign hire Singapore costs almost nothing on top; the UAE about 3.5%. For a local hire it flips above about USD 85,000. Figures for 2026.Spain vs UAE: what an employee costs the employer in 2026On a €60,000 salary a Spanish employer pays €18,390 a year on top; a UAE employer about €2,100 for an expat. Where the gap comes from, 2026.Employee health insurance in the UAE: what companies must pay in 2026, emirate by emirateWho a UAE employer must insure in Dubai, Abu Dhabi and the Northern Emirates, what it costs per employee, and the fines.How much does it cost to relocate an employee abroad? (2026)The move, the package and the tax: what moving an employee abroad really costs, with a London to Dubai example and what the mobility firms report.
Portrait of Borja Burguillos

Borja Burguillos

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.