Share this article →

Cryptocurrency Tax Calculations: What is FIFO, LIFO, and HIFO?

fifo lifo hifo blog 1350
william avatar

by William Carlsen · Updated Sep. 21, 2020

You might have come across the terms FIFO, LIFO, and HIFO when reading about cryptocurrency tax calculations. These terms are sometimes also referred to as different cost basis methods. Every time you sell a coin or token, for example selling BTC and receiving USD in return, you have to determine which coins from your holdings are actually being sold to work out your capital gains correctly.

If this sounds complicated, there is no need to worry as we will in this article explain everything in detail using easily understandable terms.

Read this article to learn about:

What exactly is FIFO, LIFO, and HIFO?

Practical examples for each cost basis method

Which methods you are allowed to use

How to reduce your crypto taxes and capital gains

Definitions

Every time you sell, trade, or purchase any goods or services with a cryptocurrency, you need to calculate the capital gains for that transaction. The general formula for calculating capital gains is:

capital gains = selling price – purchase price

The selling price is simply the value of what you sold (disposed of) at the time of the transaction or the value of what you received. The purchase price (acquisition cost) is what you originally paid when you acquired the coins in the past, also referred to as the cost basis.

The general rule is that you can add any associated transaction costs to the cost basis. In the cryptocurrency world, this is usually any fees you paid which is typically between 0.1-2% on popular exchanges today.

To explain more in detail how to calculate cost basis and the resulting capital gains using FIFO, LIFO, and HIFO in practice, we will look at a basic example for buying and selling Ethereum. All transactions can be seen in the table below:

Tx No.TypeDateAmountPriceFeesCost BasisCapital Gains
1Buy2019-08-142.0 ETH$420$4.2$424.2
2Buy2019-10-296.0 ETH$1,200$6.0$1,206
3Buy2020-03-143.5 ETH$460$460
4Sell2020-06-054.0 ETH$970$9.7(?)(?)
5Sell2020-08-123.0 ETH$1,150(?)(?)

In 2020, we sold some of the earlier purchased Ethereum and received USD in return, which means we also need to calculate the resulting capital gains. To do so, we need to first calculate the cost basis which we will now do in detail for each different cost basis method.

FIFO Cost Basis

FIFO is short for “First-In, First-Out”, which means that we are selling the coins in the same order as they were acquired. In other words, we are always selling the oldest coins first.

  • Transaction 4: Selling 4 ETH. The cost basis is found as the acquisition cost of 2 ETH on August 14th, 2019 (Tx #1) + acquisition cost of 2 ETH on October 29th, 2019 (Tx #2):

$424.2 + (2/6 * $1,206) + $9.7 = $835.9

Note that we have also added the $9.7 fee in the cost basis calculation.

  • Transaction 5: Selling 3 ETH. After selling 4 ETH previously, we now have sold 2 of the 6 ETH acquired earlier (Tx #2). The cost basis is therefore found as the acquisition cost of 3 ETH from the remaining 4 ETH on October 29th, 2019 (Tx #2):

3/6 * $1,206 = $603

Now that we have found the cost basis for both Sell transactions, we can easily work out the capital gains this way:

Capital gains, 4 ETH sold:

$970 – $835.9 = $134.1


Capital gains, 3 ETH sold:

$1150 – $603 = $547

Using FIFO cost basis method, the total capital gains is then found as:

$134.1 + $547 = $681.1

LIFO Cost Basis

LIFO is short for “Last-In, First-Out”, which in practice means that we are selling the coins in the opposite order as done using FIFO. In other words, we are always selling the most recent acquired coins first.

Now, let’s see how we can calculate the cost basis using LIFO cost basis method:

  • Transaction 4: Selling 4 ETH. The cost basis is found as the acquisition cost of 3.5 ETH on March 14th, 2020 (Tx #3) + acquisition cost of 0.5 ETH on October 29th, 2019 (Tx #2):

$460 + (0.5/6 * $1,206) + $9.7 = $570.2

  • Transaction 5: Selling 3 ETH. After selling 4 ETH previously, we now have sold 0.5 of the 6 ETH acquired earlier (Tx #2). The cost basis is therefore found as the acquisition cost of 3 ETH from the remaining 5.5 ETH on October 29th, 2019 (Tx #2):

3/6 * $1,206 = $603

Now that we have found the cost basis for both Sell transactions, we can easily work out the capital gains this way:

Capital gains, 4 ETH sold:

$970 – $570.2 = $399.8


Capital gains, 3 ETH sold:

$1,150 – $603 = $547

Using LIFO cost basis method, the total capital gains is then found as:

$399.8 + $547 = $946.8

Compared to the capital gains found using FIFO above, using LIFO does result in higher capital gains which means also an increase in the amount of tax we will have to pay.

HIFO Cost Basis

HIFO is short for “Highest-In, First-Out” and works exactly as it sounds by selling coins from highest to lowest cost basis value (purchase price).

This means that the HIFO cost basis method will minimize the total capital gains as much as possible by minimizing the realized gain for each transaction. Keep in mind it will also lead to the largest realized losses so you might end up with a net capital loss that can be used to offset other income. (NB! rules for offsetting other income varies from country to country.)

Let’s do the same calculations for our example above using HIFO cost basis method. First, we will add a new column to our table called Avg. Cost which is the average cost basis for each unit of ETH:

Tx No.TypeDateAmountPriceFeesCost BasisCapital GainsAvg. Cost
1Buy2019-08-142.0 ETH$420$4.2$424.2$212.1/ETH
2Buy2019-10-296.0 ETH$1,200$6.0$1,206$201.0/ETH
3Buy2020-03-143.5 ETH$460$460$131.4/ETH
4Sell2020-06-054.0 ETH$970$9.7(?)(?)
5Sell2020-08-123.0 ETH$1,150(?)(?)

Now that we have established the average cost for each Buy transaction, we can use the HIFO cost basis method to calculate the lowest possible capital gains:

  • Transaction 4: Selling 4 ETH. The highest cost available is from the purchase of 2 ETH on August 14, 2020, which will be sold first. Next, we will sell the remaining 2 ETH from the lot purchased on October 29th, 2019, which has the second-highest cost basis. As you already might have noticed, this will give the same resulting cost basis and capital gains as using the FIFO method above.
  • Transaction 5: Selling 3 ETH. After selling 4 ETH previously, we now have sold 2 of the 6 ETH acquired earlier (Tx #2) which still has the highest cost available. We will therefore sell 3 ETH from the same lot purchased on October 29th. This also gives the same result as the FIFO method, so there will not be any difference in the total capital gains using FIFO or HIFO in this example.

This was a very simple example with only five transactions in total, but you can imagine that we can get a very different result with hundreds or thousands of transactions spanning over several years which is often the case for crypto traders that have used exchanges like Coinbase or Binance.

Choosing the Right Method

Let’s first look at a few key differences so that we understand the general implications a bit better.

FIFO:
Since we are selling the oldest coins first, FIFO can often lead to the highest capital gains in a market that is trending up (bull market), and where the initial purchase price is lower than current prices. On the other hand, in a bear market where prices are declining, FIFO can minimize your capital gains if the initial purchase price is higher than current prices.

LIFO:
Basically the opposite as FIFO: it can lead to significantly lower capital gains in a bull market that is trending up, and higher capital gains in a bear market with declining prices.

HIFO:
This will always lead to the lowest possible capital gains since each transaction considers the highest cost basis available.

Now, you might think that choosing HIFO is the obvious decision to reduce your taxes as much as possible, but it’s actually not that simple.

First, you need to consider which cost basis method you are actually allowed to use in your country. Tax authorities in some countries have released guidance for which methods can be used for cryptocurrency tax calculation purposes, but this is not the case in all countries. You should therefore always check with your local tax authority what is allowed or not.

In the US, you are allowed to use any method available as long as you can specifically identify which unit of cryptocurrency is being sold. This is also often referred to as Specific Identification (see Notice 24 issued by the IRS) and is very beneficial for cryptocurrency traders and investors in the US, and such provides them with great opportunities for tax saving.

But keep in mind that in the US, the amount of tax you pay is also decided by how long you held (or owned) the cryptocurrency before you later sold it and realized the gains. Short term gains from cryptocurrencies owned less than one year are taxed at a higher rate than assets owned for more than six months.

A cryptocurrency tax solution like Coinpanda automatically keeps track of long/short term gains, and you can check your total tax liability for FIFO, LIFO, and HIFO (and even other cost basis methods) before deciding which method you should chose when filing your tax report.

Conclusion

As it should be clear now, cryptocurrency tax calculations can be quite complicated, and terms like FIFO and LIFO can definitely confuse a lot of people. There are several different methods that can be used to calculate capital gains, and the three methods discussed in this article are the most widely used around the world today including the US. Which method results in the lowest possible tax burden depends on many factors, so it may be a good idea to do separate calculations for the different methods before submitting the tax return.

The most important thing to do is to keep track of all transactions you have on different exchanges and wallets. If you have more than 20-30 transactions it will be very difficult (in fact, almost impossible) to use spreadsheets like Excel. Most people chose therefore to use a cryptocurrency tax solution to automate the whole process.

We at Coinpanda have built a tax solution that is used by more than 7,500 crypto traders and investors today. You can easily generate your crypto tax reports using either one of the cost basis methods discussed in this article.

Do you want to minimize your taxes as much as possible by running calculations using all different methods before filing your taxes? No problem! You can sign up for a 100% free account here, or view some of our sample tax reports first.

If you want to learn more about how cryptocurrencies such as bitcoin are taxed, please refer to our in-depth tax guides that are regularly updated:

Be the first who know about Crypto news everyday

Get crypto analysis, news and updates right to your inbox! Sign up here so you don’t miss a single newsletter.

newsletter bg

TRY US

No more time wasted

Join Coinpanda today and save hours doing your crypto taxes.