FIFO assigns your oldest purchases to a sale first; weighted average spreads the purchase cost across the shares you hold. That can give the same sale two different realised gains, even though the cash you receive is identical.
The useful check is what remains afterwards. A smaller realised gain should leave a larger unrealised gain in the shares you still own. If your records lose that connection, changing a setting can appear to create or erase profit.
Here is one worked example, run through Krosos's acquisition-lot engine on 21 September 2026. It compares the bookkeeping, then separates that from the method your tax rules require.
Four purchases, one partial sale
Imagine buying the same ordinary share in one taxable account, in this order. All figures are euros. There are no fees, dividends, currency conversions, transfers or corporate actions in this example.
| Purchase | Shares | Price per share | Purchase cost |
|---|---|---|---|
| First | 100 | €10 | €1,000 |
| Second | 200 | €15 | €3,000 |
| Third | 100 | €20 | €2,000 |
| Fourth | 100 | €30 | €3,000 |
| Total | 500 | €9,000 |
You sell 150 shares at €25, receiving €3,750. You still own 350 shares. At that same price, the remaining holding is worth €8,750.
The question is how much of the original €9,000 purchase cost belongs to the 150 shares sold. Subtracting the whole €9,000 from this partial sale would count the cost of shares you still own.
FIFO: use the oldest purchases first
FIFO means first in, first out. The sale consumes the first 100 shares at €10, then 50 of the 200 shares bought at €15.
- Cost assigned to the sale: 100 × €10 + 50 × €15 = €1,750.
- Realised gain: €3,750 proceeds minus €1,750 cost = €2,000.
- Remaining cost basis: €9,000 minus €1,750 = €7,250.
The remaining holding contains 150 shares from the second purchase and all 200 shares from the third and fourth purchases. It still contains the expensive €30 shares, even though today's price is €25.
That is why the large realised gain does not describe every share you bought. It describes the older shares that this method assigns to this particular sale.
Weighted average: use the cost of the whole pool
The weighted average is €9,000 divided by 500 shares, or €18 per share. It is not the simple average of the four quoted purchase prices: the second purchase contains twice as many shares as each other purchase.
- Cost assigned to the sale: 150 × €18 = €2,700.
- Realised gain: €3,750 minus €2,700 = €1,050.
- Remaining cost basis: €9,000 minus €2,700 = €6,300.
With no intervening purchase, the remaining 350 shares still have an average cost of €18 each. A later purchase would change that average. A future purchase cannot be included in the average used for a sale that already happened.
The reconciliation that catches missing profit
Here are both engine results together. Unrealised gain means the remaining holding's value minus its remaining cost basis, using the same €25 market price throughout.
| After selling 150 shares | FIFO | Weighted average |
|---|---|---|
| Cash received | €3,750 | €3,750 |
| Cost assigned to sale | €1,750 | €2,700 |
| Realised gain | €2,000 | €1,050 |
| Shares remaining | 350 | 350 |
| Remaining holding value | €8,750 | €8,750 |
| Remaining cost basis | €7,250 | €6,300 |
| Unrealised gain | €1,500 | €2,450 |
| Realised plus unrealised gain | €3,500 | €3,500 |
The €950 difference in realised gain reappears in the remaining unrealised gain. Nothing disappeared: €3,750 cash plus €8,750 of shares is €12,500, compared with €9,000 spent.
Selling every remaining share immediately at €25 would realise the remaining gain. Across both sales, either method would produce €3,500 of total gain before tax and fees. Tax timing, annual allowances and changes in price can still make the eventual tax bills differ. Equal economic profit does not promise equal tax.
Nor is €3,500 a return percentage. A percentage measuring investment performance also needs to account for the timing of purchases and cash flows. This example checks euro amounts only.
France and Germany: the method is not a preference
A display setting does not determine what you may put on a tax return. Check the country, asset and account involved before treating either column as your filing calculation.
For French securities of the same nature bought at different prices, the tax authority describes the weighted average acquisition price, commonly called PMP. The illustration here uses that arithmetic. This statement concerns ordinary securities; it is not a description of every French account or asset regime. See the official BOFiP treatment of acquisition prices and our separate French investment-tax explanation.
Germany's EStG §20(4), sentence 7 treats the oldest fungible securities in collective custody as sold first. That is the FIFO case, rather than an invitation to select whichever number is smaller. The statutory rule and our German tax example explain the context. Funds, allowances and other adjustments belong after establishing the relevant gain; the two columns above are not final tax bills.
Both source rules were checked on 21 September 2026. This comparison deliberately does not extend to Belgian transition rules, tax wrappers or digital assets.
Keep the history when you move money
A current balance tells you how many shares you own and what they are worth. It cannot, by itself, reconstruct the four purchases above. If a new account shows 350 shares worth €8,750 after a transfer, that value is not evidence that you paid €8,750 for them.
Keep acquisition dates, quantities and original costs alongside the movement. When a broker or an app shows a different gain, compare the sale quantity and proceeds first, then the cost assigned to the sale and the basis left behind. Only then investigate fees, exchange rates, transfers or missing purchases. Otherwise, a correct price can conceal an incomplete history.
Krosos's tax view supports FIFO and weighted-average lot bookkeeping. The example above was computed using that engine, with no customer data. It verifies the arithmetic for these stated inputs, not the completeness of an imported account or a tax declaration. The engine needs the acquisition history or appropriate declared basis to explain the gain; a synced balance is not a substitute for it.
For an investor who buys, sells and reallocates regularly, the record worth maintaining is the connection between each sale and what remains. That is what makes the next sale understandable without rebuilding the history each spring.
These are worked estimates from stated assumptions, for understanding and planning. They are not tax advice.