🥖 What Is Average Cost Basis?
Imagine you run a bakery.
On Monday, you bake 100 loaves at $10 each, then another 50 loaves at $12 each. You've spent $1,600 in total for 150 loaves, so your average cost per loaf is $10.67.
You don't need to track which batch each loaf came from. No matter how many loaves you sell, the average cost of the loaves you still have stays at $10.67.
The average only changes when you bake a new batch at a different price.
This is how Gotrade's Average Cost Basis works:
All purchases are averaged together, regardless of the day.
When you sell, the average cost is used as the cost basis for the shares sold.
After a sale, your remaining shares and total cost decrease, but the average cost stays the same.
The average cost only changes when you buy more shares.
🧾 Example: Buying and Selling on Different Days
Day 1 – Multiple Buys
Buy 100 shares @ $10 → $1,000
Buy 50 shares @ $12 → $600
Current Totals
Shares held: 150
Total cost: $1,600
Average Cost Basis = $1,600 ÷ 150 = $10.67
Day 2 – Buy More
Buy 30 shares @ $15 → $450
New Totals
Shares held: 180
Total cost: $2,050
Average Cost Basis = $2,050 ÷ 180 = $11.39 (changed because of the new purchase)
Day 3 – Sell 120 Shares
Cost basis for sale: 120 × $11.39 = $1,367
Remaining shares = 180 − 120 = 60
Remaining cost = $2,050 − $1,367 = $683
Average Cost Basis = $683 ÷ 60 = $11.39 (unchanged by the sale)
Day 4 – Sell 20 More Shares (No New Purchase)
Cost basis for sale: 20 × $11.39 = $228
Remaining shares = 60 − 20 = 40
Remaining cost = $683 − $228 = $455
Average Cost Basis = $455 ÷ 40 = $11.39 (unchanged)
Final State
Remaining shares: 40
Remaining cost: $455
Average Cost Basis: $11.39
🔄 When Does the Average Cost Change?
Transaction | Remaining shares | Total cost | Average cost |
Buy | Increases | Increases | Changes (blended with the new purchase price) |
Partial sell | Decreases | Decreases | Unchanged |
Sell all | 0 | $0 | Starts fresh on your next purchase |
In short: if you only sell without buying again, your average cost stays the same no matter how many times you sell. It only changes when you buy more.
