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.
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.
| Lot | Shares | Price | Cost |
|---|---|---|---|
| 1 | 100 | $50.00 | $5,000 |
| 2 | 100 | $30.00 | $3,000 |
| Total | 200 | — | $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.
| Lot | Shares | Price | Cost |
|---|---|---|---|
| 1 | 50 | $20.00 | $1,000 |
| 2 | 50 | $22.00 | $1,100 |
| 3 | 100 | $18.00 | $1,800 |
| Total | 200 | — | $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.
- United States. IRS Publication 550 (2025 edition) says that if you can adequately identify the shares you sold, their basis is the cost of those particular shares. If you cannot, the basis is that of the shares you acquired first (first in, first out), and, except for certain mutual fund shares, you cannot use the average price per share to figure gain or loss on the sale. It allows an average basis for identical shares bought at different times and prices and left in an account with a custodian or agent, but only for shares of a mutual fund (or other regulated investment company), shares held in connection with a dividend reinvestment plan (DRIP) when all the shares held in connection with it are treated as covered securities, and shares acquired after 2011 in connection with a DRIP.
- Canada. The Canada Revenue Agency’s guide T4037, Capital Gains (2025 edition, page dated 11 February 2026) treats shares of the same class of a corporation as identical properties. It says that if you buy and sell several identical properties at different prices over time, you have to calculate the average cost of each property in the group at the time of each purchase to determine your adjusted cost base (ACB), and that the average cost is the total cost of the identical properties purchased, usually their cost plus any expenses of acquiring them, divided by the total number owned. That is the division this calculator performs, with two differences. The guide’s cost includes expenses of acquiring the shares, such as commissions, which this calculator leaves out unless you add them to a lot’s price. And in the guide’s example a sale takes shares out at the average cost at that time, so the average of the purchases entered here matches the guide’s method when no shares were sold between those purchases. The guide lists securities the averaging rule does not apply to, including certain securities acquired under an employee option agreement.
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.