FIFO cost basis explained: how your share parcels are matched when you sell

29 June 2026 · Metrifly team

FIFO cost basis: a sale of 150 shares draws from the oldest parcels first, producing a cost base of $13,445 and a capital gain of $1,765.

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:

ParcelBoughtSharesBuy priceCost
1Mar 2023100$88.20$8,820
2Aug 2023100$92.50$9,250
3Jan 2024100$96.10$9,610

FIFO fills the 150-share sale from the top: all 100 of Parcel 1, then 50 from Parcel 2.

StepAmount
Sold from Parcel 1100 × $88.20 = $8,820
Sold from Parcel 250 × $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:

FIFO allocation ledger showing which parcels a sale is matched against and the resulting capital gain

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:

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

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.

Start tracking for free.