stock cost averaging calculator

Calculate Your Average Cost Basis

Add each stock purchase lot, then calculate your weighted average cost per share, unrealized gain/loss, and how many additional shares may be needed to reach a target average.

Target Average Planner (optional)

What Is Stock Cost Averaging?

Stock cost averaging is the process of buying shares at different prices over time so your total position has a blended, or weighted, average cost. Instead of focusing on a single entry point, you spread your purchases across multiple transactions.

This approach can reduce the emotional pressure of trying to “time the market perfectly.” When prices drop, additional purchases can lower your overall average cost per share. When prices rise, you still participate in potential upside through the shares you already own.

How This Calculator Works

This calculator uses weighted averages, not simple averages. Each lot is weighted by the number of shares in that lot.

Core Formula

Average Cost Per Share = Total Cost Basis ÷ Total Shares

  • Total Cost Basis = sum of (shares bought × buy price) across all lots
  • Total Shares = sum of shares across all lots

If you enter a current market price, the tool also estimates unrealized gain or loss:

  • Market Value = total shares × current market price
  • Unrealized Gain/Loss = market value − total cost basis

How to Use the Tool

  1. Add each purchase lot with shares and buy price.
  2. Click Add Purchase Lot for as many entries as you need.
  3. Optionally enter current market price to evaluate your position today.
  4. Optionally enter a future buy price and a target average cost to estimate how many more shares you would need.
  5. Click Calculate.

Example

Suppose you bought:

  • 10 shares at $100
  • 15 shares at $80

Total shares = 25. Total cost basis = $2,200. Average cost = $2,200 ÷ 25 = $88.00 per share.

If the stock is now at $92, your market value is $2,300 and unrealized gain is $100.

Target Average Planner: Important Notes

The planner estimates how many additional shares are needed at a future buy price to reach a desired average cost. For a lower average, the future buy price usually needs to be below your target average.

  • If your current average is already at or below target, no extra shares are required.
  • If the math returns an impossible scenario, the tool will explain why.
  • Share counts are rounded up to whole shares for practical execution.

Common Mistakes to Avoid

  • Using a simple average of prices instead of a weighted average by share count.
  • Ignoring fees, commissions, or taxes in your real portfolio tracking.
  • Averaging down into low-quality businesses without a clear thesis.
  • Confusing “lower average cost” with “lower risk.” They are not the same.

Risk Management Reminder

Cost averaging can be a useful position management technique, but it does not guarantee profits and does not protect against permanent capital loss. Always evaluate fundamentals, diversification, time horizon, and position sizing before adding more shares.

This page is for educational purposes only and is not financial advice.

🔗 Related Calculators