Stock Average Down / DCA Average Cost Calculator

Add each purchase you made, get your true average cost per share, then plan the next buy — either by target average or by share count.

🔒 Your data never leaves your device🆓 Free🙅 No sign-up

🧾 Your purchases

USD
USD
USD

Leave empty to skip the market value section.

USD

Optional — added once per purchase row and once per planned buy.

Average cost: $40.00 · 20 shares for $800.00
Total shares
20
Total cost
$800.00
Average cost / share
$40.00
Market value
$900.00
Unrealized P/L
+$100.00
+12.5%

🎯 Average down planner

Enter the position you already hold, the price you can buy at, and either the average you are aiming for or the number of shares you plan to buy.

USD
USD
USD
Shares to buy
100
Cash needed
$3,000.00
Resulting average
$40.00
Total shares after buy
200
💡 Averaging down lowers your break-even price, but it also puts more money into a position that has already fallen. Results are estimates, not financial advice.

How to use the average cost calculator

  1. Enter every purchase. Each row takes a price per share and a quantity. Use the ➕ button to add more rows, or the 🗑️ button to drop one. Two example rows are filled in so you can see the shape of the answer right away.
  2. Add a commission if your broker charges one. It is applied once per purchase row, so it lands in the total cost and nudges the average up.
  3. Type the current price to see market value and unrealized profit or loss. Leave it blank if you only want the average.
  4. Open the planner to model your next buy: choose a target average and get the number of shares you need, or enter a share count and see where your average lands.
  5. Copy the totals with the copy button, or press “Copy totals from the purchase list” to move your current position straight into the planner.

How average cost per share works

Your average cost is a weighted average: every share counts once, so a large purchase moves the number much more than a small one.

average cost = total cost ÷ total shares
total cost   = Σ (price × quantity) + commissions
Purchase Price Shares Cost
Buy 1 $50 10 $500
Buy 2 $30 10 $300
Total $40 average 20 $800

Unrealized profit or loss compares the market value of your shares with what you paid:

market value = total shares × current price
unrealized P/L = market value − total cost
return on cost = unrealized P/L ÷ total cost × 100

The average down planner answers the reverse question. If you hold S shares at an average of A and buy n more at price P, the new average is:

new average = (S × A + n × P) ÷ (S + n)

Set that equal to a target T and solve for n:

n = (S × (T − A)) ÷ (P − T)

Because the new average is a blend of the old average and the buy price, the target has to sit strictly between the two. A target equal to the buy price would need an infinite number of shares, and the tool shows a notice instead of a nonsense answer.

Worked examples

Two equal buys. You bought 10 shares at $50 and later 10 shares at $30. Total cost is $500 + $300 = $800 for 20 shares, so the average cost is $40.00. If the price is now $45, market value is 20 × $45 = $900 and the unrealized gain is +$100, or +12.5% on cost.

Hitting a target average. You hold 100 shares at an average of $50 and the price has dropped to $30. To pull the average down to $40, the planner computes n = (100 × (40 − 50)) ÷ (30 − 40) = (−1,000) ÷ (−10) = 100 shares, which costs 100 × $30 = $3,000. You would then hold 200 shares at $40.

Only half the budget. Same position, but you can only buy 50 shares at $30. The new average is (100 × 50 + 50 × 30) ÷ 150 = $6,500 ÷ 150 = $43.33. Your break-even price drops by $6.67, not by $10.

Averaging up. You hold 50 shares at $10 and buy at $20. To reach an average of $12 you need (50 × (12 − 10)) ÷ (20 − 12) = 100 ÷ 8 = 12.5 shares. Fractional shares are supported, so the planner does not round for you.

Tips and common mistakes

  • Include fees. A flat $5 commission on a $300 purchase is a real 1.7% drag. The commission field spreads those fees into your average, which is how your broker’s cost basis works too.
  • Do not confuse average cost with break-even. If you own shares at an average of $40 and the price is $30, the stock has to rise 33.3% — not 25% — for you to get back to even.
  • Averaging down does not make losses smaller. It lowers the price at which you break even, but only because you now own more shares. A further 10% fall costs you more money than it would have before.
  • Watch position size. Each purchase increases your exposure to a single company. Many investors cap what any one position may become as a share of the portfolio before they consider adding to it.
  • Check the tax rules where you live. Some jurisdictions use average cost for the cost basis, others use FIFO or let you identify specific lots, and wash-sale rules can change what a “loss” means on paper.
  • Currency and rounding. Pick your currency at the top; the number is only ever a formatting choice, since the maths is identical in any currency.

The figures here are estimates for planning, based only on the numbers you type. They are not financial advice, and they do not account for taxes, dividends, currency conversion or a broker’s own cost-basis method.

Glossary

  • Average cost per share – total amount paid divided by the number of shares held.
  • Cost basis – the amount used to calculate a taxable gain when you sell; often the same as average cost, but rules vary by country and broker.
  • DCA (dollar-cost averaging) – buying a fixed amount at regular intervals, which produces an average cost automatically.
  • Averaging down – buying more of something you already own at a lower price, which lowers your average.
  • Unrealized P/L – the profit or loss you would have if you sold at the current price today.

Privacy

Everything runs in your browser. Your purchase list is stored only in your own browser’s localStorage and never sent anywhere.

Frequently asked questions

How do I calculate my average cost per share?

Add up what every purchase cost you, including commissions, then divide by the total number of shares you own. Buying 10 shares at $50 and 10 at $30 costs $800 for 20 shares, so the average is $40 per share.

Why is my average not the midpoint of the two prices?

The average is weighted by quantity. Buying 1 share at $100 and 9 shares at $50 gives an average of $55, not $75, because the cheaper price applies to nine times as many shares.

How many shares do I need to buy to reach a target average?

Use the formula shares = (S × (T − A)) ÷ (P − T), where S is the shares you hold, A your current average, P the new buy price and T your target average. The planner in this tool does it for you.

Why does the calculator say my target average is impossible?

A new purchase can only pull your average somewhere between your current average and the new buy price. If you hold shares at $50 and buy at $30, any target below $30 or above $50 is unreachable, and a target of exactly $30 would need an infinite number of shares.

Does averaging down reduce my risk?

It lowers your break-even price, but it also increases the money you have at stake in one position. Whether that is sensible depends on why the price fell and on how concentrated your portfolio already is.

Does this tool store the purchases I enter?

Your purchase rows are saved in your own browser with localStorage so they are still there next time. Nothing is uploaded, and clearing your browser data removes them.

Related tools

Last reviewed: