Crypto Tax Lot Calculator
Calculate capital gains using FIFO, LIFO, HIFO, and specific identification for crypto trades.
Crypto Tax Lot Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Capital Gain = (Sell Qty x Sell Price) - Sum(Used Lot Qty x Lot Price)
Worked example โ HIFO saves $22,500 in taxable gains compared to FIFO
Formula
Capital Gain = (Sell Qty x Sell Price) - Sum(Used Lot Qty x Lot Price)
The capital gain or loss is calculated by subtracting the cost basis (original purchase price) of the specific lots being sold from the total sale proceeds. Different lot selection methods (FIFO, LIFO, HIFO) determine which lots are used first.
Worked Examples
Example 1: FIFO vs HIFO Comparison
Problem:You bought 1 BTC at $20,000 (Jan), 1 BTC at $35,000 (Jun), and 0.5 BTC at $50,000 (Dec). You sell 1.5 BTC at $65,000.
Solution:FIFO: Uses Jan lot (1 BTC at $20,000) + Jun lot (0.5 BTC at $17,500) = cost basis $37,500 Gain = $97,500 - $37,500 = $60,000 HIFO: Uses Dec lot (0.5 BTC at $25,000) + Jun lot (1 BTC at $35,000) = cost basis $60,000 Gain = $97,500 - $60,000 = $37,500
Result:HIFO saves $22,500 in taxable gains compared to FIFO
Example 2: Tax Impact of Lot Selection
Problem:You have 3 lots: 2 BTC at $16,500, 1.5 BTC at $27,000, 0.5 BTC at $42,000. You sell 1.5 BTC at $65,000. Compare all methods.
Solution:Proceeds = 1.5 x $65,000 = $97,500 FIFO cost basis: 1.5 x $16,500 = $24,750 => Gain = $72,750 LIFO cost basis: 0.5 x $42,000 + 1.0 x $27,000 = $48,000 => Gain = $49,500 HIFO cost basis: 0.5 x $42,000 + 1.0 x $27,000 = $48,000 => Gain = $49,500 LOFO cost basis: 1.5 x $16,500 = $24,750 => Gain = $72,750
Result:HIFO/LIFO save $23,250 in taxable gains vs FIFO/LOFO
Frequently Asked Questions
What is the FIFO method for crypto tax lot accounting?
FIFO stands for First In, First Out. Under this method, the earliest purchased cryptocurrency units are considered sold first when you dispose of your holdings. For example, if you bought 1 BTC in January at $20,000 and another 1 BTC in June at $30,000, selling 1 BTC would use the January lot first. FIFO is the default method used by the IRS if you do not specify a particular lot identification method. Many tax software tools automatically apply FIFO because it is straightforward and widely accepted by tax authorities across jurisdictions globally.
How does HIFO help minimize crypto capital gains taxes?
HIFO stands for Highest In, First Out, meaning the lots with the highest cost basis are sold first. This strategy minimizes your capital gains because selling high-cost lots first reduces the difference between your sale proceeds and cost basis. For instance, if you have lots purchased at $15,000, $30,000, and $45,000 per BTC, HIFO would use the $45,000 lot first, producing the smallest gain or even a loss. The IRS permits specific identification of lots, which effectively allows HIFO, provided you maintain adequate records identifying each lot at the time of sale.
What records do I need to keep for crypto tax lot identification?
The IRS requires detailed records for every cryptocurrency transaction including the date of acquisition, the cost basis in USD at the time of purchase, the amount of cryptocurrency acquired, the date of sale or disposal, the fair market value at the time of sale, and any fees or commissions paid. For specific identification methods like HIFO, you must also document which specific lots you intended to sell at the time of the transaction. Exchange records, wallet addresses, blockchain transaction hashes, and screenshots of orders all serve as valid documentation for your records.
What is the difference between short-term and long-term capital gains for crypto?
Short-term capital gains apply to cryptocurrency held for one year or less and are taxed at your ordinary income tax rate, which can be as high as 37% for federal taxes. Long-term capital gains apply to cryptocurrency held for more than one year and benefit from preferential tax rates of 0%, 15%, or 20% depending on your taxable income. This distinction makes holding period awareness critical for tax planning. When choosing which lots to sell, consider both the cost basis and the holding period, as selling a slightly lower cost basis lot that qualifies for long-term rates may result in lower overall taxes.
Can I use different lot methods for different crypto transactions?
Yes, the IRS allows taxpayers to use specific identification on a per-transaction basis, meaning you can choose different lots for different sales throughout the year. However, you must clearly identify which lots you are selling at the time of the transaction, not retroactively at tax filing time. Some exchanges support lot selection directly in their interface, while others require you to track this independently. It is important to remain consistent in your record-keeping and to be able to demonstrate your chosen method to the IRS if audited. Consult a tax professional familiar with cryptocurrency to ensure full compliance.
What is the difference between LIFO and LOFO?
LIFO orders lots by acquisition date, newest first, while LOFO orders them by cost, cheapest first. They only coincide by accident. In a market that has risen steadily the newest lots are also the most expensive, so LIFO and HIFO select the same units and LOFO matches FIFO, which is why the comparison table can show identical figures. After a drawdown and recovery, however, the newest lot may be cheap, and LIFO then produces a much larger gain than HIFO. LOFO maximises the reported gain, which is occasionally deliberate if you are carrying forward capital losses and want to realise gains for them to absorb.
Why can the lot with the smallest gain still produce the larger tax bill?
Crypto Tax Lot Calculator ranks methods by the size of the taxable gain, not by the tax actually due, and the holding period is what breaks that ranking. Units held more than one year qualify for long-term rates, while units held a year or less are taxed as ordinary income. Selling a cheap lot bought three years ago can produce a bigger gain that is taxed at a preferential long-term rate, and still beat a small short-term gain taxed at your marginal ordinary rate. Check the acquisition date of each lot the method selects before treating the lowest-gain option as the cheapest one.
How do exchange fees and network gas costs affect a lot's cost basis?
Acquisition costs generally increase the cost basis of the units bought, and disposal costs generally reduce the proceeds, so both reduce the taxable gain. If you buy one unit for 30,000 dollars and pay a 60 dollar trading fee, the lot's basis is commonly recorded as 30,060 rather than 30,000. Fees paid in the token itself add a wrinkle, because spending crypto to pay a fee is itself a disposal of that crypto. The prices entered here are bare unit prices, so add fees into the per-unit figure yourself if you want the basis to reflect them.
Does cost basis have to be tracked separately for each wallet and exchange account?
The direction of travel in United States guidance is away from treating all your holdings of a token as one universal pool and toward tracking basis account by account and wallet by wallet. Under a per-account approach, a sale on one exchange can only draw on lots held in that account, so a high-basis lot sitting in cold storage is not available to offset a gain realised elsewhere. That materially narrows what HIFO can reach. Because the transition rules and effective dates are detailed, confirm the current position with official IRS guidance or a tax professional before relying on pooled basis.
Do wash sale rules stop me from selling a loss lot and rebuying immediately?
The wash sale rule in the United States is written for stocks and securities, and cryptocurrency has generally been treated as property rather than a security, which is why selling a loss lot and repurchasing the same token shortly afterwards has commonly been accepted where equities would not be. Proposals to extend the rule to digital assets have been raised repeatedly, and the economic substance doctrine can still be applied to transactions with no purpose beyond the deduction. This is an area where the law can move, so verify the current rule before building a harvesting plan around it.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎCrypto Airdrop Tax Calculator
Calculate tax liability on crypto airdrops based on fair market value at time of receipt.
๐งฎDeFi Yield Tax Calculator
Calculate tax on DeFi yield farming, staking, and lending income by jurisdiction.
๐งฎCrypto Loss Harvesting Calculator
Identify crypto positions with unrealized losses for tax-loss harvesting opportunities.
๐งฎAirdrop Tax Calculator
Calculate tax liability on crypto airdrops by jurisdiction from token quantity and FMV.
๐งฎFutures Funding Rate Calculator
Calculate the cost or income from perpetual futures funding rate payments.
๐Capital Gains Calculator
Free online calculator
๐งฎCrypto Position Size Calculator
Calculate optimal crypto position size from account balance, risk percentage, and stop loss.
๐งฎCrypto Leverage Calculator
Calculate crypto leveraged position size, liquidation price, and risk from margin and leverage.