2026-01-15 · Kiveo Stock

FIFO vs LIFO vs Weighted Average: which cost basis method is right for you?

A practical comparison of the three main cost basis methods, when each is required, and how to switch between them in a free A-share portfolio tracker.

Picking a cost basis method isn’t just an accounting exercise — it changes the P&L number you see every day. Here’s how the three main methods differ and when to use each.

Why cost basis methods matter

In any A-share portfolio tracker, FIFO LIFO weighted average are the three cost basis methods you will encounter. The right choice depends on your tax situation, your trading style, and whether you want to match official brokerage statements. For most individual A-share investors, FIFO and weighted average produce the most intuitive P&L; LIFO is useful in volatile markets where you want to match recent prices.

Quick summary

MethodPairs sells withBest for
Weighted averageAll buys blended into one costMost retail investors
FIFO (First In, First Out)The oldest buysTax compliance in some jurisdictions
LIFO (Last In, First Out)The newest buysSelling recent winners in volatile markets

A worked example

You buy 100 shares at ¥10, 100 at ¥12, 100 at ¥14. You sell 100 at ¥15.

  • Weighted average: cost = (10×100 + 12×100 + 14×100) / 300 = ¥12. P&L = 15 − 12 = ¥3 × 100 = ¥300.
  • FIFO: sell matches the ¥10 lot. P&L = 15 − 10 = ¥5 × 100 = ¥500.
  • LIFO: sell matches the ¥14 lot. P&L = 15 − 14 = ¥1 × 100 = ¥100.

Same trade, three different reported P&L. That’s why the method matters.

Switching methods

The Kiveo Stock dashboard lets you switch methods with one click — useful when comparing how your real return looks under each assumption. Note: switching doesn’t change your actual trades, only how realized P&L is computed.

What about realized vs unrealized P&L?

  • Realized P&L is locked in when you sell.
  • Unrealized P&L is paper profit/loss on shares you still hold.

The cost basis method only affects realized P&L. Unrealized P&L is always (current price − cost) × shares.

Try it

Open the Kiveo Stock dashboard and log a few trades. Switch between FIFO, LIFO and weighted average in the settings panel to see how your numbers change.

Ready to take control of your A-share portfolio?

Start using the free A-share portfolio tracker in under 30 seconds. No signup, no credit card.

Open the App