Not tax advice. Computation tools only. Have a professional check your work before filing.
openaccountants/skills/spain-crypto-tax.md

Use this skill with your AI agent

View on GitHub

Paste this skill into your AI agent's context, or save the file to your project. Works with any AI agent that reads markdown.

spain-crypto-tax.md408 lines19.9 KB
v10Spain
Not yet verified by an accountantContact accountant
1---
2name: spain-crypto-tax
3description: >
4 Use this skill whenever asked about Spain cryptocurrency or digital asset taxation. Trigger on phrases like "crypto tax Spain", "Bitcoin Spain", "criptomonedas IRPF", "cryptocurrency gains Spain", "crypto income Spain", "staking Spain", "mining income Spain", "NFT tax Spain", "Modelo 721", "Modelo 100 crypto", "rentas del ahorro crypto", "base del ahorro", "AEAT crypto", "Binance Spain tax", "Coinbase Spain tax", "Revolut crypto Spain", "DeFi tax Spain", "Hacienda crypto", "declaración renta criptomonedas", or any question about the income tax, capital gains, or VAT treatment of cryptocurrency, tokens, or digital assets for Spanish tax residents or Spain-source crypto income. Covers IRPF savings base taxation, Modelo 721 foreign crypto reporting, FIFO cost basis, Ley 11/2021 anti-fraud provisions, and DAC8 reporting. ALWAYS read this skill before touching any Spain crypto work.
5version: 1.0
6jurisdiction: ES
7tax_year: 2025
8category: crypto
9depends_on:
10 - spain-income-tax
11verified_by: pending
12---
13 
14# Spain Crypto / Digital Assets Tax Skill v1.0
15 
16---
17 
18## Section 1 — Quick Reference
19 
20| Field | Value |
21|---|---|
22| Country | Spain (Reino de España) |
23| Tax | IRPF — Impuesto sobre la Renta de las Personas Físicas |
24| Currency | EUR (all values must be in EUR at transaction date) |
25| Tax year | Calendar year (1 January – 31 December) |
26| Primary authority | Ley 35/2006 del IRPF; Ley 11/2021 de medidas de prevención y lucha contra el fraude fiscal; Ley 7/2024 (savings base rate update) |
27| Regulatory framework | Real Decreto 249/2023 (Modelos 172, 173); Orden HFP/886/2023 (Modelo 721) |
28| Tax authority | Agencia Estatal de Administración Tributaria (AEAT / Hacienda) |
29| Filing portal | Sede Electrónica AEAT (sede.agenciatributaria.gob.es), Renta WEB |
30| IRPF filing deadline | 1 April – 30 June of the following year |
31| Modelo 721 filing deadline | 1 January – 31 March of the following year |
32| EU reporting | DAC8 / CARF — crypto platforms report user data from 2026; Spanish exchanges already report via Modelos 172/173 since 2024 |
33| Validated by | Pending — requires sign-off by a Spanish asesor fiscal or economista |
34| Skill version | 1.0 |
35 
36### Crypto Classification Under IRPF
37 
38| Activity | IRPF Classification | Tax Base |
39|---|---|---|
40| Buying/selling crypto for fiat | Ganancia/pérdida patrimonial (capital gain/loss) | Base del ahorro (savings) |
41| Crypto-to-crypto swap (permuta) | Ganancia/pérdida patrimonial | Base del ahorro (savings) |
42| Staking / lending / yield farming rewards | Rendimiento del capital mobiliario | Base del ahorro (savings) |
43| Airdrops (no service rendered) | Ganancia patrimonial no derivada de transmisión | Base general (general base) |
44| Mining — occasional | Ganancia patrimonial | Base general (general base) |
45| Mining / trading — habitual (actividad económica) | Rendimiento de actividades económicas | Base general (general base) |
46| Payment for goods/services in crypto | Disposal at market value — ganancia patrimonial | Base del ahorro (savings) |
47 
48### Conservative Defaults
49 
50| Ambiguity | Default |
51|---|---|
52| Unknown whether habitual trading or occasional | Treat as occasional (savings base) unless clear business indicators |
53| Unknown cost basis | STOP — cannot compute gain without acquisition cost |
54| Unknown whether foreign or Spanish exchange | Assume foreign — check Modelo 721 obligation |
55| Unknown residency status | STOP — affects worldwide vs source taxation |
56| Unknown whether staking reward or airdrop | Treat as staking reward (savings base — rendimiento del capital mobiliario) |
57 
58---
59 
60## Section 2 — Required Inputs and Refusal Catalogue
61 
62### Required Inputs
63 
64**Minimum viable** — transaction history from exchange(s) or wallet(s), confirmation of Spanish tax residency, and indication of whether activity is occasional investment or habitual trading.
65 
66**Recommended** — full CSV exports from all exchanges used (Binance, Coinbase, Kraken, Bit2Me, Revolut, etc.), wallet addresses with on-chain history, cost basis records for each acquisition, record of staking/lending/mining activity, and Modelo 721 filing history.
67 
68**Ideal** — complete portfolio tracker export (e.g. CoinTracking, Koinly, TaxDown), DeFi protocol interaction history, NFT purchase/sale records, AEAT borrador pre-populated data for cross-checking, and documentation of any token airdrops received.
69 
70### Refusal Catalogue
71 
72**R-ESC-1 — Residency unknown.** "Spain taxes worldwide income of tax residents. Non-residents are only taxed on Spain-source income. Cannot proceed without confirming tax residency status."
73 
74**R-ESC-2 — No transaction records.** "Crypto tax computations require detailed transaction records with dates, amounts, and counterparties. AEAT applies FIFO method across ALL exchanges — without complete records, gains cannot be calculated. Cannot proceed."
75 
76**R-ESC-3 — Corporate crypto holdings.** "Companies holding crypto (Impuesto sobre Sociedades) have different accounting and tax treatment. This skill covers individuals (IRPF) only. Escalate to an asesor fiscal."
77 
78**R-ESC-4 — Actividad económica classification disputes.** "Whether crypto activity constitutes a business (actividad económica) under Article 27 LIRPF has complex indicators including regularity, infrastructure, and intent. Escalate to a qualified professional."
79 
80**R-ESC-5 — Cross-border DeFi/DAO structures.** "Complex DeFi arrangements involving multiple jurisdictions, DAOs, or governance tokens require specialist international tax advice. Escalate."
81 
82---
83 
84## Section 3 — Rate Tables
85 
86### 3.1 Savings Base (Base del Ahorro) — Rates for 2025
87 
88Crypto capital gains and investment income are taxed at progressive rates on the savings base. Rates updated by Ley 7/2024 effective 1 January 2025.
89 
90| Taxable Savings Income | Rate | Cumulative Tax |
91|---|---|---|
92| First €6,000 | 19% | €1,140 |
93| €6,001 – €50,000 | 21% | €10,380 |
94| €50,001 – €200,000 | 23% | €44,880 |
95| €200,001 – €300,000 | 27% | €71,880 |
96| Over €300,000 | 30% | — |
97 
98**Citation:** Ley 7/2024, disposición final séptima, modifying Article 66 LIRPF. Confirmed by AEAT Manual de Renta 2025.
99 
100**Note:** The top rate was increased from 28% to 30% by Ley 7/2024 effective 1 January 2025. The combined rate includes both the state portion (cuota íntegra estatal) and the autonomous community portion (cuota íntegra autonómica).
101 
102### 3.2 General Base (Base General) — Progressive Rates for 2025
103 
104Applies to airdrops (not derived from a transfer), mining income if occasional, and habitual trading classified as actividad económica.
105 
106| Taxable General Income | Marginal Rate (approx. combined) |
107|---|---|
108| Up to €12,450 | 19% |
109| €12,451 – €20,200 | 24% |
110| €20,201 – €35,200 | 30% |
111| €35,201 – €60,000 | 37% |
112| €60,001 – €300,000 | 45% |
113| Over €300,000 | 47% |
114 
115**Note:** Exact rates vary by autonomous community. Rates shown are approximate combined state + CCAA.
116 
117### 3.3 Wealth Tax (Impuesto sobre el Patrimonio)
118 
119Crypto holdings count toward net wealth. National threshold: €700,000 exemption (plus €300,000 for primary residence). Rates from 0.2% to 3.5% depending on CCAA. Madrid and Andalusia effectively exempt via 99-100% bonification. Catalonia and Valencia apply full rates.
120 
121**Impuesto Temporal de Solidaridad de Grandes Fortunas (ITSGF):** Net wealth > €3 million taxed at 1.7%–3.5% regardless of CCAA bonifications. Applies 2022–2024; check status for 2025.
122 
123---
124 
125## Section 4 — Cost Basis Methods
126 
127### 4.1 FIFO — Mandatory
128 
129| Method | Status |
130|---|---|
131| FIFO (First In, First Out) | **Mandatory** — required by AEAT per DGT consulta V1604-18 |
132| LIFO | NOT permitted |
133| Average cost | NOT permitted |
134| Specific identification | NOT permitted |
135 
136**Critical rule:** FIFO must be applied **per type of homogeneous cryptocurrency** (e.g. all BTC, all ETH) and **consolidated across all exchanges and wallets**. You cannot apply FIFO per exchange — it must be a single global FIFO queue per coin.
137 
138### 4.2 Cost Basis Components
139 
140The acquisition cost (valor de adquisición) includes:
141- Purchase price in EUR (converted at exchange rate on acquisition date)
142- Exchange fees, commissions, and spreads paid on acquisition
143- Network/gas fees directly attributable to the acquisition
144 
145The disposal value (valor de transmisión) includes:
146- Sale proceeds in EUR (or market value of asset received in a swap)
147- Less: exchange fees, commissions paid on disposal
148 
149### 4.3 Crypto-to-Crypto Swaps (Permutas)
150 
151Every crypto-to-crypto swap is a **taxable event** (permuta under Article 37.1.h LIRPF). AEAT treats it as a simultaneous disposal of the outgoing crypto and acquisition of the incoming crypto.
152 
153- Disposal value = market value of the crypto received at the time of the swap
154- Acquisition cost of new crypto = same market value (plus any fees)
155- Gain/loss = disposal value minus FIFO cost basis of the outgoing crypto
156 
157---
158 
159## Section 5 — DeFi, Staking, Mining, and Airdrop Treatment
160 
161### 5.1 Staking and Lending Rewards
162 
163| Type | Treatment | Tax Base |
164|---|---|---|
165| Staking rewards (PoS validation) | Rendimiento del capital mobiliario | Base del ahorro — 19%–30% |
166| Lending interest (Aave, Compound, etc.) | Rendimiento del capital mobiliario | Base del ahorro — 19%–30% |
167| Yield farming rewards | Rendimiento del capital mobiliario | Base del ahorro — 19%–30% |
168| Liquidity mining tokens | Rendimiento del capital mobiliario (if passive) or ganancia patrimonial | Context-dependent |
169 
170- Taxable at market value in EUR on receipt date
171- Cost basis of received tokens = market value at receipt (for future disposals)
172 
173### 5.2 Mining
174 
175| Scenario | Treatment | Tax Base |
176|---|---|---|
177| Occasional / hobby mining | Ganancia patrimonial no derivada de transmisión | Base general — progressive rates 19%–47% |
178| Habitual / commercial mining (actividad económica) | Rendimiento de actividades económicas | Base general — progressive rates, plus alta en Modelo 036, epígrafe IAE 831.9, and RETA registration |
179 
180Indicators of actividad económica: regular mining operation, dedicated hardware, systematic approach, intent to generate ongoing income (per Article 27 LIRPF).
181 
182### 5.3 Airdrops
183 
184| Type | Treatment |
185|---|---|
186| Gratuitous airdrop (no action required) | Ganancia patrimonial no derivada de transmisión — base general at progressive rates |
187| Airdrop for service (sign-up, referral, task) | Ganancia patrimonial no derivada de transmisión — base general |
188 
189- Taxable at market value on receipt
190- Cost basis for future disposal = market value at receipt
191 
192### 5.4 Hard Forks
193 
194No specific AEAT guidance. Conservative treatment:
195- Cost basis of original coin: unchanged
196- Cost basis of forked coin: €0
197- Subsequent disposal: full proceeds treated as gain
198 
199---
200 
201## Section 6 — NFT Treatment
202 
203NFTs are treated as crypto-assets under Spanish tax law. No separate regime exists.
204 
205| Activity | Treatment |
206|---|---|
207| Purchase of NFT with crypto | Disposal of crypto (taxable event) + acquisition of NFT |
208| Sale of NFT for fiat | Capital gain/loss on savings base |
209| Sale of NFT for crypto | Permuta — taxable at market value |
210| Creation and sale of NFT (artist) | Actividad económica if habitual — base general |
211| NFT royalties | Rendimiento del capital mobiliario or actividad económica depending on regularity |
212 
213FIFO applies if you hold multiple identical NFTs (e.g. editions from the same collection).
214 
215---
216 
217## Section 7 — Reporting Requirements
218 
219### 7.1 Modelo 100 — Annual IRPF Return
220 
221| Section | Content |
222|---|---|
223| Casillas 1800–1814 | Ganancias y pérdidas patrimoniales por transmisión de monedas virtuales — detail each transaction: acquisition date, disposal date, acquisition value, disposal value |
224| Casilla 0031 | Rendimientos del capital mobiliario (staking, lending rewards) |
225| Casilla 0304/0305 | Pérdidas patrimoniales to offset (if applicable) |
226 
227**Filing:** 1 April – 30 June of the following year via Renta WEB.
228 
229### 7.2 Modelo 721 — Foreign Crypto Declaration
230 
231| Requirement | Detail |
232|---|---|
233| Obligation | Mandatory when the aggregate value of crypto held on foreign exchanges/custodians exceeds €50,000 as of 31 December |
234| Who must file | Spanish tax residents (individuals and entities) |
235| Deadline | 1 January – 31 March of the following year |
236| Subsequent years | Required again only if there is an increase > €20,000 over the last declared value |
237| Penalties | €5,000 per datum omitted or incorrectly reported (minimum €10,000) |
238| Legal basis | Ley 11/2021 (disposición adicional 13ª LGT); Orden HFP/886/2023 |
239 
240### 7.3 Modelos 172 and 173 — Exchange Reporting
241 
242Since 2024, Spanish-registered crypto exchanges (Bit2Me, Bitnovo, Criptan, etc.) must file:
243- **Modelo 172:** Annual report of client crypto balances
244- **Modelo 173:** Annual report of client crypto operations
245 
246This means AEAT has independent data to cross-reference against your Modelo 100.
247 
248### 7.4 Record-Keeping
249 
250| Requirement | Detail |
251|---|---|
252| Retention period | 4 years from end of relevant tax year (general prescription period under Article 66 LGT) |
253| Records to maintain | Full transaction logs from all exchanges, wallet addresses, global FIFO ledger per coin, staking/mining logs, Modelo 721 copies |
254| Burden of proof | On the taxpayer — AEAT can request supporting documentation in an inspection |
255 
256---
257 
258## Section 8 — Loss Offset and Carry-Forward
259 
260### 8.1 Savings Base Losses
261 
262| Rule | Detail |
263|---|---|
264| Same-year offset | Pérdidas patrimoniales on the savings base can offset ganancias patrimoniales on the savings base |
265| Cross-category offset (same base) | Up to 25% of rendimientos del capital mobiliario can be offset by capital losses (and vice versa) |
266| Carry-forward | Uncompensated losses carry forward for **4 years** |
267| Cross-base offset | Savings base losses CANNOT offset general base income |
268 
269### 8.2 General Base Losses
270 
271| Rule | Detail |
272|---|---|
273| Same-year offset | Losses on the general base can offset general base income |
274| Carry-forward | 4 years |
275 
276### 8.3 Anti-Abuse Rule (Norma Antirecompra) — Article 33.5.f LIRPF
277 
278Spain has a re-acquisition rule similar to (but distinct from) the US wash sale rule:
279 
280- If you sell a crypto asset **at a loss** and reacquire **the same asset** (homogeneous) within **2 months** (before or after the sale), the loss is **suspended** — it cannot be recognised until the replacement asset is itself disposed of outside the 2-month window.
281- For assets traded on a regulated market, the period extends to **1 year** (before or after). Most crypto is NOT on a regulated market, so the 2-month rule applies.
282- The suspended loss is **not lost** — it is added to the cost basis of the replacement asset.
283- **Citation:** Article 33.5.f Ley 35/2006 LIRPF; DGT consulta V1604-18.
284 
285---
286 
287## Section 9 — Anti-Avoidance Rules
288 
289### 9.1 General Anti-Abuse Provision (Norma General Antielusión)
290 
291Article 15 of the Ley General Tributaria (LGT) empowers AEAT to disregard arrangements that are:
292- Wholly or partly artificial
293- Entered into with the main purpose of obtaining a tax advantage
294- Contrary to the spirit of the legislation
295 
296AEAT can recharacterise transactions to reflect their economic substance.
297 
298### 9.2 Specific Crypto Anti-Avoidance
299 
300| Measure | Detail |
301|---|---|
302| Modelo 721 (foreign holdings) | Failure to declare → €5,000 per datum penalty; unjustified capital gains may be imputed |
303| Modelos 172/173 (exchange data) | AEAT receives automatic data from Spanish exchanges since 2024 |
304| DAC8 / CARF (from 2026) | Cross-border automatic exchange of crypto data from EU and partner jurisdictions |
305| Exit taxation | If you cease to be a Spanish tax resident, unrealised gains on crypto > €4 million may be taxable under exit tax rules (Article 95 bis LIRPF) |
306| Impuesto de Solidaridad | Prevents circumventing wealth tax via CCAA bonifications for net wealth > €3 million |
307 
308### 9.3 Penalties for Non-Compliance
309 
310| Violation | Penalty Range |
311|---|---|
312| Failure to file Modelo 100 with crypto | 50%–150% of unpaid tax (sanción grave/muy grave) |
313| Failure to file Modelo 721 | €5,000 per datum omitted (minimum €10,000) |
314| Late filing | Recargo (surcharge) 1%–20% depending on delay, plus interest |
315 
316---
317 
318## Section 10 — Worked Examples
319 
320### Example 1 — Buy-and-Sell BTC, Savings Base
321 
322**Input:** Spanish tax resident. Bought 1 BTC at €25,000 in February 2025. Sold 1 BTC at €55,000 in October 2025. Exchange fees: €150 on purchase, €200 on sale. No other savings income.
323 
324**Computation:**
325```
326Disposal value: €55,000 − €200 (sale fee) = €54,800
327Acquisition cost: €25,000 + €150 (purchase fee) = €25,150
328Gain: €54,800 − €25,150 = €29,650
329 
330Tax (savings base):
331 First €6,000 × 19% = €1,140
332 Next €23,650 × 21% = €4,966.50
333 Total: €6,106.50
334```
335 
336### Example 2 — Crypto-to-Crypto Swap (Permuta)
337 
338**Input:** Spanish tax resident. Acquired 10 ETH at €1,200 each in March 2024 (total cost: €12,000). In June 2025, swapped 10 ETH for 0.5 BTC when ETH market price = €3,800 each.
339 
340**Computation:**
341```
342Disposal value of ETH: 10 × €3,800 = €38,000
343Acquisition cost (FIFO): 10 × €1,200 = €12,000
344Gain on ETH disposal: €38,000 − €12,000 = €26,000
345 
346Tax on €26,000 (savings base):
347 First €6,000 × 19% = €1,140
348 Next €20,000 × 21% = €4,200
349 Total: €5,340
350 
351New cost basis of 0.5 BTC: €38,000 (for future disposal FIFO)
352```
353 
354### Example 3 — Loss with Re-Acquisition (Anti-Abuse Rule)
355 
356**Input:** Spanish tax resident. Sold 2 BTC at €40,000 each on 1 August 2025. FIFO cost basis: €50,000 each. Loss: €20,000. Repurchased 2 BTC at €39,000 each on 15 August 2025 (within 2 months).
357 
358**Computation:**
359```
360Loss on sale: (€40,000 − €50,000) × 2 = −€20,000
361Re-acquisition: Within 2 months → Article 33.5.f applies
362Loss status: SUSPENDED — cannot be recognised in 2025
363New cost basis: €39,000 + €10,000 (suspended loss per BTC) = €49,000 per BTC
364 
365The suspended loss is effectively preserved in the increased
366cost basis and will be recognised when the replacement BTC
367is disposed of (outside the 2-month window).
368```
369 
370---
371 
372## Self-Checks
373 
374Before delivering any Spain crypto tax computation, verify:
375 
376- [ ] Residency confirmed — Spanish tax resident (worldwide income) or non-resident (source only)?
377- [ ] FIFO applied globally per coin across ALL exchanges and wallets
378- [ ] Every crypto-to-crypto swap treated as a taxable permuta
379- [ ] Staking/lending classified as rendimiento del capital mobiliario (savings base)
380- [ ] Airdrops classified on general base (not savings base)
381- [ ] 2-month anti-abuse rule checked for any loss + re-acquisition
382- [ ] Modelo 721 obligation checked (foreign crypto > €50,000 at 31 Dec)
383- [ ] Rates reflect Ley 7/2024 update (30% top bracket, not 28%)
384- [ ] Wealth tax exposure checked (especially for Catalonia/Valencia residents)
385- [ ] Output labelled as estimated — flag for professional review
386 
387---
388 
389## PROHIBITIONS
390 
391- NEVER use the old top savings rate of 28% — it is 30% from 2025 per Ley 7/2024
392- NEVER apply FIFO per-exchange — it must be a single global FIFO queue per coin type
393- NEVER ignore crypto-to-crypto swaps — they are ALL taxable events in Spain
394- NEVER classify staking rewards on the general base — they go on the savings base as rendimiento del capital mobiliario
395- NEVER forget the 2-month re-acquisition anti-abuse rule for losses
396- NEVER present crypto tax positions as definitive — always label as estimated and flag for professional review
397- NEVER omit Modelo 721 analysis for clients with foreign exchange holdings
398- NEVER advise on CNMV regulatory matters — this skill covers tax only
399- NEVER compute gains without verified cost basis and complete FIFO records
400 
401---
402 
403## Disclaimer
404 
405This skill and its outputs are provided for informational and computational purposes only and do not constitute tax, legal, or financial advice. Open Accountants and its contributors accept no liability for any errors, omissions, or outcomes arising from the use of this skill. All outputs must be reviewed and signed off by a qualified professional (such as an asesor fiscal, economista colegiado, or abogado tributarista in Spain) before filing or acting upon.
406 
407The most up-to-date, verified version of this skill is maintained at [openaccountants.com](https://openaccountants.com). Log in to access the latest version, request a professional review from a licensed accountant, and track updates as tax law changes.
408 

Run this skill, then get an accountant to check it

After running the full skill pack in your AI agent, sign up and upload your worksheet. We'll connect you with a trusted accountant in our network who can review your numbers before you file.

Verification status

Research-verified

Drafted from authoritative sources (tax authority sites, Big-4 summaries). Awaiting credentialed sign-off.

Needs section-by-section practitioner review to reach accountant-verified.

Section review progress

0/34

About

Use this skill whenever asked about Spain cryptocurrency or digital asset taxation. Trigger on phrases like "crypto tax Spain", "Bitcoin Spain", "criptomonedas IRPF", "cryptocurrency gains Spain", "crypto income Spain", "staking Spain", "mining income Spain", "NFT tax Spain", "Modelo 721", "Modelo 100 crypto", "rentas del ahorro crypto", "base del ahorro", "AEAT crypto", "Binance Spain tax", "Coinbase Spain tax", "Revolut crypto Spain", "DeFi tax Spain", "Hacienda crypto", "declaración renta criptomonedas", or any question about the income tax, capital gains, or VAT treatment of cryptocurrency, tokens, or digital assets for Spanish tax residents or Spain-source crypto income. Covers IRPF savings base taxation, Modelo 721 foreign crypto reporting, FIFO cost basis, Ley 11/2021 anti-fraud provisions, and DAC8 reporting. ALWAYS read this skill before touching any Spain crypto work.

ESty-2025

Use this skill

This skill is open source and free to use in any AI agent. Copy it, download it, or clone the repo. If you find an error, report an issue — a licensed accountant will review.

14 of 20 in the ES workflow: