Calculate your crypto cost basis using the FIFO method. First-In First-Out sells the oldest purchased lots first to determine gains and losses.
The First-In First-Out (FIFO) method is the most commonly used cost basis accounting method for cryptocurrency taxes. Under FIFO, when you sell crypto, the IRS assumes you are selling the oldest lots you purchased first. This means your cost basis for each sale comes from your earliest acquisitions, regardless of which coins or tokens you actually intended to sell.
FIFO is the default method the IRS applies if you do not specifically identify which lots you are selling. In a rising market, FIFO typically results in higher capital gains because your oldest purchases usually have the lowest cost basis. Conversely, in a declining market, FIFO may produce lower gains or larger losses since the earliest purchases may have been at higher prices.
This calculator lets you enter multiple purchase lots and a sale quantity, then computes the cost basis and resulting gain or loss using FIFO ordering. It walks through each lot from oldest to newest, consuming quantities until the sale is fully matched.
FIFO is the safest and most widely accepted method for crypto tax reporting. If you haven't designated a specific identification method, the IRS defaults to FIFO. Using this calculator ensures your cost basis is computed correctly and defensibly. It also helps you understand how FIFO produces different results than LIFO or HIFO, so you can choose the best method for your tax situation.
FIFO Order: Sell oldest 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, $30,000 gain
Under FIFO, selling 1.5 BTC uses all of lot 1 (1 BTC × $20,000 = $20,000) and half of lot 2 (0.5 BTC × $30,000 = $15,000). Total cost basis = $35,000. Proceeds = 1.5 × $50,000 = $75,000. Gain = $75,000 − $35,000 = $40,000. Note: Lot 1 was oldest so it is consumed first.
When you make a sale, the FIFO method examines your purchase history starting from the oldest transaction. It consumes the entire quantity of the oldest lot, then moves to the next oldest, and continues until the sold quantity is fully accounted for. Any partially consumed lot retains its remaining quantity for future sales.
In a bull market where prices have been climbing, your oldest lots likely have the lowest cost basis. FIFO will therefore produce the largest gains. In a bear market or after a significant correction, your oldest lots might have a higher cost basis than recent purchases, making FIFO more tax-efficient.
If FIFO produces unfavorable results, consider specific identification (Spec ID) where you choose exactly which lots to sell. HIFO (Highest-In First-Out) can minimize gains by selling the most expensive lots first. However, these methods require meticulous record-keeping and may need to be elected before the sale occurs.
FIFO is the default method the IRS uses if you do not elect a specific identification method. You are not required to use FIFO, but if you don't keep records of which lots you're selling, the IRS will apply FIFO. Many tax professionals recommend FIFO for its simplicity.
FIFO sells the oldest lots first, while LIFO (Last-In First-Out) sells the newest lots first. In a rising market, LIFO produces lower gains because the newest (usually more expensive) lots are sold, resulting in a higher cost basis.
You can use specific identification to choose lots on a per-sale basis, which effectively lets you pick any lot. However, if you default to FIFO, it must be applied consistently to all sales where you don't specifically identify lots.
Yes. FIFO is applied per asset. Your Bitcoin lots are ordered separately from your Ethereum lots. Selling ETH only consumes ETH purchase lots in FIFO order, not BTC lots.
Under universal FIFO, you pool all purchase lots for the same asset regardless of which exchange holds them. Some taxpayers use per-wallet FIFO, but the IRS has not issued definitive guidance on this. Universal FIFO is the safest approach.
Because FIFO sells the oldest lots first, those lots are more likely to have been held for over a year, potentially qualifying for long-term capital gains rates. This can be a benefit in a rising market despite the higher gain amount.