IndexCrypto
Educational only. Not financial, tax or legal advice, and nothing here is a recommendation to buy anything.

Crypto Cost Basis: FIFO, LIFO, HIFO Explained

Understand crypto cost basis methods: FIFO, LIFO, HIFO, and specific identification. See how each affects taxes and which jurisdictions allow them.

When you sell or exchange cryptocurrency, the gain or loss is the difference between what you received and your cost basis—the original value of the asset for tax purposes. The method you use to determine which units of crypto you sold, and therefore their cost basis, directly affects your taxable gain or loss. This page explains the common cost basis methods—FIFO, LIFO, HIFO, and specific identification—how each works, and what to consider when choosing one.

Tax treatment of cryptocurrency varies by country, and the rules for cost basis methods are not uniform. Some jurisdictions mandate a specific method, others allow a choice, and some have not yet issued clear guidance. Always check the tax authority in your own jurisdiction for the methods they permit and the record-keeping requirements. Where the law is unsettled—particularly for staking rewards—this page notes that rather than offering a definitive answer.

What Is Cost Basis?

Cost basis is the value you originally paid for a cryptocurrency, including fees and other acquisition costs. When you dispose of that crypto—by selling, trading, or spending it—you realize a capital gain or loss equal to the disposal proceeds minus the cost basis. If you acquired the same cryptocurrency at different times and prices, you need a rule to decide which units you disposed of and what their cost basis is. That rule is your cost basis method.

The Main Cost Basis Methods

FIFO (First-In, First-Out)

FIFO assumes the first units you acquired are the first units you sell. It is the default method in many jurisdictions, including the United States for most taxpayers, unless another method is elected. FIFO is straightforward and requires minimal record-keeping: you track the purchase dates and amounts in chronological order.

One change matters more than the choice of method. From 1 January 2025, US taxpayers must track basis per wallet or per account rather than across all holdings at once (Treas. Reg. §1.1012-1(j)(3)). Universal tracking — pooling everything and applying one method across the pool — is no longer available. Rev. Proc. 2024-28 set out a safe harbour for allocating unused basis to specific wallets as of that date. If your records or your software still treat your holdings as a single pool, that is the first thing to fix, before the choice between FIFO and anything else.

Because FIFO sells the oldest units first, it often results in higher gains in a rising market, since older units typically have lower cost bases. In a falling market, it may produce higher losses. FIFO is generally accepted by tax authorities because it is objective and consistent.

LIFO (Last-In, First-Out)

LIFO assumes the most recently acquired units are sold first. This method is not permitted in all jurisdictions, and some countries explicitly prohibit it. In the United States, as with HIFO, LIFO is reachable through specific identification rather than as a standalone election — the question is not whether the label is approved but whether your records support identifying those particular units. Where allowed, LIFO can be advantageous in a rising market because it sells the highest-cost units first, reducing taxable gains. However, LIFO requires careful tracking of the most recent acquisitions and may be subject to specific rules.

HIFO (Highest-In, First-Out)

HIFO sells the units with the highest cost basis first, regardless of acquisition date. This method minimizes gains (or maximizes losses) in most scenarios. In the United States it is available — not as a separate election, but as an application of specific identification under Treas. Reg. §1.1012-1(j): if you can identify the exact units you are disposing of, you may choose the highest-basis ones. What that requires is records showing each unit’s acquisition date and time, its basis, and the disposal it was matched to, kept at the level the regulation demands. Software that offers a HIFO setting is doing that matching for you; whether the result stands up depends on whether the underlying records do. Other jurisdictions differ, so verify before relying on it.

Specific Identification

Specific identification allows you to choose which units you are selling, provided you can identify them at the time of sale. This method offers the most flexibility, as you can select units with the highest cost basis to minimize gains. However, it requires meticulous record-keeping and may have strict notification requirements. Some jurisdictions, like the US, allow specific identification for crypto if you meet certain conditions, but the rules are complex and not always clear.

How Each Method Affects Your Tax Bill

The table below summarizes how each method affects your tax bill in different market conditions and whether it is commonly permitted.

MethodEffect in Rising MarketEffect in Falling MarketWhen It Does NOT Apply
FIFOHigher gains (older, lower cost basis)Lower gains or higher lossesWhen the jurisdiction mandates a different method, e.g., some countries require average cost
LIFOLower gains (recent, higher cost basis)Higher gains (recent, lower cost basis)When the jurisdiction prohibits LIFO, e.g., US IRS does not approve for crypto
HIFOLowest gains (highest cost basis)Lowest gains or highest lossesWhen you cannot substantiate specific identification, or the jurisdiction requires FIFO
Specific IDFlexible, can select high-cost unitsFlexible, can select low-cost unitsWhen the jurisdiction requires a specific method or does not recognize specific identification for crypto

Consistency Requirement

Once you choose a cost basis method, you must apply it consistently across all your crypto transactions. You cannot switch methods per trade to minimize taxes. Tax authorities expect a uniform approach, and changing methods without justification may trigger scrutiny. For example, if you use FIFO for one sale, you cannot use LIFO for the next unless you formally change your accounting method, which may require approval.

What People Get Wrong: The Misdiagnosis

A common misconception is that you can choose the cost basis method that gives you the lowest tax bill for each individual transaction. This is a natural mistake because it seems logical to minimize taxes. However, tax rules require consistency. Another misconception is that all jurisdictions accept all methods. In reality, many countries have specific requirements, and using a method like HIFO can lead to penalties if not permitted.

People also often confuse cost basis with the amount they originally invested, ignoring fees and other adjustments. For example, if you bought crypto with a fee, that fee should be added to your cost basis. Failing to include fees understates your basis and overstates your gain.

How to Calculate Cost Basis

To calculate cost basis, you need to track:

  • The date and time of each acquisition
  • The amount of crypto acquired
  • The price in your local currency at the time of acquisition
  • Any fees or commissions paid

For each disposal, apply your chosen method to determine which units were sold and their cost basis. For example, under FIFO, you would match the sale against the oldest remaining units.

Example Calculation (FIFO)

Suppose you bought 1 BTC at 30,000 and later bought another 1 BTC at 40,000. If you sell 1 BTC, FIFO would assign the cost basis of 30,000, resulting in a gain based on that cost. LIFO would assign 40,000, resulting in a lower gain. HIFO would also assign 40,000 if that is the highest cost.

Note that this example uses hypothetical prices to illustrate the method; actual prices vary.

Staking Rewards: An Unsettled Area

Staking rewards are a particularly complex area for cost basis. When you receive staking rewards, the tax treatment is not fully settled in many jurisdictions. Some countries treat rewards as income at the time they are received, while others may treat them as capital gains when sold. The cost basis of the staked asset itself can also be unclear if you stake the same asset multiple times. Because the rules are still evolving, you should consult a tax professional familiar with your jurisdiction and keep detailed records of all staking activities.

What to Check for Your Jurisdiction

To ensure compliance, check the following for your country:

  • Which cost basis methods are permitted (FIFO, LIFO, HIFO, specific identification, or average cost)
  • Whether you must use a specific method or can choose
  • Record-keeping requirements (e.g., must you track each unit individually?)
  • How staking rewards are taxed and what cost basis applies
  • Whether you need to report cost basis to the tax authority on each transaction

Tax laws change, and cryptocurrency guidance is still developing. Always refer to the official tax authority’s website or seek professional advice.

Choosing a cost basis method

Understanding cost basis methods is essential for accurate crypto tax reporting. FIFO is the most common and widely accepted, while LIFO and HIFO are less frequently permitted. Specific identification offers flexibility but requires rigorous tracking. Consistency is key, and you must follow the rules of your jurisdiction. Because the tax treatment of crypto, especially staking, is still evolving, stay informed and consult a professional when in doubt.

Common questions

What is the best cost basis method for crypto?

The best method depends on your jurisdiction and your transaction history. FIFO is the default in many places and is simple, but if you have acquired crypto at different prices, methods like specific identification might lower your taxes. However, not all methods are allowed everywhere, so you must check what your tax authority permits.

Can I use HIFO for crypto taxes?

HIFO is not permitted in many jurisdictions, including the United States. Using a method that is not approved can lead to penalties. Always confirm with your tax authority whether HIFO is accepted before using it for tax reporting.

Do I have to use the same cost basis method for all my crypto?

Yes, you must apply your chosen method consistently across all your crypto transactions. Switching methods per trade is not allowed. If you need to change your method, you may have to request approval from your tax authority.

How do I calculate cost basis for crypto I received from staking?

The cost basis for staking rewards depends on how your jurisdiction taxes them. Some countries treat rewards as income at the time of receipt, giving them a cost basis equal to their fair market value. Others may have different rules. Since this area is unsettled, consult a tax professional and keep detailed records.

What if I don't know the cost basis of my crypto?

If you don't have records, you may need to reconstruct your cost basis from exchange statements, transaction histories, or other documentation. Some tax software can help estimate it, but accuracy is crucial. In some cases, the tax authority may assume a zero cost basis, which would increase your tax liability.

Read next