Calculate crypto cost basis using the HIFO method. Highest-In First-Out sells the most expensive lots first to minimize taxable capital gains.
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.
Crypto traders, long-term holders, and DeFi participants benefit from transparent crypto hifo cost basis calculations when planning entries, exits, or portfolio rebalances. Revisit this calculator whenever market conditions shift to keep your strategy grounded in accurate data.
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.
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
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.
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 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.
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.
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.
HIFO always selects the most expensive lots regardless of purchase date, making it the most tax-efficient in nearly all scenarios. FIFO sells oldest first and LIFO sells newest first. HIFO produces the highest cost basis and lowest gain of all three methods.
No, HIFO defers taxes. By selling high-cost lots first, your remaining portfolio consists of low-cost lots that will produce larger gains when eventually sold. The total tax over the portfolio's lifetime may be similar, but deferral provides time-value benefits.
You can elect specific identification (HIFO) for future sales. Past sales that were reported using FIFO generally cannot be changed. Going forward, ensure you document your lot selection at the time of each trade.
You need records showing the date acquired, quantity, cost per unit, and a designation of which lots were sold at the time of each sale. Exchange transaction histories, wallet records, and crypto tax software logs all serve as supporting documentation.
Usually, but not always. If a high-cost lot is short-term (held less than a year) while a lower-cost lot is long-term, the long-term lot's lower tax rate may produce less tax despite the lower cost basis. Always check both the gain amount and the applicable rate.