Selling crypto creates a taxable disposal, and the gain depends entirely on which acquisition lot you match it against. This calculator lets you enter your buys and sells, pick an accounting method, and see the matched cost basis, gain or loss, and holding period for every disposal.
How it works
Each disposal is filled by drawing down open lots in an order set by the method:
FIFO → consume oldest lots first (sort lots by date ascending)
LIFO → consume newest lots first (sort lots by date descending)
HIFO → consume highest unit-cost lots first (sort by cost/qty descending)
unit cost basis = lot total cost / lot quantity
matched basis = unit cost basis × quantity taken from that lot
gain = proceeds share − matched basis
holding period = disposal date − acquisition date (long-term if > 365 days)
Proceeds for a disposal are split across the lots it touches in proportion to the quantity taken from each, so a single sell can produce both a short-term and a long-term component.
Example and tips
If you bought 1 BTC for 20,000 in January and 1 BTC for 40,000 in June, then sold 1 BTC for 50,000 in December, FIFO matches the January lot for a 30,000 gain, LIFO matches the June lot for a 10,000 gain, and HIFO also matches the June (highest-cost) lot for a 10,000 gain. The same trade, three very different tax bills. Keep every lot’s date and cost accurate — errors compound across chained disposals, and the holding-period flag depends on exact dates.