Crypto Newbie / Simulators / Tax Lot
Crypto Tax Lot Optimization (FIFO / LIFO / HIFO)
When you sell crypto, the IRS (and most tax authorities) need to know WHICH 'lot' you sold from. Buy 1 BTC at $20k in 2021, another at $40k in 2022, another at $60k in 2024. Sell 1 BTC at $70k today — which one did you sell? The choice determines your realised gain: FIFO says $50k, HIFO says $10k. Same cash, $40k tax base difference. This simulator runs all three methods so you can see the optimization in your own tax planning.
Acquisition lots
| Lot | Acquired | Amount | Cost basis (per unit) | |
|---|---|---|---|---|
| L1 | ||||
| L2 | ||||
| L3 | ||||
| L4 |
Sale event
Method comparison
| Method | Cost basis | Proceeds | Realised gain |
|---|---|---|---|
| FIFO (First-In-First-Out) | $3.40k | $8.00k | $4.60k |
| LIFO (Last-In-First-Out) ★ | $5.90k | $8.00k | $2.10k |
| HIFO (Highest-In-First-Out) | $5.90k | $8.00k | $2.10k |
Optimisation savings
Same cash, different reported gain. HIFO usually minimises tax in a bull market; LIFO and FIFO produce identical results when prices are flat. The 'savings' is the realised-gain difference between the worst + best method.
Best (lowest gain): LIFO
Tax-base savings: $2.50k
Lots consumed by sale (best method)
| Lot | Amount sold | Cost basis | Gain |
|---|---|---|---|
| L4 | 1.00 | $3.50k | $500.00 |
| L3 | 1.00 | $2.40k | $1.60k |
Why HIFO is usually the best choice in bull markets
HIFO (Highest-In-First-Out) sells the lots with the HIGHEST cost basis first. In a bull market, your most recent purchases were at the highest prices — so HIFO 'sells' those lots, realizing the SMALLEST gain. This defers the big gains (your old cheap lots) to a future sale, ideally when you can offset with losses elsewhere or in a year with lower income (= lower tax bracket). Most US crypto traders save 20-60% on capital gains tax by using HIFO consistently.
FIFO is the boring default that costs you money
FIFO (First-In-First-Out) sells your OLDEST lots first. In bull markets, oldest = lowest cost basis = biggest gain. The IRS defaults to FIFO unless you opt in to 'specific identification' for HIFO. Why is FIFO the default? Because it's easier to track. Why do most retail crypto traders use it? Because they don't know they can use HIFO. The simulator above quantifies the cost — for a typical $10k crypto sale with mixed-price lots, FIFO vs HIFO can cost $1k-3k extra tax.
Specific identification requirements
To use HIFO (or any non-FIFO method), the IRS requires SPECIFIC IDENTIFICATION at sale time: you must designate which specific lot you're selling, with documentation that meets these criteria: (1) Acquisition date + amount + cost basis recorded. (2) Designation made at or before the sale (not retroactively). (3) Documentation retained for 3-7 years. Crypto tax software (Koinly, CoinTracker, TokenTax) handles this automatically — they pick the optimal lot for each sale and generate IRS-compliant documentation.
Loss harvesting + HIFO combined
End-of-year strategy: identify positions with unrealized LOSSES (you bought at $50k, now worth $40k = $10k loss). SELL them to harvest the loss → reduces your tax base. Immediately re-buy if you want to keep exposure (wash-sale rules don't apply to crypto in the US currently — they will in some jurisdictions in 2026). Combined with HIFO on profit-taking, you can fully offset gains with harvested losses, paying ZERO capital gains tax in many scenarios. The simulator above doesn't show losses but you can input lots with cost basis ABOVE the sale price to see the negative-gain case.
Frequently asked questions
+Is HIFO legal everywhere?
US: yes, with specific identification. Canada: limited (averages of cost basis required by default). UK: must use share matching rules (different system). Australia: similar to US. Germany: holds < 1 year are taxed; > 1 year tax-free regardless of method. Always check local rules; the simulator's HIFO calc applies cleanly only to US-style specific identification jurisdictions.
+Can I use HIFO on coins I bought before 2020?
Yes if you have records. The IRS requires cost basis records. If you bought BTC at $5k in 2017 via Coinbase, Coinbase reports that lot. If you self-custody and lost records, you'd default to $0 cost basis (worst case). Pull cost basis history NOW from every exchange you've ever used — it's getting harder to get historical data as exchanges close or change policies.
+What about gifts and inheritance?
Gifts: recipient takes the giver's cost basis (carryover basis). If you give 1 BTC bought at $20k, recipient's cost basis is $20k regardless of current price. Inheritance: 'step-up basis' — recipient's cost basis is the value at date of death. For 1 BTC inherited when BTC = $70k, recipient's cost basis is $70k. This is hugely tax-advantageous; holding crypto until death is sometimes the optimal tax strategy for very long-term holders.
+How does the simulator handle short-term vs long-term?
It doesn't — to keep the UI focused. In reality, holds < 1 year are taxed as short-term gain (up to 37% in US), > 1 year long-term (0/15/20% in US). HIFO optimization gets MORE complex when you account for this: sometimes you want to sell a high-cost-basis short-term lot to convert it to long-term faster. Real tax software does this; the simulator just compares method gross.
+Will the IRS audit me for using HIFO?
Unlikely if your records are good. HIFO is a legitimate tax strategy with clear precedent. Audits target: (1) Massive unreported gains. (2) Inconsistent method use (some sales FIFO, others HIFO — pick one and document why). (3) Crypto-specific issues (DeFi yields not reported, hard fork events misclassified). Following IRS guidance + using a reputable crypto tax tool eliminates most audit risk.