accounting

HIFO (Highest In, First Out)

A cost basis accounting method where cryptocurrency units with the highest purchase price are treated as sold first, minimizing realized capital gains.

HIFO (highest in, first out) in cryptocurrency accounting

HIFO (Highest In, First Out) is a cost basis accounting method in which the units of cryptocurrency with the highest acquisition cost are treated as sold first, irrespective of when they were purchased. HIFO is a variant of specific identification and often reduces recognized gains in rising markets.

How HIFO works

Consider the same three Bitcoin purchases:

DateUnitsPriceCost Basis
Jan 10.5 BTC$30,000$15,000
Apr 10.5 BTC$40,000$20,000
Jul 10.5 BTC$50,000$25,000

If you sell 0.7 BTC in October at $55,000, HIFO applies your highest-cost lots first:

  • From Jul lot (highest at $50k/BTC): 0.5 BTC, cost basis $25,000, proceeds $27,500, gain $2,500
  • From Apr lot (next highest at $40k/BTC): 0.2 BTC, cost basis $8,000, proceeds $11,000, gain $3,000
  • Total gain: $5,500

In this example, HIFO produces the same result as LIFO because the most recently purchased lots also have the highest prices. In practice, HIFO often reduces current-period gains by selecting higher-cost lots first, but outcomes still depend on lot mix and holding periods.

How HIFO compares to other cost basis methods

MethodSelling OrderTypical Effect in Bull Market
FIFOOldest firstLargest gains
LIFONewest firstSmaller gains but more short-term
HIFOHighest cost firstSmallest total gains

When HIFO provides maximum tax benefit

HIFO is most advantageous when:

  • You have purchased the same asset multiple times at varying prices
  • Prices have risen since your earlier purchases
  • You want to maximize unrealized positions on low-cost lots for long-term holding
  • You are in a high marginal tax bracket and minimizing current-year gains is important

Jurisdictional considerations

HIFO is generally considered a form of specific identification, meaning you explicitly designate the lots being sold. Treatment varies by jurisdiction:

  • United States: IRS virtual currency FAQs permit specific identification when you can adequately identify the units disposed.
  • United Kingdom: HMRC applies pooling and matching rules, not simple HIFO lot selection.
  • Other jurisdictions: Local rules differ; professional advice is essential before using HIFO in filings.

Record-keeping and documentation requirements for HIFO

Because HIFO is a form of specific identification, it carries stricter documentation requirements than FIFO:

  1. At the time of sale, you must be able to identify which specific lots you are disposing of
  2. Records must include acquisition date, acquisition cost, and sale date for each lot
  3. Documentation must be contemporaneous. You cannot retroactively designate lots

How HIFO applies to complex DeFi transactions

DeFi accounting adds complexity to HIFO:

  • LP token receipts: Each deposit into a liquidity pool is a separate lot. HIFO matches the highest-cost LP tokens first when you withdraw.
  • Yield from staking: Each staking reward creates a new lot at the fair market value on the reward date.
  • Token swaps: Each swap is effectively a disposal of the input token (HIFO applies) and acquisition of the output token at its fair market value.

Tokenbooks tracks lot-level acquisition data for supported DeFi flows, which can be used in HIFO workflows where allowed.

HIFO and tax-loss harvesting

HIFO and tax-loss harvesting serve opposite but complementary goals:

  • HIFO: Minimizes gains by selling high-cost lots
  • Tax-loss harvesting: Realizes losses on low-cost lots that have dropped in value

You can combine strategies: use HIFO for profitable disposals to minimize gains, while separately harvesting losses on depreciated positions.

How HIFO lot matching works in Tokenbooks

Tokenbooks implements HIFO as an available accounting method:

  • The Tokenbooks Accounting Engine maintains lot ledgers per asset
  • Highest-cost lots can be matched first at disposal time
  • Side-by-side reporting supports FIFO/LIFO/HIFO comparisons
  • Lot histories provide documentation for review and audit workflows