Term · Highest-In-First-Out

HIFO

Published May 7, 2026
Definition

HIFO (Highest-In-First-Out) is a tax-lot relief method that sells the highest-cost-basis lots first, minimizing the realized capital gain on a partial sale. Unlike FIFO, HIFO is a configured rather than default method — the taxpayer must elect it with the custodian.

HIFO is the lot-relief method most retail TLH engines and tax-aware advisors prefer for clients in net-gain scenarios. By selling highest-basis lots first, HIFO defers gain recognition to a later date when the lower-basis lots either step up at death (the §1014 exit) or are donated to charity (a different exit that bypasses the gain entirely). The deferral itself is valuable in present-value terms even before either exit lever is exercised.

The asymmetry between FIFO (default, often suboptimal) and HIFO (election, often optimal) is one of the simplest single-decision wealth-tech improvements available. A household configured for HIFO across all taxable accounts will, over a multi-decade holding period, realize materially less gain than the same household defaulted to FIFO. The aggregate after-tax differential at the household level often exceeds 1% of taxable assets per year — a meaningful number against typical advisor fees of 0.5–1.5%.

HIFO does not always dominate. Two scenarios reverse the preference: in a net-loss harvest, FIFO preserves more harvestable losses (the lowest-basis lots don't get sold first, so they remain available for later loss-realization); and in cases where the taxpayer is intentionally crystallizing gain into a 0% LT bracket window (early retirement, before SS claim), FIFO's larger gain may be the goal.

Why this matters for synthetic data

Test data should include households configured for HIFO across all taxable accounts (the sophisticated default), households on FIFO by inertia (the retail default), and households mixing the two by account or by symbol. The realized-gain output of an aggregate sell decision should differ measurably across these configurations, exercising the lot-relief code paths.

Common pitfalls

  • Setting HIFO without distinguishing short-term from long-term — pure-HIFO can pick the highest-basis ST lot over a slightly-lower-basis LT lot, which produces ordinary income instead of preferential LT rate.
  • Treating HIFO as 'always better' — it isn't; loss-harvest preservation and 0%-bracket gain crystallization both prefer FIFO.
  • Not propagating HIFO through partial liquidations of multi-account positions — same symbol across accounts must be evaluated as a single inventory.
  • Forgetting that HIFO must be elected — defaulting to FIFO and reporting realized gain as if HIFO were active is a 1099-B reconciliation error.

Examples

HIFO inside the LT-only sub-rule

More sophisticated implementation: sell highest-basis lot among long-term holdings first, then the highest-basis lot among short-term as backup. Optimizes for both gain minimization AND rate preference.

Frequently asked questions

Is HIFO available at all custodians?+
All major retail custodians (Schwab, Fidelity, Vanguard, E*TRADE, IBKR) offer HIFO as a configured default option. Some platforms label it differently (e.g., 'Tax-Optimized' or 'Lowest Tax'). Setting requires a per-account taxpayer election, usually configurable in the account-management UI.
Does HIFO interact with wash-sale rules?+
Yes. HIFO selling a lot at a loss followed by a repurchase within 30 days triggers wash-sale rules just like any other lot-relief method. The disallowed loss is added to the replacement lot's basis. HIFO does not exempt or alter the §1091 application.