Crypto FIFO Cost Basis Calculator

Calculate your crypto cost basis using the FIFO method. First-In First-Out sells the oldest purchased lots first to determine gains and losses.

Purchase Lots (oldest first)

$
$
$

Sale Details

$
FIFO Cost Basis
$35,000.00
Sale Proceeds
$75,000.00
Capital Gain/Loss
$40,000.00
Gain
Planning notes, formulas, and examples

About the Crypto FIFO Cost Basis Calculator

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.

When This Page Helps

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.

How to Use the Inputs

  1. Enter each purchase lot with its date, quantity, and price per unit.
  2. Enter the quantity of crypto you are selling.
  3. Enter the sale price per unit.
  4. The calculator processes lots from oldest to newest (FIFO order).
  5. View the total cost basis, gain or loss, and per-lot breakdown.
  6. Compare with LIFO or HIFO calculators to see which method minimizes tax.
Formula used
FIFO Order: Sell oldest lots first Cost Basis = ฮฃ (lot quantity used ร— lot price per unit) Gain/Loss = (Sale Quantity ร— Sale Price) โˆ’ Total Cost Basis

Example Calculation

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.

Tips & Best Practices

  • FIFO is the IRS default โ€” if you don't specify a method, this is what the IRS assumes.
  • In a bull market, FIFO usually produces the highest taxable gain because the oldest (cheapest) lots are sold first.
  • Keep dated purchase records for every lot to support your FIFO calculations.
  • You can switch to specific identification if your exchange supports it, but you must elect it before the sale.
  • FIFO simplifies record-keeping because you don't need to track which specific lots you sell.
  • Use FIFO alongside other methods to compare and choose the most tax-efficient approach for each sale.

How FIFO Works Step by Step

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.

FIFO in Rising vs Falling Markets

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.

When to Consider Alternatives

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.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • 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.