Term · Last-In-First-Out

LIFO

Published May 7, 2026
Definition

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.

 FIFOHIFOLIFO
Sell orderOldest firstHighest-basis firstNewest first
Tax on gains (appreciating)WorstBestOften near-best
Holding-period mixTilts long-termMixedTilts short-term
Rate effect on short-termOrdinary rateMixedOrdinary rate (frequent)
Common useDefaultTax-aware investorsCrypto, ST-loss harvest
Why this matters for synthetic data

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

LIFO vs FIFO on a partial sale

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.

Frequently asked questions

Is LIFO available at major retail brokers?+
Yes — Schwab, Fidelity, Vanguard, IBKR, and Coinbase all support LIFO as a configured default option. Setting requires per-account taxpayer election. Some platforms only offer LIFO on crypto accounts (matching the IRS's explicit crypto LIFO permission).
Why is LIFO common for crypto but rare for stocks?+
Crypto's high-frequency-trading profile produces dense short-term-lot inventories where LIFO's basis advantage often dominates. Stocks held by retail investors tend to be more long-term, where HIFO's surgical basis selection beats LIFO's blanket newest-first rule.