First in – First out (FIFO)

To calculate the cost price, we use the FIFO principle. The FIFO principle means that assets bought first are sold first. The cost price is calculated on the basis of the purchase prices of the remaining assets.

An example:

We take a portfolio in which there have been two purchases and one sale of the same asset:

DateFundsQuantityPriceCash Flow
23.07.2020CSIF (CH) Equity Switzerland Large Cap Blue ZB101’373.76-13’737.60
01.09.2021CSIF (CH) Equity Switzerland Large Cap Blue ZB21’679.18-3’358.36
25.05.2022CSIF (CH) Equity Switzerland Large Cap Blue ZB-51’581.06-7’905.30

Cost price after FIFO

According to the FIFO principle, five of the shares acquired on 23 July 2020 were sold on 25 May 2022. The cost price calculation therefore takes into account the following stock:

DateFundsQuantityPriceCash Flow
23.07.2020CSIF (CH) Equity Switzerland Large Cap Blue ZB51’373.76-6’868.80
01.09.2021CSIF (CH) Equity Switzerland Large Cap Blue ZB21’679.18-3’358.36
Cost price after FIFO71’461.02-10’227.16
Cost price after FIFO

Cost price without the FIFO principle

If it were calculated on a cash flow basis without taking into account the FIFO principle, the cost price would be different:

DateFundsQuantityPriceCash Flow
23.07.2020CSIF (CH) Equity Switzerland Large Cap Blue ZB101’373.76-13’737.60
01.09.2021CSIF (CH) Equity Switzerland Large Cap Blue ZB21’679.18-3’358.36
25.05.2022CSIF (CH) Equity Switzerland Large Cap Blue ZB-51’581.067’905.30
Cost price (without FIFO principle)71’312.95-9’190.66
Cost price (without FIFO principle)

In this case, the cost price would be even lower than the lowest purchase price ever achieved. The reason for this unintuitive result is that the sale of the five shares has generated a profit that lowers the overall cost price:

  • The average cost price before the sale of the five shares was 1’424.66.
  • With the sale of the five shares, a profit of 781.98 (156.40 x five shares) was made.
  • By distributing this profit over the remaining seven shares (111.71), the average cost price is reduced to 1,312.95.

As you can see, although the FIFO cost price is more difficult to calculate, it has its purpose. If the FIFO principle is not followed, it can lead to irrelevant results.