Tax-Loss Harvesting Bitcoin as a Spanish Tax Resident: One FIFO Queue, a 25% Cap, and No Wash-Sale Rule as You Know It
If you learned tax-loss harvesting in the United States or the United Kingdom, most of what you know does not transfer to Spain. Losses net against gains, then against at most 25% of your savings income, then carry forward four years; the lot you sell is decided by a single FIFO queue across every wallet you own; and whether a quick buy-back kills the loss is a question Spain's tax authority has never answered in a binding ruling.
A hypothetical resident bought 0.5 BTC in 2023 at €40,000 per coin and another 0.5 BTC in 2025 at €100,000, each half in a different wallet; in December 2026, at an assumed €60,000, she sells the expensive half to book the loss. Spain's tax authority will not see a €20,000 loss on that sale: it will see a €10,000 gain. Round numbers, invented on purpose, and the rest of this piece explains why that happens here and would not happen in a specific-identification regime.
What Spain does differently, in one table
| Question | What English-language guides often assume | What Spain actually does |
|---|---|---|
| Which lot am I selling? | The one you identify | The oldest you own, anywhere (FIFO, per coin, per taxpayer) |
| Do losses offset ordinary income? | Sometimes, with a small annual allowance | Never. Only savings income, and only up to 25% of its positive balance |
| Is there a wash-sale rule? | Yes, 30 days, or no rule at all | A securities rule (2 months / 1 year) whose reach over Bitcoin is unsettled |
| How long do unused losses last? | Indefinitely in some regimes | Four tax years, applied at the maximum each year |
The table's point is not that Spain is stricter or looser: each of those four answers is a different mechanism, and importing the US or UK answer to any one of them produces a wrong number on a real return.
The offset cascade, and the 25% cap most guides misstate
The mechanism is article 49 of the IRPF law, as laid out in the Agencia Tributaria's Manual práctico de Renta 2025 [1], the latest edition published as this is written; the Renta 2026 manual comes out in 2027. Gains and losses from disposing of virtual currencies net against each other inside the savings base. A negative balance then offsets the positive balance of savings-income (rendimientos del capital mobiliario) for the same year, capped at 25% of that positive balance. Anything still left carries forward to the following four years, in the same order and at the maximum amount each of those years allows.
The 25% is a share of your savings income, not a share of your loss. One widely read English guide, Blockpit's Spain page [2], states that "you can only deduct up to 25% of your net loss per year", which inverts the rule; on €4,000 of interest the cap is €1,000 of loss, however large the loss is. Staking rewards count as savings income in the tax authority's own Renta virtual assistant [3], so they sit inside that pool. And the carry-forward is tracked in Annex C of the return for the year the loss arose: a loss you never declared has nothing to carry forward from unless you amend that return first.
One FIFO queue per coin, across every wallet and exchange
This is what breaks the opening example. The Renta manual [4] treats all units of one cryptocurrency as homogeneous goods and, on partial sales of units bought at different times and prices, deems "the ones acquired first" to be the ones sold. The Dirección General de Tributos went further in binding rulings V1604-18 and V0975-22, as summarised by Uría Menéndez [5] and Cuatrecasas [6]: buying and selling on different exchanges does not alter that homogeneity, so the computation is global across all the taxpayer's bitcoin. Blockpit's "account by account" tracking advice contradicts that criterion.
So our resident, selling 0.5 BTC from whichever wallet, disposes of the 2023 lot for tax purposes: €30,000 received minus €20,000 cost, a €10,000 gain. To surface the 2025 lot's loss she has to sell the whole bitcoin: €60,000 received minus €70,000 total cost, a €10,000 loss. There is no third option. Bitcoin and Ethereum are separate queues, since homogeneous means "same protocol"; within Bitcoin the queue is one. Spain's association of tax inspectors calls the incentive to shuffle coins between wallets before selling "very powerful" and argues for changing the rule [7]; until it changes, global FIFO is what you file under.
Two timing points. A crypto-to-crypto swap realizes a gain or loss just like a sale, valued at the higher of what you give and what you receive. And the loss belongs to the year the coins are delivered, per the same virtual assistant: an order placed on December 31 and settled on January 2 is a 2027 event.
The worked example, in round numbers
Same hypothetical resident. In 2026 she also has €3,000 of realized capital gains from an unrelated sale and €4,000 of interest from a deposit. She sells the whole bitcoin at €60,000.
| Step | Operation | Balance |
|---|---|---|
| 1 | Loss realized on Bitcoin | −€10,000 |
| 2 | Offset against 2026 capital gains (+€3,000) | −€7,000 |
| 3 | Offset against savings income: 25% of €4,000 | −€6,000 |
| 4 | Carried forward to 2027, 2028, 2029 and 2030 | −€6,000 |
Read it this way: she pays nothing on the €3,000 gain, is taxed on €3,000 of interest instead of €4,000, and carries €6,000 forward that only helps if she realizes gains or savings income in those four years. Had she sold only the expensive half, step 1 would read +€10,000 and the rest of the table would not exist.
The repurchase question: what the law says about securities, and what nobody has settled for Bitcoin
Anyone harvesting a Bitcoin loss usually wants to keep owning Bitcoin, so this is the section that decides whether the exercise works. Article 33.5 of the IRPF law, in the tax authority's own reading [8], defers a loss in three cases: listed securities when homogeneous securities are bought within two months before or after the sale (letter f), unlisted securities with a one-year window (letter g), and any other asset the seller buys back within the following year (letter e). Deferred, not lost: the loss is recognized when the repurchased asset is finally disposed of. The consolidated law is on the BOE [9]. Note what is absent: there is no 30-day window, no "substantially identical" test, and the rule is symmetric around the sale for securities, catching a purchase made before you sold.
Which letter applies to Bitcoin is genuinely unsettled, and that is not our opinion. In ruling V0525-25, as reported by Primera Lectura [10], the DGT held that cryptocurrencies are homogeneous goods but not "homogeneous securities" under the IRPF regulation, because they are not securities issued by an entity; read literally, that takes letters f) and g) off the table. That leaves letter e), where Cuatrecasas notes that if "the repurchased asset must be strictly the same asset", the rule "will rarely apply" to cryptocurrencies. Against all of that, the Agencia Tributaria added a checkbox to its 2022 filing software titled, in translation, "non-recognition of losses from repurchase of homogeneous virtual currencies", with no mention of it in that year's manual, as documented by FiscalBlog [11] and Zadal [12]; we could not confirm whether it survives in later versions. And the Basque province of Bizkaia enacted an explicit two-month rule for fungible crypto-assets in December 2025 (Norma Foral 6/2025 [13], published December 15), which tells you what the common-territory law does not spell out.
Some English guides for Spain state a two-month crypto rule as settled fact without citing a source; others omit it entirely. Both are incomplete. If you sell at a loss and buy back within weeks, there is a real risk the administration defers the loss, and a reasonable technical defence that it cannot. Weighing those two for your situation is what you pay an adviser for.
Before you meet your asesor
What decides the outcome is the record: every Bitcoin purchase since your first, with date, amount and euro cost, in one chronological list regardless of wallet; every 2026 sale and swap with its market value; and the year's gains and savings income to net against. With that, an adviser can rebuild the FIFO queue, measure how much loss actually surfaces, and take a position on the repurchase question knowing your risk tolerance.
What no software can do for you, and neither can we, is tell a real sale from a transfer between your own wallets with certainty, the limit we already explained in the tax guide and the reason this project publishes no calculator. Nothing here is tax advice or a recommendation to sell or buy: it is a map of the mechanism with its sources attached, so the conversation with a professional starts from the right questions.
December 31 fixes the deadline, not the price you sell at: that's still whatever the Market page [14] shows that day, the same feed you'd check any other day of the year.
Sources
Labelled by type.
- Spanish Tax Agency (AEAT), Manual práctico de Renta 2025. (Primary, official)
- Blockpit, Blockpit's Spain page. (Secondary, tax software company)
- Spanish Tax Agency (AEAT), Renta virtual assistant. (Primary, official)
- Spanish Tax Agency (AEAT), Renta manual. (Primary, official)
- Uría Menéndez, Uría Menéndez. (Secondary, law firm)
- Cuatrecasas, Cuatrecasas. (Secondary, law firm)
- No Solo Impuestos, argues for changing the rule. (Secondary, tax blog)
- Spanish Tax Agency (AEAT), tax authority's own reading. (Primary, official)
- Spanish Official State Gazette (BOE), on the BOE. (Primary, official)
- Primera Lectura Ediciones, reported by Primera Lectura. (Secondary, publisher)
- Fiscal Blog, FiscalBlog. (Secondary, tax blog)
- Zadal, Zadal. (Secondary, advisory firm)
- Provincial Council of Bizkaia, Norma Foral 6/2025. (Primary, official)
- NodeWitness, our own data, verifiable on the Market page. (Primary, own data)
Start that conversation with the raw movements in hand: the address analyzer lists what went in and out of any address of yours this year. It computes no tax and cannot tell which wallets are yours, but it gives your adviser the transaction list the FIFO queue has to be rebuilt from.
More in Price and market
Last updated: October 29, 2026