Compare allocation methods on the same transactions
Select a crypto symbol and enter each buy and sell with its date, quantity and USD price per unit. Use actual trade records where available. Transactions are sorted by date; equal-date transactions use their displayed row order. Enter those rows in execution order. A sale larger than the holdings available at that time stops the calculation.
FIFO, LIFO and HIFO
FIFO consumes the earliest available lot. LIFO consumes the latest available lot. HIFO consumes the highest-priced available lot. Each purchase remains a separate lot even when dates, prices and quantities are identical. The method changes cost allocation, not total cash paid or received.
For an illustrative buy of 1 unit at $30,000, a later buy of 1 unit at $50,000, then a sale of 1 unit at $45,000: FIFO realizes $15,000 and leaves $50,000 of cost. LIFO and HIFO realize −$5,000 and leave $30,000. At a reference price of $45,000, realized plus unrealized profit is $10,000 under each method, before costs. These are invented prices.
Read the quantities in the formulas
Sale proceeds = sold quantity × sale price per unit. Realized gain = sale proceeds − cost allocated to sold units. Remaining cost = sum of each remaining lot quantity × its purchase price. Average remaining cost = remaining cost / remaining quantity. Unrealized gain = remaining quantity × reference price − remaining cost. An average or percentage with no meaningful denominator is not a trading signal.
Tax records require more than a method selector
The IRS digital-assets guide calls for transaction records and basis information. Its current digital-asset FAQs explain transaction costs and rules applying from 2025. The controls here do not establish compliance with identification, broker or wallet requirements.
A daily closing quote is not evidence of the amount you paid or received. Fetching one overwrites the row's price for a scenario. This calculator omits fees, transfers, rewards, gifts, inherited assets and jurisdiction-specific adjustments. It does not choose a tax rate or file a return.
Keep the exported scope clear
Export CSV saves the remaining lot table. It does not export your complete transaction ledger or each sale's matched lots. Retain execution timestamps, quantities, fees, wallet or account identifiers and supporting records separately.