Sub topic 2
Calculating Average Cost per Share
This chapter assumes you know what a share and an ETF are, can work with decimals, and understand a simple average. The examples use a hypothetical $100 purchase at each price. They illustrate the arithmetic and are not investment advice.
Average cost per share
Average cost per share is the total dollars invested divided by the total shares bought. It differs from the simple average of the prices. With a fixed dollar amount per purchase, you buy more shares when the price is low, so the average cost usually lands below the simple average.
Each purchase buys contribution / price shares. Add up the shares, then divide the total invested by that share count.
prices = [50, 40, 25, 40, 50]
contribution = 100
shares = [contribution / p for p in prices]
total_shares = sum(shares)
invested = contribution * len(prices)
avg_cost = invested / total_shares
print(round(total_shares, 4), round(avg_cost, 2))
# 13.0 38.46The simple average price is $41, but the average cost is $38.46.
Automating recurring investments
Many brokers let you schedule recurring purchases by dollar amount, such as weekly or monthly. The broker converts the dollar amount to shares at the market price when the order fills. Fractional quantities are cut to the broker's decimal precision, so the amount invested can be slightly below the target. Check your broker's rules.
Lump-sum investing versus DCA
Lump-sum investing puts the full amount in at once. Dollar-cost averaging (DCA) spreads it across several purchases. Lump-sum investing has more time in the market, so it often wins when prices rise. For example, $500 invested at $40 with prices rising to $60 ends at $750 as a lump sum and about $612.42 under DCA. When prices fall, DCA buys more shares at low prices and often does better.
Behavior, discipline, and regret
A recurring plan works best when you keep it through price drops. Lump-sum investors may regret investing just before a fall. DCA investors may regret holding cash while prices rise. Set the schedule before prices move, and write it down so you can follow it.
Costs, fees, and minimums
Check each purchase for commissions, spreads, and account fees. Small fees matter more when purchases are small. Some brokers set minimum order amounts or limit which funds can be bought in fractional amounts. Include every fee when you calculate your cost basis.
Exercise
Using the prices [50, 40, 25, 40, 50] with $100 per purchase and a $2 fee on each purchase, what is the average cost per share?
Show answer
Total invested is $500 + $10 in fees = $510. Total shares remain 13.0. Average cost is $510 / 13.0 = $39.23 per share.