MaximCalculator Free, fun & accurate calculators
📉 Platinum finance layout
🌙Dark Mode

Stock Average Cost Calculator

Bought the same stock at different prices? This free Stock Average Cost calculator (also called a Dollar-Cost Averaging or “DCA average price” tool) combines multiple buys into one clear answer: your true average cost per share, your break-even price, and your profit/loss at today’s price — including optional trading fees. Everything runs in your browser (no signup).

🧾Multiple buys → one average cost
⚖️Includes fees for “real” cost basis
🎯Break-even + target profit price
📱Made for screenshots & sharing

Enter your stock purchases

Add each buy (lot). The calculator totals your shares and total invested amount, then computes average cost per share. Use “Fees” if your broker charges commissions or you want to include taxes/charges in the cost basis.

$
💱
🎯
Shares
Buy price
Fees
Your stock average cost will appear here
Add at least one buy (shares + price), then tap “Calculate Average Cost”.
Tip: If you include fees, your average cost is a more realistic break-even.

Educational use only. This calculator does not provide investment advice. Always verify numbers with your broker statement, and consider taxes, dividends, and corporate actions.

📚 Formula & breakdown

How the Stock Average Cost calculation works

Your average cost per share is simply your total money spent on shares divided by the total number of shares you own (from the purchases you entered). The only “trick” is making sure you’re adding each buy correctly — and deciding whether to include fees.

1) Total shares

If you bought n lots, and each lot i has shares sᵢ, then:
Total shares = s₁ + s₂ + … + sₙ.

2) Total cost (with optional fees)

Each lot has a buy price pᵢ and an optional fee fᵢ (commission, brokerage fee, taxes/charges you want to treat as part of cost). The cost of one lot is:
Lot cost = (sᵢ × pᵢ) + fᵢ.
Add all lots to get:
Total cost = Σ[(sᵢ × pᵢ) + fᵢ].

3) Average cost per share

Finally:
Average cost per share = Total cost ÷ Total shares.
This number is also your basic break-even price (before taxes and after accounting for fees you included). If the market price is above this, you’re in unrealized profit; if below, unrealized loss.

4) Unrealized profit/loss (optional current price)

If you enter a current price P, the calculator estimates:
Unrealized P/L = (P − Average cost) × Total shares.
The tool also shows a percent change relative to your total cost:
P/L % = Unrealized P/L ÷ Total cost × 100.

5) Target profit price (optional)

If you set a target profit amount T (like “I want to be up $500”), the required price becomes:
Target price = Average cost + (T ÷ Total shares).
This is a clean “goal line” for screenshots — but it’s not a guarantee the market will reach it.

🧪 Example

Example: averaging down (and why fees matter)

Imagine you bought the same stock three times:

  • Buy 1: 10 shares at $50, fee $0 → cost = 10×50 = $500
  • Buy 2: 10 shares at $40, fee $0 → cost = 10×40 = $400
  • Buy 3: 20 shares at $35, fee $0 → cost = 20×35 = $700

Total shares = 10 + 10 + 20 = 40. Total cost = 500 + 400 + 700 = $1,600. Average cost = 1,600 ÷ 40 = $40.00/share.

Now suppose today’s price is $42.50. Unrealized profit = (42.50 − 40.00) × 40 = $100. That’s a 100 ÷ 1,600 = 6.25% unrealized gain.

Adding fees

If your broker charged a $5 fee on each buy, total fees are $15. Total cost becomes $1,615, so average cost becomes 1,615 ÷ 40 = $40.375/share. Small difference — but it’s the more accurate break-even if fees were real cash outflows.

Why “average down” feels powerful

In the example, the first purchase was at $50. After adding buys at lower prices, the break-even dropped to ~$40 (or $40.38 with fees). That can make recovery easier — but it also means you’ve invested more total cash. The calculator helps you see both sides clearly: average cost goes down, but total exposure goes up.

🧭 How to use it

Step-by-step: get your average cost in 30 seconds

  • Add each buy: enter shares, buy price, and optional fees. Use “Add buy” for more rows.
  • (Optional) Add current price: see your unrealized profit/loss instantly.
  • (Optional) Add target profit: get the price needed to reach that profit.
  • Calculate: the result box shows total shares, total cost, average cost, break-even, and P/L.
  • Copy/Share: perfect for “here’s my break-even” screenshots and quick chats.
Common pitfalls (and how this tool avoids them)
  • Mistake: averaging prices instead of averaging by shares. Fix: This tool weights by shares automatically.
  • Mistake: forgetting fees. Fix: Add fees per buy (or leave at zero).
  • Mistake: mixing buys and sells. Fix: This calculator is for buys only; sells change your cost basis method (FIFO/LIFO/average cost varies by country/broker).

If you need to include sells, dividends, splits, or taxes, use your broker’s cost basis report (or a full portfolio tracker). This tool is designed for quick, practical average-cost snapshots.

❓ FAQ

Frequently Asked Questions

  • Is “average cost” the same as “break-even”?

    For a simple buy-only position, yes: your average cost per share is your basic break-even price. If you included fees, the break-even includes those fees too. Taxes and spreads may still affect your real break-even.

  • Why can’t I just average my buy prices?

    Because the number of shares matters. Buying 1 share at $100 and 100 shares at $10 doesn’t average to $55 — it’s much closer to $10 because most of your shares were bought there. This calculator uses a weighted average: total cost divided by total shares.

  • What about stock splits?

    After a split, your share count changes and your per-share cost changes, but your total cost stays the same. Easiest approach: enter your post-split share counts and post-split buy prices, or use your broker’s adjusted figures.

  • Does this work for crypto or ETFs?

    Yes. The math is identical for any asset where you buy units at different prices (stocks, ETFs, crypto, even commodities). Just enter “shares” as “units”.

  • Does averaging down always make sense?

    Not always. Averaging down lowers break-even, but increases exposure. Many investors use it with a plan (DCA schedule, risk limits, diversification). This tool helps you see the math clearly; the decision is up to you.

  • Can this replace my broker statement?

    No. Use your broker for official cost basis (especially for taxes). This tool is for quick planning, learning, and shareable snapshots.

MaximCalculator provides simple, user-friendly tools. Always double-check any important numbers elsewhere.