FIFO or weighted average: the same sale, two gains.
The cost method decides which cost is set against a sale. This guide takes two buys and one sale and works out the gain both ways.
The two methods
What each method sets against a sale.
First in, first out (FIFO) sells the oldest units first. The cost of sale is the cost of those oldest units. Weighted average pools all the units held and gives each one the same average cost. The cost of sale is the number of units sold times that average.
Fees count in both methods. A fee on a buy goes into the cost of the units bought. A fee on a sell comes off the proceeds.
The example
Two buys and one sale.
Buy 100 units at 10.00 with a fee of 5.00, and the cost is 1,005.00. Buy another 100 units at 12.00 with a fee of 5.00, and the cost is 1,205.00. Then sell 150 units at 13.00 with a fee of 5.00. Proceeds are 1,950.00 less the fee of 5.00, which is 1,945.00.
| Transaction | Units | Price | Fee | Cost or proceeds |
|---|---|---|---|---|
| Buy | 100 | 10.00 | 5.00 | 1,005.00 cost |
| Buy | 100 | 12.00 | 5.00 | 1,205.00 cost |
| Sell | 150 | 13.00 | 5.00 | 1,945.00 proceeds after fee |
FIFO
The gain under FIFO.
The sale takes all 100 units of the first buy, then 50 units of the second. The second buy cost 1,205.00 for 100 units, so each unit cost 12.05. The cost of sale is 1,005.00 + 50 × 12.05 = 1,005.00 + 602.50 = 1,607.50.
The gain is 1,945.00 − 1,607.50 = 337.50. The 50 units left carry the rest of the second buy: 50 × 12.05 = 602.50.
| Item | Working | Amount |
|---|---|---|
| Proceeds after fee | 1,950.00 − 5.00 | 1,945.00 |
| Cost of sale | 1,005.00 + 50 × 12.05 | 1,607.50 |
| Gain on disposal | 1,945.00 − 1,607.50 | 337.50 |
| 50 units left | 50 × 12.05 | 602.50 |
Weighted average
The gain under weighted average.
The pool holds 200 units at a total cost of 1,005.00 + 1,205.00 = 2,210.00. The average cost is 2,210.00 ÷ 200 = 11.05 a unit. The cost of sale is 150 × 11.05 = 1,657.50.
The gain is 1,945.00 − 1,657.50 = 287.50. The 50 units left carry 50 × 11.05 = 552.50.
| Item | Working | Amount |
|---|---|---|
| Proceeds after fee | 1,950.00 − 5.00 | 1,945.00 |
| Average cost | 2,210.00 ÷ 200 | 11.05 a unit |
| Cost of sale | 150 × 11.05 | 1,657.50 |
| Gain on disposal | 1,945.00 − 1,657.50 | 287.50 |
| 50 units left | 50 × 11.05 | 552.50 |
Both methods use the same total cost: 1,607.50 + 602.50 = 2,210.00 and 1,657.50 + 552.50 = 2,210.00. They differ only in how that cost is split between the sale and the units left.
In kerd.ai
How kerd.ai keeps the working.
The cost method is chosen for each client, and it locks once the first transaction is recorded. A client keeps one method for the whole history.
Each gain keeps its working: the lots used, the fees, the cost of sale and the rates applied, stored as they were on the day. Gains are shown in the instrument's currency and in the client's base currency, split into a price part and an FX part.
Questions
Questions about cost methods
Why does the gain differ between the two methods?
The total cost is the same. FIFO sets the older, cheaper units against the sale first, and weighted average spreads the cost evenly. The split between the sale and the units left differs, and so does the gain.
Which method should a client use?
That depends on the client's accounting framework and the rules that apply to them. kerd.ai does not give tax or accounting advice. It applies the method you choose.
Do fees change the gain?
Yes. A fee on a buy adds to the cost of the units. A fee on a sell reduces the proceeds.
Can I change the method later?
Not once the first transaction is recorded for the client. Choose it when you set the client up.
See the working behind every gain.
The Features page lists what kerd.ai keeps for each sale. Ask for access and set the cost method on your first client.