Cost Basis Methods for Crypto: FIFO, LIFO, and Average Cost Explained
When calculating your crypto gains for taxes, the cost basis method you choose matters. Here is a simple explanation of each method.
Uvin Vindula — IAMUVIN
Published 2026-02-22 · Updated 2026-03-18
What Is Cost Basis?
When you sell crypto and need to calculate your gain or loss, you need to know what you originally paid for it — this is your cost basis. Simple, right? Not quite. If you have been DCA-ing into Bitcoin weekly for a year, you have 52 different purchase prices. When you sell some Bitcoin, which purchase price do you use?
This is where cost basis methods come in.
The Three Main Methods
1. FIFO (First In, First Out)
The oldest coins you bought are considered the first ones sold. If you bought Bitcoin at $20,000 in January and $30,000 in June, and sell some in December, your cost basis is $20,000 (the first purchase).
Pros: Simple, widely accepted, standard in most jurisdictions
Cons: In a rising market, this means higher taxable gains (since your oldest purchases are usually cheapest)
2. LIFO (Last In, First Out)
The newest coins you bought are considered the first ones sold. Using the same example, your cost basis would be $30,000 (the most recent purchase).
Pros: In a rising market, this results in lower taxable gains
Cons: Not accepted in all jurisdictions, can be complicated to track
3. Average Cost (ACB - Adjusted Cost Base)
You calculate the average price of all your purchases. If you bought 0.5 BTC at $20,000 and 0.5 BTC at $30,000, your average cost basis is $25,000 per BTC.
Pros: Simplest to calculate, especially for frequent DCA investors
Cons: May not minimize tax in all situations
Comparison Example
| Purchase | Amount | Price | Total Cost |
|---|---|---|---|
| January | 0.1 BTC | $20,000 | $2,000 |
| April | 0.1 BTC | $30,000 | $3,000 |
| July | 0.1 BTC | $25,000 | $2,500 |
Now you sell 0.1 BTC at $40,000 ($4,000 proceeds):
| Method | Cost Basis | Taxable Gain |
|---|---|---|
| FIFO | $2,000 (January purchase) | $2,000 |
| LIFO | $2,500 (July purchase) | $1,500 |
| Average Cost | $2,500 (average of all three) | $1,500 |
Which Method Should You Use?
This depends on your jurisdiction and tax situation. In many countries, FIFO is the default or required method. In Sri Lanka, the regulations are still developing, but keeping records that support any method is the smartest approach.
My Recommendation
Keep records detailed enough to calculate using ANY method. This gives you flexibility when regulations are clarified. At minimum, record every transaction with date, amount, price, and fees.
Use our tools page for tracking resources.
Disclaimer: This is educational content only and is NOT tax advice. Tax methods and regulations vary by jurisdiction and can change. Always consult a qualified tax professional for advice specific to your situation.

By Uvin Vindula — IAMUVIN
Sri Lanka's leading Bitcoin educator. Author of "The Rise of Bitcoin".
Learn more →Related Articles
The Bitcoin Brief: LK
Weekly Bitcoin insights, market analysis, and Sri Lanka crypto news. Join 1,000+ readers.
Unsubscribe anytime · Educational content only