FIFO cost basis explained: how your share parcels are matched when you sell
29 June 2026 · Metrifly team
When you buy the same share in several lots and later sell only some of them, a question quietly decides your tax bill: which shares did you sell? You can’t tell them apart on screen, but the cost base you use — and therefore your capital gain — depends entirely on the answer. FIFO is the most common way to settle it.
This is general information, not tax advice. Check your own situation with a registered tax agent or the ATO.
What is cost basis, and why parcels matter
Your cost base is what you paid for the shares, including brokerage. Capital gain is simply:
capital gain = sale proceeds − cost base
That’s easy when you bought once and sold the lot. It gets fiddly when you’ve built a position over time — a few hundred dollars here, a dividend reinvestment there — and then sell part of it. Each of those buys is a separate parcel with its own price and its own acquisition date. Sell 150 shares out of 300 and you have to decide which parcels those 150 came from.
How FIFO works
FIFO — first-in, first-out — matches the sale to your oldest parcels first. The earliest shares you bought are treated as the first ones out the door. It’s the intuitive default: you’re emptying the queue from the front.
A worked example
Say you bought the same ETF in three parcels and then sold 150 shares at $101.40:
| Parcel | Bought | Shares | Buy price | Cost |
|---|---|---|---|---|
| 1 | Mar 2023 | 100 | $88.20 | $8,820 |
| 2 | Aug 2023 | 100 | $92.50 | $9,250 |
| 3 | Jan 2024 | 100 | $96.10 | $9,610 |
FIFO fills the 150-share sale from the top: all 100 of Parcel 1, then 50 from Parcel 2.
| Step | Amount |
|---|---|
| Sold from Parcel 1 | 100 × $88.20 = $8,820 |
| Sold from Parcel 2 | 50 × $92.50 = $4,625 |
| Cost base | $13,445 |
| Proceeds (150 × $101.40) | $15,210 |
| Capital gain | $1,765 |
The remaining 50 shares of Parcel 2 and all of Parcel 3 stay in your portfolio with their original cost bases intact — that’s your open cost base going forward.
Sold vs. retained: the ledger view
The clearest way to see FIFO is as a ledger that allocates the sale down your parcels and stops once it’s filled the quantity sold:
Everything above the line is sold and realised; everything below stays open. Keeping that ledger accurate across years of buys, DRPs and partial sells is exactly the kind of bookkeeping spreadsheets get wrong.
FIFO isn’t your only option
The order you sell parcels changes your gain, and the ATO lets you choose:
- FIFO — oldest first. Simple, and the default many people assume.
- Minimise CGT — sell the highest-cost parcels first to cut this year’s taxable gain.
- Specific parcels — nominate exactly which parcels to sell.
There’s a catch worth knowing: the 50% CGT discount only applies to parcels held more than 12 months. Selling a newer parcel to book a smaller raw gain can sometimes cost you more once the discount is taken into account, so the best choice depends on both cost and holding period. Our guide to capital gains tax on shares covers the discount in detail.
How to track it without the spreadsheet
- One sale: estimate the gain, the discount and the tax with our free CGT calculator.
- Your whole portfolio: Metrifly’s tax reporting tracks every parcel’s cost base and acquisition date, lets you switch between FIFO, minimise-CGT and specific parcels, and recalculates the net taxable gain instantly. You can see exactly which parcels each sale was matched against — and set your default method in your tax settings.
For the income side of your return, see franking credits explained; when it’s time to lodge, the EOFY checklist walks through the rest.
Summary
FIFO cost basis matches a sale to your oldest parcels first, and that choice sets your cost base, your capital gain and — through the 12-month rule — whether the 50% discount applies. Understand it once, keep an accurate parcel ledger, and let your tracker do the allocation across every buy and DRP.