# What is FIFO?

You are here:

FIFO stands for First In, First Out and is a common valuation method for managing assets and the method which is recommended by the Inland Revenue for calculating personal cryptocurrency profits and losses.

In simple terms, the first token purchased is matched with the first token of the same kind that is sold and the difference in value between these two events is either profit or loss. For example if i make the following purchases and sales;

Using FIFO, sell order 3 would be matched with buy order 1 and the profit would be calculated as;

`(1* \$13,000) - (1* \$10,000) = \$3,000`

Then sell order 4 would be matched to buy order 2 and the profit would be calculated as;

`(1 * \$14,000) - (1 * \$12,000) = \$2.000`

This is relatively straight forward when sale quantities exactly match purchase quantities, but that is not a very common scenario to have orders which exactly match up like this. Most likely partial sales are going to occur and FIFO can handle that too. For example if i make the following purchases and sales;

Using FIFO, sell order 3 would first match 0.5 BTC with buy order 1 and then match an additional 0.25 BTC from buy order 2 leaving 1.25 BTC over. In this case the profit would be;

`(0.75 * 13,000) - (0.5 * \$10,000) - (0.25 * \$12,000) = \$1,250`

Then sell order 4 would match its 1 BTC with the remaining 1.25 BTC of buy order 2 and in this case the profit would be;

`1 * \$14,000 - 1 * \$12,000 = \$2,000`

And hopefully you’ve noticed that there’s going to be a leftover amount of 0.25 BTC from buy order 2. If these were all the trades we made in the tax year we would conclude that we ended the year with \$3,250 in profit and an inventory of 0.25 BTC.

This 0.25 BTC of inventory will be kept on record and used to match with the first sales of the following tax year. This is further explained in our article on inter-year accounting.

As you can see, once you have to account for partial orders, multiple cryptocurrencies, trades across base pairs, inter year accounting and not to mention converting the cryptocurrency into your local currency at the time of sale the whole thing can get complicated very quickly.

This is what Taxoshi is here to solve for you with our tried and tested FIFO calculation algorithm.

For further reading on First In First Out, check out this article published by Investopedia – First In, First Out (FIFO).

### Other Resources

#### IRD Guidance

The Inland Revenue has released more information on their position on cryptocurrency and tax

#### Employee Schemes

Inland Revenue is extending its guidance on cryptocurrencies to cover their use in employee share schemes

#### Industry Opinion

Scott Mason from Findex unpacks the Inland Revenue guidance on cryptocurrency taxation