Stock Average Cost Calculator
Enter every purchase of a stock or fund to find your weighted average cost per share, including dollar-cost-averaging style purchases made over time. Add a current price to see an unrealized gain or loss.
Enter your purchases
Leave blank to skip the unrealized gain or loss section.
Across 15 shares and 2 purchases.
- Total shares
- 15
- Total invested
- $1,600.00
- Current value
- $1,650.00
- Unrealized gain/loss
- +$50.00 (+3.13%)
How average cost per share is calculated
Average cost per share is a share-weighted average, not a simple average of the prices you paid. Each purchase contributes in proportion to how many shares it added, so larger purchases pull the average toward their price more than smaller ones do.
Average cost = Σ(shares × price) / Σshares- Σ(shares × price)
- Total amount invested across all purchases
- Σshares
- Total shares purchased
This differs from a simple average of purchase prices whenever purchase sizes differ. For example, buying more shares at a lower price pulls the weighted average down further than averaging the two prices alone would suggest — which is the basis of dollar-cost averaging.
10 shares at $100, then 5 shares at $120
Two purchases: 10 shares at $100 per share, then 5 shares at $120 per share. Total invested is $1,600 across 15 shares, for a weighted average cost of $106.67 per share. With a current price of $110 per share, the position is worth $1,650 — an unrealized gain of $50, or +3.125%.
| Purchase | Shares | Price per share | Amount invested |
|---|---|---|---|
| 1 | 10 | $100.00 | $1,000.00 |
| 2 | 5 | $120.00 | $600.00 |
| Total | 15 | $106.67 (average) | $1,600.00 |
What this calculator assumes
- No transaction fees or commissions are included unless you add them into the price per share you enter.
- No tax-lot selection, wash-sale rules, or capital-gains treatment is applied.
- Fractional shares are supported for every purchase row.
- The current price per share is whatever you enter — this calculator does not fetch live market data.
- Money values are rounded to the nearest cent for display.
Stock average cost FAQ
How is average cost different from a simple average?
A simple average treats every purchase price equally regardless of size. Weighted average cost accounts for how many shares each purchase added, so a larger purchase has more influence on the result than a smaller one at the same price.
Does this account for dividends or splits?
No. Reinvested dividends should be entered as their own purchase rows if you want them included. Stock splits are not automatically adjusted — enter post-split share counts and prices for purchases made before a split if you want a consistent average.
Can I use this for dollar-cost averaging?
Yes. Add one row per recurring purchase — for example, a monthly buy — and this calculator computes the resulting weighted average cost across all of them, up to 50 rows.
Sources and review notes
- U.S. Securities and Exchange Commission, Investor.gov — Dollar-Cost Averaging
- GetSmarterAboutMoney.ca, Ontario Securities Commission — investing education
Methodology last checked Jul 14, 2026. Formula implementation is covered by deterministic unit tests. No financial professional review is claimed yet.