You bought the same token three times at three different prices, and now you are selling one unit. Which of those three purchases did you just sell? Nothing on chain answers that, because the units are interchangeable. An accounting rule answers it instead, and the rule you use decides whether that sale reports a gain or a loss.
What a cost basis method actually decides
Every purchase you make creates a lot: a parcel of units carrying the price you paid and the date you paid it. A cost basis method is the rule that matches a sale against one of those lots. It picks which purchase price is deducted from your sale proceeds, and it does nothing else.
That narrow job has a wide effect. The deduction is what turns proceeds into a realized gain or a realized loss, so the matching rule sits directly under the figure you report. It does not change what you paid in total, it does not change what you sold for, and it does not change the cost basis of the holding as a whole. It changes which slice of that total is charged against this particular sale.
The rule is not reserved for cash exits either. In systems that treat a swap of one token for another as a taxable event, every trade between two assets is a disposal that has to be matched against a lot, even though nothing was converted to cash.
FIFO: the oldest units go first
First in, first out works down a queue. A sale is matched against the earliest lot you still hold; when that lot is exhausted, the next earliest takes over. Sell one unit and the oldest surviving purchase is the one deemed gone.
If the price climbed after you started buying, your oldest lot is the cheapest one you own. FIFO therefore deducts your smallest cost and reports your largest gain. If the price fell over that period, the same rule works the other way and hands you your largest deduction.
FIFO has a second effect worth separating from the first. Because it spends your oldest units, it also spends your longest holding period. Where a tax system charges long-held and short-held gains at different rates, which lot left can reach the result through the rate as well as through the basis.
LIFO: the newest units go first
Last in, first out reads the same queue backwards. A sale is matched against the most recent purchase first, then the one before it, and so on up the stack.
The consequences invert. If the price climbed while you were buying, your newest lot is your dearest, so LIFO deducts the larger cost and reports the smaller gain. The holding period is the mirror image too: LIFO spends your newest units, so the sale carries the shortest holding period you have, which in a system with a lower long-term rate is the more expensive one to spend.
Two more rules that answer the same question
Highest in, first out drops the queue and sorts by price instead, matching the sale against the dearest lot you still hold. Where prices only ever rose, HIFO and LIFO pick the same lot and cannot be told apart; where the market moved both ways, they diverge.
Average cost picks no lot at all. It merges every unit of that token into one pool with one blended cost per unit, and a sale deducts a proportional share of that pool. Because the per-unit figure survives the sale unchanged, an average-cost disposal leaves the break-even on your remaining units exactly where it was.
| Rule | Which lot the sale is matched to | Cost deducted | Holding period spent |
|---|---|---|---|
| FIFO | The earliest one you still hold | The oldest price you paid | The longest you hold |
| LIFO | The most recent one you still hold | The newest price you paid | The shortest you hold |
| HIFO | The dearest one you still hold | The highest price you paid | Whichever that lot carries |
| Average cost | None; the units are pooled | A proportional share of the pool | Set by the system's own rule |
The same sale under four rules
Say you bought one unit at $21,000. A second unit cost $75,000 and a third cost $60,000. You now sell one unit for $50,000. Pooled together, those three purchases give an average cost of $52,000 per unit.
| Rule | Lot matched to this sale | Cost basis deducted | Result reported |
|---|---|---|---|
| FIFO | The first purchase | $21,000 | Gain of $29,000 |
| LIFO | The third purchase | $60,000 | Loss of $10,000 |
| HIFO | The second purchase | $75,000 | Loss of $25,000 |
| Average cost | No single lot | $52,000 | Loss of $2,000 |
One sale, one price, four answers, spread from a gain of $29,000 to a loss of $25,000. Nothing about the trade moved; only the rule matching it to a purchase did.
Why the method shifts timing rather than totals
Sell the whole holding and the spread collapses. Total proceeds minus everything you ever paid is the same figure under all four rules, because all four draw from one pool of costs. A cost claimed against this sale is a cost that is no longer available for the next one.
That makes the choice a timing choice rather than a size choice. FIFO front-loads gains and leaves the expensive lots to be matched later; LIFO and HIFO deduct the expensive lots first and leave the cheap ones waiting at the end. A rule that lowers the figure on this sale raises the figure on the units still sitting in your wallet.
It is also why switching rules partway through a holding is a problem rather than an optimisation. Two rules applied to one queue will spend some lots twice and skip others, and a lot that has already been matched is gone from the queue whichever rule matched it.
Where the choice is not yours
These four rules are arithmetic, but which of them you are allowed to apply is law, and crypto tax rules by country diverge on exactly this point.
The United States runs the question through identification. Its tax authority states that you may identify a specific unit by documenting that unit's unique digital identifier, such as a private key, public key and address, or by records showing, for all units of that asset held in a single account, wallet or address, the date and time each unit was acquired, your basis and its fair market value at acquisition, the date and time of disposal, and the fair market value and the amount received at disposal. If you do not identify specific units, the same guidance deems them disposed of in chronological order beginning with the earliest unit you acquired, that is, on a first in, first out basis.
Two details in that arrangement do the practical work. The identification is made no later than the date and time of the sale, disposition or transfer, by identifying the particular units on your own books and records, which makes it a decision at the moment of the trade rather than a choice made later at filing time. And basis conventions are applied on an account-by-account basis, with guidance issued on allocating unused basis to the assets held in each wallet or account as of the start of 2025, so the queue a sale draws from is the queue inside that one account rather than one merged queue across everything you own.
The United Kingdom does not pose the question in these terms at all. Where tokens are dealt in without identifying the particular ones being disposed of, its tax authority pools them, and each type of token needs its own pool, so a holder of bitcoin, ether and litecoin keeps three pools. A disposal then deducts a proportional share of the pooled cost, which is average cost under another name. Two matching rules sit in front of the pool: acquisitions made on the same day as a disposal are treated as one transaction, and acquisitions made in the 30 days after a disposal are matched to it earliest disposal first.
The bottom line
FIFO matches a sale to your earliest lot, LIFO to your latest, HIFO to your dearest, and average cost to no lot at all, pooling instead. Over the life of a position all four reach the same total, so the real difference is when a gain lands and which holding period it spends.
Before reaching for whichever rule reports the smallest number today, check two things: whether your jurisdiction lets you pick at all, and if it does, whether the pick has to be recorded before the trade rather than after it. A method you cannot evidence is not a method you have chosen. To keep learning the fundamentals, follow more from Bitbase Academy.
Related reading
Other Bitbase articles on this topic:
- Realized PnL Report vs Transaction History: Which Record Your Taxes Need
- Compounding and Position Growth
- What Is Crypto Day Trading? How It Works and Its Risks
- NFT Bid Scams and Fake Token Offers Explained
- What Is a Fiat On-Ramp? Turning Cash Into Crypto
Disclaimer: This article is educational content from Bitbase Academy, provided for information only. It does not constitute investment, trading, tax, or financial advice. Crypto assets are volatile; assess your own risk. Written as of September 2026; refer to the latest official information.
References
[1] Internal Revenue Service, Frequently Asked Questions on Virtual Currency Transactions, Q40 and Q41 irs.gov
[2] Internal Revenue Service, Rev. Proc. 2024-28, guidance for taxpayers to allocate basis in digital assets to wallets or accounts as of January 1, 2025 irs.gov
[3] HM Revenue and Customs, Cryptoassets Manual, CRYPTO22200: pooling gov.uk
[4] HM Revenue and Customs, Cryptoassets Manual, CRYPTO22251: example 1, basic section 104 pool disposal gov.uk






