FIFO vs. LIFO for Crypto Taxes: How Tax-Lot Method Changes Your Gain
The same crypto sale can produce very different taxable gains depending on which purchase lot you treat as sold. A worked FIFO vs. LIFO example, plus the 2025 rule change that limits how freely you can pick.
What FIFO and LIFO Actually Change on a Crypto Sale
If you bought the same coin at three different prices on three different dates, and you sell only part of your position, you have to decide which of those purchases you are "selling" for tax purposes. That decision — the tax-lot method — is not a formality. It directly changes your cost basis, your realized gain, and the tax you estimate on the sale, even though the coin, the sale price, and the quantity sold are all identical.
First-In-First-Out (FIFO) treats your oldest purchase as the one being sold first. Last-In-First-Out (LIFO) treats your most recent purchase as sold first. Specific Identification lets you name the exact lot yourself, which is how methods like Highest-In-First-Out (HIFO) work in practice — you are simply identifying the highest-cost lot as the one sold.
The Rule That Changed in 2025: You Can't Just Pick the Best Lot After the Fact
Under final IRS regulations issued in 2024 (Treasury Regulation §1.1012-1(j)), cost basis for digital assets must be tracked wallet-by-wallet and account-by-account starting January 1, 2025. The old approach many crypto holders used — pooling every coin across every exchange and wallet into one "universal" basis and picking whichever lot produced the best tax result at filing time — is no longer allowed.
FIFO is the default method for digital assets under the current rules. If you want to use LIFO, HIFO, or another Specific Identification approach instead, the specific lot has to be identified before the trade is executed, with supporting records, not chosen retroactively when you are doing your taxes. Once you pick a method for a wallet or account, it needs to be applied consistently within that year.
Worked Example: Same Sale, Two Different Methods
Say you built a Bitcoin position across three purchases in the same wallet, and the price rose the whole time you were buying:
Swipe sideways to compare columns.
| Lot | Purchase Date | Units | Price / Unit | Lot Cost |
|---|---|---|---|---|
| Lot A | Jan 15, 2025 | 0.05 BTC | $42,000 | $2,100 |
| Lot B | Apr 10, 2025 | 0.08 BTC | $58,000 | $4,640 |
| Lot C | Sep 22, 2025 | 0.04 BTC | $67,000 | $2,680 |
On Dec 1, 2025, you sell 0.09 BTC at $72,000 per unit — $6,480 in proceeds. That sale needs to draw from more than one lot, since no single lot holds exactly 0.09 BTC.
Swipe sideways to compare columns.
| Step | Detail |
|---|---|
| Draw from Lot A first | 0.05 BTC at $42,000 = $2,100 cost, fully used |
| Still need 0.04 BTC | Draw 0.04 BTC from Lot B at $58,000 = $2,320 cost |
| Total cost basis | $2,100 + $2,320 = $4,420 |
| Realized gain | $6,480 proceeds − $4,420 cost = $2,060 |
| Gain margin | $2,060 / $6,480 = 31.8% |
Swipe sideways to compare columns.
| Step | Detail |
|---|---|
| Draw from Lot C first | 0.04 BTC at $67,000 = $2,680 cost, fully used |
| Still need 0.05 BTC | Draw 0.05 BTC from Lot B at $58,000 = $2,900 cost |
| Total cost basis | $2,680 + $2,900 = $5,580 |
| Realized gain | $6,480 proceeds − $5,580 cost = $900 |
| Gain margin | $900 / $6,480 = 13.9% |
Same Sale, Same Coin — Realized Gain by Method
Nothing about the trade itself changed. Only the lot-matching method did — and it moved the taxable gain by $1,160.
FIFO realized gain
31.8% gain margin
LIFO realized gain
13.9% gain margin
In a rising market, FIFO draws from your cheapest, oldest units first, which tends to realize more gain than LIFO.
Same coin, same sale price, same quantity — a $1,160 difference in taxable gain, purely from which lot-matching method was applied. That is the entire reason a tax-lot calculator exists: the number is not obvious from a glance at your exchange balance.
Why LIFO Tends to Show a Smaller Gain in a Rising Market — and the Reverse in a Falling One
- In a market that has mostly risen since you started buying, your most recent lots are usually your most expensive ones. LIFO draws from those first, which shrinks the taxable gain compared to FIFO.
- In a market that has mostly fallen since you started buying, the relationship flips — your most recent lots are your cheapest, so LIFO would realize a larger gain (or a smaller loss) than FIFO in that scenario.
- FIFO is the default you get if you do nothing, and it is also the simplest to defend, since "oldest first" needs no extra documentation beyond your purchase history.
- Specific Identification (including LIFO and HIFO) can reduce a given year's taxable gain, but it only works if the lot is identified before the trade and the wallet-by-wallet records support it — it is not a method you can apply after the fact at tax time.
What It Actually Takes to Track Tax Lots by Hand
A tax-lot estimate is only as good as the purchase history behind it. At minimum, you need, per wallet or exchange account:
- Every purchase date for the coin, in chronological order — lot order depends entirely on this.
- Units purchased and price per unit for each lot, so cost basis can be calculated per lot rather than as one blended average.
- A record of which wallet or account each purchase happened in, since 2025 rules track basis per wallet, not pooled across your whole crypto footprint.
- The sale date, units sold, and sale price, entered as real dates rather than text, so lot-order logic can sort correctly.
- A consistent method applied per wallet for the year — switching FIFO and LIFO sale-by-sale within the same wallet and year is not how Specific Identification is meant to work.
Common Mistakes When Estimating Crypto Tax Lots
- Pooling purchases from multiple wallets or exchanges into one combined lot list — the current wallet-by-wallet rule means basis should be tracked separately per wallet.
- Entering dates as plain text instead of real date values, which can make a spreadsheet sort lots in the wrong order.
- Deciding the "best" method after seeing the gain number, rather than identifying the lot before the trade — that is the difference between a valid Specific Identification and an after-the-fact estimate.
- Forgetting fees paid on the purchase side, which are typically added to cost basis and reduce the eventual gain slightly.
- Treating a spreadsheet estimate as a filed number without reconciling it against actual exchange or wallet exports first.
The Free Crypto Portfolio Tracker Excel Template includes a Tax Lots sheet built around this exact workflow — enter a hypothetical or real sale (ticker, date, units, price, method) and it walks through your eligible purchase lots in date order, allocates cost basis, and estimates realized gain and gain margin under FIFO or LIFO.
Use the Crypto Profit CalculatorBlend up to three DCA purchase lots into a weighted average cost basis, enter your holding period, and get net profit, break-even price, and an estimated after-tax result at your short-term or long-term rate — without opening the full workbook.Frequently Asked Questions
Is FIFO always the worse method for taxes?
No. Whether FIFO or LIFO produces a larger gain depends entirely on price trend. In a rising market, FIFO tends to realize more gain than LIFO, since it draws from your cheapest, oldest lots first. In a falling market, that relationship can reverse.
Can I switch between FIFO and LIFO for the same wallet during the year?
Cost-basis methods are meant to be applied consistently per wallet or account for the year. Using Specific Identification (including LIFO or HIFO) also requires identifying the lot before the trade, not choosing after the fact — this is a question worth confirming with a tax professional for your specific situation.
What changed with the 2025 wallet-by-wallet rule?
Final IRS regulations effective January 1, 2025 require digital asset cost basis to be tracked per wallet and per account, rather than pooled across every exchange and wallet you hold the same coin in. FIFO is the default unless a properly documented Specific Identification is made.
Does a FIFO/LIFO spreadsheet estimate replace a tax filing?
No. It is a planning estimate that applies simplified lot logic to your entered purchase history. It does not account for every jurisdiction-specific rule, wash-sale-style provisions, or edge cases a tax professional would apply.
Do transaction fees affect the tax-lot calculation?
Purchase-side fees are typically added to cost basis, which slightly reduces the eventual realized gain. Sale-side fees are typically subtracted from proceeds. Make sure whichever tool or spreadsheet you use is applying fees consistently.
What is HIFO, and is it different from LIFO?
HIFO (Highest-In-First-Out) sells the highest-cost lot first regardless of purchase date, while LIFO sells the most recent lot first regardless of cost. They often overlap in practice but are not always the same lot — HIFO is generally applied as a form of Specific Identification.
Why does lot order matter if I am not selling my entire position?
Because a partial sale has to be matched against specific units, not an average of everything you own. The method you use decides exactly which units — and which original cost — that partial sale is measured against.
Can staking rewards or airdrops complicate lot tracking?
Yes. Rewards and airdrops typically create their own lot with their own cost basis (often the fair market value when received), which then needs to be tracked alongside purchased lots in the same wallet.
Sources to Verify or Cite
- Treasury Regulation §1.1012-1(j) — final digital asset cost-basis regulations, wallet-by-wallet requirement effective January 1, 2025.
- IRS guidance on digital asset transactions and cost-basis reporting.
- Your own exchange and wallet transaction exports for actual purchase-lot dates, units, and prices.
Related Reading
Free Crypto Portfolio Tracker Excel Template — The Tax Lots sheet automates the FIFO/LIFO lot-matching walked through in this post.
How Crypto Portfolio Rebalancing Works (With a Worked Allocation-Drift Example) — Selling an appreciated coin to rebalance is exactly the kind of trade that triggers the tax-lot math in this post.
Capital Gains Tax Guide: Basis, Selling Costs, and After-Tax Sale Proceeds — The broader framework for turning a realized gain into an after-tax result once you know your cost basis.
Written by
Do The Calculation Team
Do The Calculation Editorial Board
The Do The Calculation Editorial Board is comprised of software engineers, finance analysts, and technical contributors focused on building clean, accurate, and easy-to-use calculator tools.
Reviewed & Verified By
Dr. Elizabeth Vance, PhD
Senior Editorial Board Member (Finance)
Former investment bank strategist and university lecturer with 15+ years of research in compound growth modeling, asset allocation, and annuity projections. Dr. Vance reviews all core investment and retirement tools to ensure absolute alignment with actuarial standards.