LIFO
LIFO (Last-In-First-Out) is a tax-lot relief method that sells the most-recently-acquired lots first. It is rarely used in personal investing for traditional securities (FIFO and HIFO dominate) but appears in crypto-asset taxation and in specialized short-term-loss-harvesting strategies where newer lots have lower basis than older ones.
LIFO's tax-outcome profile is opposite FIFO. FIFO sells oldest lots first, which on appreciating assets means lowest-basis-first (largest gain). LIFO sells newest lots first, which on appreciating assets means highest-basis-first (smallest gain) — but with one twist: LIFO lots are by definition more recent and therefore more often short-term, producing ordinary income rates rather than long-term preferential rates.
The net tax outcome of LIFO depends on the holding-period mix and rate differential. LIFO's basis advantage often dominates HIFO when the newest lots are highest-basis (which is normal for appreciating assets), but the short-term rate disadvantage can erode the benefit. A sophisticated lot-relief engine evaluates both axes; pure-LIFO is a blunt instrument compared with HIFO-by-rate-tier (sell highest-basis among long-term first, fall back to short-term).
LIFO has gained prominence in crypto-asset taxation. Crypto's frequent buying and selling — often inside a tax year — produces large numbers of short-term lots. LIFO selling against these lots can crystallize losses immediately for harvesting purposes. The IRS guidance on crypto explicitly permits LIFO if specifically elected; otherwise default FIFO applies. Most crypto exchanges support both, with LIFO often the practical default for tax-aware traders.
| FIFO | HIFO | LIFO | |
|---|---|---|---|
| Sell order | Oldest first | Highest-basis first | Newest first |
| Tax on gains (appreciating) | Worst | Best | Often near-best |
| Holding-period mix | Tilts long-term | Mixed | Tilts short-term |
| Rate effect on short-term | Ordinary rate | Mixed | Ordinary rate (frequent) |
| Common use | Default | Tax-aware investors | Crypto, ST-loss harvest |
LIFO-elected accounts in synthetic data should be a meaningful minority — primarily on accounts where the holder is actively trading or holds crypto. Test scenarios should include the LIFO-vs-FIFO outcome differential on the same trade, and the LIFO short-term rate erosion case.
Common pitfalls
- Treating LIFO as universally tax-advantageous — it isn't; it favors the seller only on the basis dimension, but loses on the holding-period/rate dimension.
- Using pure-LIFO instead of LIFO-by-rate-tier — sophisticated lot relief considers both basis and rate.
- Assuming LIFO is the IRS default — FIFO is the default for securities; LIFO requires explicit election and broker support.
- Forgetting that the LIFO/FIFO choice is per-account at most custodians — switching mid-year requires careful trade-by-trade tracking.
Examples
Position has 3 lots: Lot A 30sh at $80 basis (2018, LT); Lot B 40sh at $140 basis (2021, LT); Lot C 30sh at $190 basis (2024, ST). Current price $200. Sell 50 shares ($10,000): FIFO realized: 30 from A + 20 from B = $4,800 LT gain. LIFO realized: 30 from C + 20 from B = $1,500 (split: $300 ST + $1,200 LT). LIFO has lower aggregate gain ($1,500 < $4,800) but the gain mix includes ST income at higher rates.