Stock Average Cost Calculator

Calculate your average cost basis across multiple stock purchases. Track unrealized gain or loss.

Purchases
$
$
$

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

Our Stock Average Cost Calculator helps you determine the weighted average price you've paid for shares of a particular stock, crucial for understanding your true investment performance. In 2026, with the S&P 500 projected to reach 5,800, accurately tracking your cost basis across multiple buys is essential for informed decision-making and optimizing potential capital gains tax liabilities.

The average cost basis is calculated by dividing the total cost of all stock purchases (shares acquired multiplied by their respective purchase prices, plus any commissions) by the total number of shares owned. This methodology ensures all acquisition costs are proportionally reflected.

Remember to include all purchase commissions in your cost basis, as neglecting them inflates your apparent gain and can lead to overpaying taxes. A common mistake is forgetting to adjust for stock splits or reverse splits, which directly impact your per-share cost.

Example: Calculating Your Average Cost for NVIDIA (NVDA) Shares in 2026

  1. 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. 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. 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. 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?
Divide the total amount invested by the total number of shares. If you bought 50 shares at $100 and later 50 shares at $80, your average cost is (50x100 + 50x80) / 100 = $90 per share.
Does averaging down on a stock make sense?
Averaging down (buying more at lower prices) reduces your cost basis but increases your exposure to a potentially declining stock. It only makes sense if you believe the stock is fundamentally undervalued and your original investment thesis is intact.
How does cost basis affect my taxes?
Your cost basis determines your capital gain or loss when you sell. Higher cost basis means lower taxable gains. Methods like FIFO (first in, first out) or specific lot identification can be used to select which shares are sold for tax optimization.