Stock Average Cost Calculator
Calculate your average cost basis across multiple stock purchases. Track unrealized gain or loss.
By Konstantin Iakovlev · Updated April 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. Heading into 2026, with the S&P 500 projected to reach 5,800, 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, with any commissions folded in, so the result reflects every dollar of acquisition cost in proportion to the shares it bought.
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: Calculating Your Average Cost for NVIDIA (NVDA) Shares in 2026
- 1 Step 1: Your initial purchase of NVIDIA (NVDA) on January 15, 2026, was 50 shares at $120.00 per share, with a $7.99 commission. Your second purchase on March 10, 2026, was 30 shares at $135.50 per share, with a $6.50 commission.
- 2 Step 2: Calculate the total cost for each purchase: (50 shares * $120.00) + $7.99 = $6,007.99. Then, (30 shares * $135.50) + $6.50 = $4,071.50. Sum these totals: $6,007.99 + $4,071.50 = $10,079.49.
- 3 Step 3: Determine the total number of shares owned: 50 shares + 30 shares = 80 shares. Now, divide the total cost by the total shares: $10,079.49 / 80 shares.
- 4 Step 4: Your average cost basis for NVIDIA (NVDA) shares is $125.99 per share. If NVDA is currently trading at $140.00, your unrealized gain is $14.01 per share, or $1,120.80 in total.
Source: SEC · Last updated: April 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).