Crypto Tax Lot Optimizer (US): HIFO vs FIFO vs LIFO Gains

Compare HIFO, FIFO and LIFO on a US crypto sale: short- and long-term gains under IRS rules, federal tax at your rates and the optional 3.8% NIIT surtax.

HIFO, FIFO or LIFO: which crypto lot should you sell first?

The gain on each lot sold equals quantity × (sale price − unit cost basis); the identification method decides which lots go first: the oldest (FIFO), the newest (LIFO) or the most expensive (HIFO). The optimizer then applies two rates you enter freely, one to short-term gains and one to long-term gains, following the logic of US federal income tax.

Calculation. The tool sorts the lots by the chosen method, draws the quantity sold lot by lot and computes for each one: gain = quantity drawn × (sale price − cost basis). Gains on lots held more than one year as of today are long-term, the others short-term. A net loss in one bucket is first offset against the net gain in the other, as on Schedule D; tax = remaining short-term gain × short-term rate + remaining long-term gain × long-term rate. The effective rate shown is tax divided by the total capital gain.

Worked example with the sample portfolio

Selling 1.25 BTC at 64,000 with rates of 24% and 15% (defaults). Under HIFO the tool takes 0.5 from the lot bought at 62,000 (+1,000), 0.5 from the 58,000 lot (+3,000), then 0.25 from the 27,500 lot (+9,125). All four lots have been held more than one year, so the whole gain is long-term: tax = 13,125 × 15% = 1,969, leaving net proceeds of 78,031. Under FIFO the two 2023 lots (21,000 and 27,500) go first: a gain of 48,875 and tax of 7,331. On these lots LIFO matches HIFO, because the two newest lots are also the most expensive.

Limits

  • The four lots are a fixed sample portfolio: you change quantity, price, method and rates, not the lots. Their short- or long-term status is recomputed from today's date.
  • The quantity sold is capped at the 2.25 units held.
  • A remaining net loss is not deducted from ordinary income (up to $3,000 a year).

This optimizer compares methods with your own rates, for example your US federal bracket (10% to 37% short term, 0%, 15% or 20% long term), in the displayed currency; the NIIT box adds 3.8 points to both rates. Indicative estimate, not a substitute for advice from a tax professional.

Sources and dates: IRS Topic 409 (long-term gain after more than one year of holding, page updated 09/24/2026); IRS Notice 2026-20 (identifying units sold in your own books and records through 12/31/2026, FIFO order otherwise) (checked 10/14/2026)

Frequently Asked Questions

Which method minimizes tax on a crypto sale?

Usually HIFO, which sells the highest-cost units first and therefore shrinks the gain. In the default example (1.25 BTC sold at 64,000, rates of 24% and 15%), tax drops from 7,331 under FIFO to 1,969 under HIFO. It is not guaranteed: if the expensive lots are recent, HIFO can turn the gain short-term, which is taxed more heavily.

Why is the effective rate the same under HIFO and FIFO in the example?

The effective rate divides tax by the realized gain. All four sample lots have been held more than one year, so the whole gain is long-term and taxed at 15% whatever the method. HIFO shrinks the base (13,125 instead of 48,875) and therefore the tax (1,969 instead of 7,331), not the rate. The effective rate only exceeds the long-term rate when part of the gain comes from lots held one year or less.

Am I allowed to use HIFO on my US taxes?

Yes, if you identify the units sold no later than the time of sale (specific identification). For crypto held with a broker, IRS Notice 2026-20 lets you record that identification, or a standing order, in your own books and records through 12/31/2026. Without identification, units are treated as sold in order of acquisition (FIFO).

When does a crypto gain become long-term?

Per the IRS (Topic 409), the gain is long-term if you held the asset more than one year and short-term if you held it one year or less. Short-term gains follow ordinary income brackets, long-term gains the 0%, 15% or 20% rates. In the tool, each lot's status is worked out from its purchase date as of today.

Does my broker report my crypto cost basis to the IRS?

On Form 1099-DA, brokers report cost basis for digital assets acquired after 2025 (Form 1099-DA instructions, updated 04/30/2026). Their figures may differ from yours: Notice 2026-20 lets you identify the lots sold in your own books and records through 12/31/2026, but that relief does not extend to what the broker reports.

What is the long-term capital gains tax rate on crypto in the US in 2026?

For tax year 2026 (Rev. Proc. 2025-32), the rate is 0% up to $49,450 of taxable income for a single filer ($98,900 married filing jointly), 15% up to $545,500 ($613,700), then 20%. The 3.8% NIIT can come on top. The tool applies the long-term rate you enter and does not check your income.

When does the 3.8% NIIT surtax apply to a crypto sale?

When your modified adjusted gross income (MAGI) exceeds $200,000 for a single filer, $250,000 for married filing jointly or $125,000 married filing separately. It applies to the smaller of net investment income and the amount above the threshold. When ticked, the tool's box adds 3.8 points to both rates for the whole gain: in the default HIFO example, tax rises from 1,969 to 2,468 (13,125 × 18.8%).

Can a crypto capital loss be deducted from income in the US?

Yes: a net capital loss is deductible up to $3,000 a year ($1,500 married filing separately) and the excess carries forward to later years (IRS Topic 409). For example, selling 1 BTC at 40,000 under HIFO in the tool produces a 20,000 loss: 3,000 deductible this year and 17,000 carried forward. The tool then shows zero tax but does not compute that deduction.

Is this tool really free?

Yes, all tools on Kristools are 100% free and accessible without registration.

Is my data protected?

Yes. All processing is performed directly and securely inside your browser. No personal data is sent to our servers.