Crypto HIFO Cost Basis Calculator

Calculate crypto cost basis using the HIFO method. Highest-In First-Out sells the most expensive lots first to minimize taxable capital gains.

Purchase Lots

$
$
$

Sale Details

$
HIFO Cost Basis
$45,000.00
Sale Proceeds
$50,000.00
Capital Gain/Loss
$5,000.00
Gain
Planning notes, formulas, and examples

About the Crypto HIFO Cost Basis Calculator

The Highest-In First-Out (HIFO) method is a tax optimization strategy that sells your most expensive cryptocurrency lots first when calculating cost basis. By using the highest-cost lots, HIFO minimizes your taxable gain (or maximizes your loss) on each sale, which can significantly reduce your tax bill.

HIFO is implemented through specific identification, where you designate exactly which lots are being sold. The IRS allows specific identification for property (including crypto), provided you maintain adequate records documenting the lots disposed of at the time of each sale. Many crypto tax software platforms offer HIFO as a built-in option.

This calculator lets you enter multiple purchase lots and a sale, then automatically selects the highest-priced lots first to compute the most tax-efficient cost basis. Compare the result with FIFO and LIFO to see how much you can save.

Use the result to map token-release or fee scenarios and revisit the model when market conditions, unlock terms, or portfolio assumptions change.

When This Page Helps

HIFO is the most aggressive legal tax minimization strategy for crypto investors. By always selling the most expensive lots first, you consistently minimize the taxable gain on each sale. Over a portfolio's lifetime, HIFO can defer significant tax liability. However, it requires diligent record-keeping and may result in remaining lots having very low cost bases, which means larger gains when those lots are eventually sold.

How to Use the Inputs

  1. Enter each purchase lot with quantity and price per unit.
  2. Enter the quantity you are selling and the sale price per unit.
  3. The calculator automatically sorts lots by price (highest first).
  4. View the cost basis, proceeds, and gain or loss.
  5. Compare with FIFO and LIFO to see the tax savings from HIFO.
  6. Ensure proper documentation to support your lot selection with the IRS.
Formula used
HIFO Order: Sell highest-cost lots first Cost Basis = ฮฃ (lot quantity used ร— lot price per unit) Gain/Loss = (Sale Quantity ร— Sale Price) โˆ’ Total Cost Basis

Example Calculation

Result: $45,000 cost basis, $5,000 gain

Under HIFO, selling 1 BTC picks the most expensive lot first โ€” lot 2 at $45,000. Cost basis = $45,000. Proceeds = $50,000. Gain = $5,000. Under FIFO, the $20,000 lot would be used, producing a $30,000 gain. HIFO saves $25,000 in taxable gain on this single sale.

Tips & Best Practices

  • HIFO is the most tax-efficient method in most scenarios but requires specific identification records.
  • Some exchanges and tax software support HIFO natively โ€” check your platform's capabilities.
  • Remember that HIFO defers taxes rather than eliminating them โ€” the remaining low-cost lots will eventually produce larger gains.
  • Pair HIFO with tax-loss harvesting for maximum tax efficiency.
  • Document your lot selection before or at the time of each sale, not after the fact.
  • Consider the holding period of each lot โ€” a high-cost short-term lot may be taxed at a higher rate than a lower-cost long-term lot.

Why HIFO Is the Most Tax-Efficient Method

HIFO maximizes your cost basis on every sale by consuming the most expensive lots first. This produces the smallest possible gain or the largest possible loss. Over many transactions, this can result in thousands of dollars in tax savings compared to FIFO or LIFO.

The Trade-Off: Deferred, Not Eliminated

The downside of HIFO is that your remaining portfolio consists of cheap lots. When you eventually sell everything, those lots will produce large gains. However, deferring taxes has real economic value โ€” you keep more capital invested and compounding in the meantime.

Combining HIFO with Holding Period Strategy

Sophisticated investors combine HIFO with holding period analysis. Rather than blindly picking the highest-cost lot, they check whether a slightly lower-cost lot qualifies for long-term treatment. Sometimes the combination of a slightly higher gain at a much lower long-term rate produces less tax overall.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Yes. HIFO is implemented through specific identification, which the IRS allows for property transactions including cryptocurrency. The requirement is that you maintain contemporaneous records showing which lots you sold at the time of disposition.