Countworthy

Stock Average Calculator

Enter every lot you bought, with the shares and price of each, to get your 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.

Maintained by Sohail Shah Formula last verified

Add each buy’s commission to its price: the commission divided by the shares bought. CRA’s method takes a sale out at the average cost at that time, so if you sold shares between buys, enter what you still held after the sale, at that average, as one lot. For Canadian tax, a cost in a foreign currency is converted to Canadian dollars at the exchange rate in effect when you bought. After a stock split, restate each earlier lot: after a 2-for-1 split, double its shares and halve its price. With more than 10 lots, merge the earlier ones into one lot: their total shares at their average price. For United States tax, see “Is this average also your cost for tax?” below.
Result
Weighted average cost / share$0.00
Total shares held0
Total invested$0.00
Current value$0.00
Profit / loss—
—

Next: DCA Calculator · DRIP Calculator

Formula sourced, dated and independently re-derived — see the audit trail ↓

Quick answer

Your average cost per share is a weighted average across every lot you bought, weighted by shares — not a simple average of your purchase prices. In the calculator's own second worked example, 50 shares at $20, 50 at $22 and 100 at $18 cost $3,900 for 200 shares, a weighted average of $19.50 per share, below the simple average of the three prices because the biggest lot was the cheapest.

How the weighted average cost is calculated

Every time you buy more shares of a stock at a different price, your average cost per share is no longer any single purchase price: it is 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 after a price drop

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 for a falling price: the same math applies when you buy in tranches at different prices. Say you buy a stock in 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

Once you have bought more than once, your first purchase price no longer decides whether you are up or down: the blended average does. 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.

Investopedia describes averaging down as often favoured by investors with a long-term horizon and a value-driven approach. The arithmetic behind it is that adding shares at a lower price mechanically drags the average, and so the break-even point, down with it, with the effect growing the larger the new lot is relative to what is already held (see the weighted-average formula above; WallStreetMojo’s worked example does the same division).

Is this average also your cost for tax?

Not necessarily. The average this calculator shows is arithmetic: total invested divided by total shares. How a tax authority treats several purchases of the same stock is a separate rule, so it is stated here country by country.

Either way, this tool shows your blended average, not a tax figure.

The risk: averaging down adds to the position

The arithmetic above is neutral: it gives the same average whether the stock later recovers or keeps falling, and it does not know why the price fell. Buying more shares adds money to the position, which is why the solver’s note shows the order as new money and the position as a multiple of what you had invested. Investopedia’s article on averaging down lists the same risk: it says averaging down can increase overall risk exposure, that the average investor has little ability to tell a temporary price drop from a warning that prices will fall much further, and that proponents see it as a cost-effective way to build wealth while opponents call it a recipe for disaster.

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.

What are the risks of averaging down?

Averaging down adds money to a position whose price has fallen, and the arithmetic does not know why it fell. Investopedia's article on the strategy says it can increase overall risk exposure and that the average investor has little ability to tell a temporary drop from a warning that prices will fall much further. Proponents see it as a cost-effective way to build wealth; opponents call it a recipe for disaster.

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, you can add it to that lot's effective price before entering it. The average shown is arithmetic, not a tax figure. In the United States, IRS Publication 550 (2025) says the basis of shares you sold is the cost of the particular shares you identify, or of the shares you acquired first if you cannot identify them, and allows an average basis only for mutual fund shares and certain shares held in connection with a dividend reinvestment plan. In Canada, the Canada Revenue Agency's guide T4037 (Capital Gains, 2025) says that for identical properties, such as shares of the same class of a corporation, you calculate the average cost at the time of each purchase to determine your adjusted cost base: the total cost, usually including expenses of acquiring the shares, divided by the number owned.

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.

How do I calculate the average price per share?

Multiply each purchase’s shares by the price you paid for them, add those amounts up, and divide by the total number of shares. That is a weighted average, so a large lot pulls the average toward its own price far more than a small one does — it is the formula shown above, applied to every lot you enter.

Formula last verified: 11 October 2026. The weighted-average cost formula (Σ shares×price ÷ Σ shares) and the shares-needed solver were recomputed on 11 October 2026 from their definitions for both worked examples above and for a third case with fractional shares (all matched to the cent; every number the calculator prints is unchanged by this revision). Every source below was read on 11 October 2026 from a saved copy of the text (the Canada Revenue Agency guide from a copy saved on 8 October 2026, the others from copies saved on 11 October), and each is listed with the date the document itself carries. IRS Publication 550, Investment Income and Expenses, 2025 edition (the copy read carries 5 March 2026; only the passages on identifying shares sold, the first-in first-out rule, average basis and the basis of mutual fund and DRIP shares were read, not the whole publication). It defines the average basis per share as the aggregate basis of the shares divided by their aggregate number, which is this calculator’s formula, and it is the source for the United States statements on this page. Canada Revenue Agency, guide T4037, Capital Gains, 2025 edition (the page carries 11 February 2026; only its definition of adjusted cost base and its section on identical properties, with the two examples in it, were read, not the whole guide) is the source for the Canadian statements on this page. Investopedia, “Average Down: Definition, How It Works, and Example” (updated 23 April 2026; read from its definition through its key considerations) for the definition of averaging down, the break-even idea and the risks described above. WallStreetMojo, “Average Down” (undated; the article text was read, but the saved text does not contain its formula, so it is cited only for its worked example, whose $18.87 average equals its $5,986.42 invested divided by its 317.2 shares). No other country’s rule was read, so the page states none. Correction of 11 October 2026: the page called the weighted average your “true cost basis” and listed LIFO among tax lot methods; the IRS text supports neither, so both were removed, and the page now says which country each cost rule belongs to. Added 23 October 2026 (the verified date above is unchanged: only the sources named here were read that day, and only in the passages named): a note under the lots. The Canada Revenue Agency guide T4037 named above (the page carries 11 February 2026) was read again from a saved copy on 23 October 2026, now also its sections on foreign currencies in calculating a capital gain or loss and on stock splits and consolidations, and its section on identical properties with Example 1, where a sale of 200 shares takes $3,600 off the cost at the $18.00 average. It is the source for the note’s statements that a sale is taken out at the average cost at that time, that a cost in a foreign currency is converted at the exchange rate in effect when the property was acquired, and that the cost must be recalculated for a stock split (its example: 100 shares that cost $1,000 become 200 shares at $5 after a 2-for-1 split). The IRS Publication 550 named above (the copy read carries 5 March 2026) was read again on 23 October 2026, only its passages on the basis of stocks, on identifying stock sold and on stock splits: it is the source for a commission being part of the cost of purchase, for a split being figured lot by lot, and for the note pointing United States readers to the section on tax. That a merged lot keeps the average, and how a lot is restated after a split, are this calculator’s own arithmetic (total cost divided by total shares, the formula the guide gives), not a rule either document states for this page. No figure the calculator prints changed. How we verify every number → Cite as: Countworthy, “Stock Average Calculator”, countworthy.com/stock-average-calculator, formula last verified 11 October 2026.

Related tools

Not sure which tool? See the investing calculators guide.