Stock Average Cost Calculator
Calculate your average cost basis across multiple stock purchases. Track unrealized gain or loss.
By Konstantin Iakovlev · Updated September 2026 · Source: SEC
Average Cost per Share
$138.00
Total Shares
25.00
Total Invested
$3,450.00
Current Value
$3,625.00
Unrealized Gain/Loss
+$175.00 (5.07%)
Purchase History
| Buy #1: 10.00 shares @ $150.00 | $1,500.00 |
| Buy #2: 15.00 shares @ $130.00 | $1,950.00 |
Average cost is calculated as total investment divided by total shares (dollar cost averaging). This does not account for fees, commissions, dividends, or tax implications. Not financial advice.
Use the Stock Average Cost Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.
Disclaimer: This calculator is for informational purposes only and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.
How It Works
Buying the same stock across several orders leaves you with one question that matters: what did you really pay per share on average? The weighted average price answers it and anchors any honest read on how the position is doing. A clean cost basis across all your buys is what supports sound decisions and sensible handling of capital gains tax.
The figure comes from dividing the total cost of every purchase by the total number of shares held. Each purchase contributes shares acquired multiplied by their purchase price, so each price counts in proportion to the shares it bought. The calculator has no commission field; to include a commission, add it to that purchase's price per share (commission ÷ shares).
Fold those purchase commissions into the basis rather than leaving them out, since dropping them inflates your apparent gain and can push you into overpaying tax. The other easy oversight is a stock split or reverse split, which shifts your per-share cost and has to be carried through before the average means anything.
Example: Averaging Two Purchases
- 1 Input (the calculator's defaults): you bought 10 shares at $150 and later 15 more at $130, and the stock now trades at $145.
- 2 Total cost: 10 × $150 + 15 × $130 = $1,500 + $1,950 = $3,450 for 25 shares.
- 3 Average cost: $3,450 / 25 = $138.00 per share.
- 4 At $145 the position is worth 25 × $145 = $3,625, an unrealized gain of $175.00, or 5.07% of the $3,450 invested. Had the first purchase carried a $5 commission, you would enter its price as $150.50 ($150 + $5 ÷ 10 shares), which lifts the average to $138.20.
Source: SEC · Last updated: September 2026
Frequently Asked Questions
How do I calculate my average cost basis for stocks?
Does averaging down on a stock make sense?
How does cost basis affect my taxes?
You might also need
Compound Interest Calculator — See Your Money Grow Over Time
Calculate compound interest with regular contributions and see how your money grows with daily, monthly, or annual compounding. Free, instant results and charts.
Inflation Calculator
Calculate the impact of inflation on purchasing power over time. See how much past dollars are worth today.
Net Worth Calculator
Calculate your net worth by adding up assets (savings, investments, property) and subtracting liabilities (loans, credit cards).