ToolKit·mxl

Stock Average Calculator

Enter every lot you bought — shares and price each time — to get your true weighted average cost per share, your live profit or loss, and exactly how many more shares would bring your average down to a target price.


Weighted average cost / share$0.00
Total shares held0
Total invested$0.00
Current value$0.00
Profit / loss

How the weighted average cost is calculated

Every time you buy more shares of a stock at a different price, your true cost basis is no longer any single purchase price — it's a weighted average across every lot, weighted by how many shares each lot contains. A simple average of your purchase prices would treat a 10-share buy the same as a 1,000-share buy, which is wrong: the bigger lot should pull the average toward its price much harder.

Weighted average cost = Σ (sharesi × pricei) / Σ sharesi Shares needed at price P to reach a target average A: x = (A × S − I) / (P − A) where S = shares already held, I = total already invested

The second formula is the "solver" this calculator runs when you fill in a target average price: it rearranges the same weighted-average equation to answer how many more shares, bought at today's price, get me to that number? It only has a real (positive) answer when the target average sits strictly between the current market price and your existing average — buying more shares can pull your average toward the current price, but never past it.

Worked example 1: averaging down to rescue a position

You buy 100 shares at $50, for $5,000. The stock drops and you buy 100 more shares at $30, for $3,000.

LotSharesPriceCost
1100$50.00$5,000
2100$30.00$3,000
Total200$8,000

Weighted average = $8,000 ÷ 200 shares = $40.00 per share — a full $10 lower than your original buy, even though the stock only needs to climb back to $40 (not $50) for you to break even.

Say the stock is now trading at $35. Your position is worth 200 × $35 = $7,000 against $8,000 invested — a loss of $1,000 (12.5%). If you wanted to pull your average down further, to $37, the solver formula says you'd need to buy 300 more shares at $35: (37 × 200 − 8,000) ÷ (35 − 37) = −600 ÷ −2 = 300. Buying those 300 shares brings total shares to 500 and total invested to $8,000 + $10,500 = $18,500, and $18,500 ÷ 500 is exactly $37.00.

Worked example 2: scaling into a position

Averaging isn't only a rescue tactic — the same math applies when you deliberately buy in tranches on the way up. Say you scale into a stock with three purchases: 50 shares at $20, 50 shares at $22, and 100 shares at $18.

LotSharesPriceCost
150$20.00$1,000
250$22.00$1,100
3100$18.00$1,800
Total200$3,900

Weighted average = $3,900 ÷ 200 = $19.50. If the stock later trades at $25, your position is worth $5,000 against $3,900 invested: a profit of $1,100, or 28.2%.

Why the weighted average matters more than any single buy price

Most investors mentally anchor to their first purchase price. But once you've bought more than once, that first price is no longer the number that decides whether you're up or down — the blended average is. Two people who both currently hold 200 shares of the same stock can have completely different break-even points depending on how their lots were sized: someone who bought most of their shares near the bottom has a much lower average, and much less distance to travel, than someone who bought most of their shares near the top and only added a little on the dip.

This is exactly why averaging down is popular with long-term investors: adding shares at a lower price mechanically drags the average — and therefore the break-even point — down with it, with the effect growing the larger the new lot is relative to what's already held (see the weighted-average formula above).

The risk: averaging down a falling knife

The math above is neutral — it works whether the stock recovers or keeps falling. That neutrality is the danger. Averaging down only pays off if the price eventually goes back up; if the company's fundamentals are genuinely deteriorating (a broken business model, a fraud, a structural decline), each additional purchase just increases how much money is exposed to a stock that keeps getting cheaper for a real reason. This pattern has a nickname for a reason: "catching a falling knife." Before adding to a losing position, it's worth separating "the price fell and I still believe the thesis" from "the price fell and I'm buying more just to lower my average" — only the first is a strategy; the second is a bias.

This tool performs arithmetic only. It is not financial advice, and does not know whether a given stock is a good buy at any price.

FAQ

What does "averaging down" on a stock mean?

Averaging down means buying more shares of a stock you already own after its price has fallen. Because the new shares cost less than your original ones, the weighted average price across all your shares drops — which lowers the price the stock needs to reach for you to break even.

How is my average share price calculated when I buy at different prices?

It's a weighted average, not a simple average: multiply each lot's shares by its price, add those up, then divide by the total number of shares. Buying more shares at a given price pulls the average further toward that price than a small purchase would.

Does averaging down actually lower my break-even price?

Yes, arithmetically it always does, as long as the new purchase price is below your current average. The size of the effect depends on how many new shares you buy relative to what you already hold — doubling your position with shares bought 40% lower moves the average by a lot more than adding 10% more shares would.

When is averaging down a bad idea?

When the stock is falling because the underlying business is deteriorating rather than because of short-term noise — often called "catching a falling knife." Averaging down only makes sense if you still believe the original investment thesis holds; otherwise you are simply putting more money into a losing position and increasing your total exposure to a company that keeps getting cheaper for a reason.

Does this calculator account for commissions, taxes, or dividends?

No. It works purely off the shares and price you enter for each lot. If your broker charges a commission per trade, add it to that lot's effective price before entering it. Tax lot accounting methods (FIFO, LIFO, specific identification) can change what your broker reports as your cost basis for tax purposes — this tool shows your blended average, not a tax figure.

Can I use this for scaling into a new position, not just averaging down?

Yes — the math is identical whether the price moved down, up, or sideways between purchases. Enter each purchase as its own lot in the order you made it; the calculator only needs the shares and price of each lot, not the direction the stock moved.

Formula last verified: 29 August 2026 — the weighted-average cost formula (Σ shares×price ÷ Σ shares) and the "averaging down" break-even mechanics were checked against Investopedia's definition of averaging down and WallStreetMojo's average-down formula reference; the shares-needed solver was independently re-derived from the same formula and checked by hand against the worked examples above.

More tools