Updated 30 September 2026
What is cost basis?
Cost basis (called cost base in Australia and adjusted cost base in Canada) is the total cost of acquiring an investment. For shares and ETFs that is the purchase amount plus the brokerage and other costs of buying. When you sell, your proceeds are the sale amount minus the costs of selling.
A negative result is a capital loss. Many countries also care how long you held the units (the holding period), which is why the dates on each purchase matter as much as the prices.
FIFO, LIFO, specific lots or average cost?
Every separate purchase is a lot (or parcel). When you sell only part of a holding, you need a rule for which lots you sold:
- FIFO (first in, first out): the oldest units are sold first. Simple, and often produces longer holding periods, but in a rising market it also tends to produce the largest gain.
- LIFO (last in, first out): the newest units are sold first. Often a smaller gain in a rising market, but shorter holding periods.
- Specific identification: you choose exactly which lots to sell, for example the ones with the highest cost. The most flexible, and it needs good records made at the time of sale.
- Average cost: every unit carries the average cost of all units held. No lot tracking, but the gain on a partial sale is a blend.
You usually don't get a free choice. Your country's rules decide which methods are allowed, and some countries mandate one.
Worked example
An illustrative investor buys and sells the same ETF (US dollars):
| Date | Action | Units | Price | Fee | Cost basis or proceeds |
|---|---|---|---|---|---|
| 10 Jan 2023 | Buy (lot 1) | 100 | $50 | $10 | $5,010 |
| 5 Mar 2025 | Buy (lot 2) | 100 | $70 | $10 | $7,010 |
| 20 Jun 2025 | Sell | 150 | $80 | $15 | $11,985 |
The proceeds are $12,000 − $15 = $11,985 whichever method you use. The cost basis of the 150 units sold is what changes:
| Method | Units matched | Cost basis | Gain |
|---|---|---|---|
| FIFO | 100 from lot 1, 50 from lot 2 | $5,010 + $3,505 = $8,515 | $3,470 |
| LIFO | 100 from lot 2, 50 from lot 1 | $7,010 + $2,505 = $9,515 | $2,470 |
| Average cost | 150 at $60.10 ($12,020 ÷ 200) | $9,015 | $2,970 |
Same trades, three different gains, a $1,000 spread. The holding period differs too. Under FIFO, the 100 units from lot 1 were held for more than two years and the 50 from lot 2 for about three and a half months. Splitting the proceeds by lot shows each part: 100/150 of $11,985 is $7,990, a gain of $2,980 on lot 1, and 50/150 is $3,995, a gain of $490 on lot 2.
Try your own numbers with the capital gains calculator.
What happens to cost basis after a stock split?
Nothing happens to the total. A 2-for-1 split doubles your units and halves the cost per unit; the lot keeps its original purchase date. Reverse splits work the other way. Other corporate actions (spin-offs, mergers, return of capital, fund distributions that adjust cost) can move cost basis between holdings or reduce it, and the issuer usually publishes how to apportion it.
How do you handle foreign currency?
Generally, you convert each side of the trade to your home currency at the exchange rate on the date of that transaction: the purchase at the purchase-date rate and the sale at the sale-date rate. Your gain therefore includes currency movement. A UK investor can make a gain in pounds on a US share whose dollar price didn't move, if the dollar strengthened in between. Check with your accountant which rates to use where you live.
How should you keep cost basis records?
For every lot: the date, units, amount paid, fees, currency and exchange rate. For every sale: the same, plus which lots it used. Brokers report some of this, but they lose history when you transfer between platforms, and they don't know about shares you bought elsewhere.
Worthbase keeps a lot-by-lot ledger for you. Your AI reads broker statements and records the trades; Worthbase includes fees in cost base, deducts them from proceeds, stores the exchange rate on each row and matches sales first in, first out by default, or against the specific lots you name. It reports realised and unrealised gains and losses per holding and per sale. It does not calculate LIFO or average cost, and it reports gains and losses, not tax: check what you owe with your accountant.
This guide is general information, not financial or tax advice.
Questions
Do brokerage fees count in cost basis?
Generally yes. Buying fees are added to cost basis and selling fees reduce proceeds, which lowers your gain on both ends. Check your country's rules for other costs such as stamp duty or advice fees.
Can I switch between FIFO and specific identification?
It depends on where you live. Some countries let you identify the lots you sell at the time of each sale; others prescribe a single method. Check with your accountant.
What if I don't know my original cost basis?
Look for old contract notes, broker statements or transfer paperwork. Without records, you can't work out the gain accurately, so ask your accountant how to handle it.
Are dividends part of the capital gain?
No. Dividends and interest are income, not part of the gain on a sale. Reinvested dividends, though, buy new lots with their own cost basis and date.