Average Price Calculator
Buying the same stock at different prices over time? Get your real weighted-average cost basis — the number that actually determines your break-even point — across as many purchase lots as you've made.
| Quantity | Price (₹) | Fees (₹, optional) |
|---|
Want to know how many additional shares at a given price would bring your average down (or up) to a specific target? Enter a target average and a buy price below.
Why a simple average is wrong
Adding prices and dividing by count
10 shares at ₹100 and 20 shares at ₹80 is not an ₹90 average. The 20-share lot has twice the weight, pulling the true average to ₹86.67.
Total cost ÷ total quantity
Average Price = (Qty1×Price1 + Qty2×Price2 + ...) ÷ Total Quantity. Every lot contributes in proportion to how many shares it represents, not as one of N equal entries.
It lowers cost, not risk
Buying more of a falling stock lowers your average price, but it also increases your total capital at risk in a position that's already moving against you. Use the Position Size Calculator to keep that risk bounded.
What is average price (cost basis)?
Your average price, also called your cost basis, is the true average amount you paid per share across every purchase you've made of a stock, after accounting for how many shares each purchase actually involved. It's the single most important number for knowing your real break-even point — the price the stock needs to reach for you to exit without a loss — once you've bought the same stock more than once at different prices.
Most brokers and trading platforms display this number automatically on your holdings page, but it's worth understanding the calculation directly, because it's easy to misread or mis-estimate when you're tracking multiple buys manually, especially across different lot sizes.
Why a simple average is mathematically wrong
The single most common error is averaging the prices instead of weighting by quantity. Suppose you bought 10 shares at ₹100 and later bought 20 shares at ₹80. A simple average of the two prices — (100 + 80) ÷ 2 — gives ₹90. That's wrong, and not by a rounding error.
The 20-share purchase represents twice the capital and twice the shares of the 10-share purchase, so it should count twice as much toward the average. The correct, weighted average for this example is ₹86.67 — noticeably lower than the naive ₹90, and the difference only grows as lot sizes diverge further.
The weighted average formula, explained
This calculator uses the standard, universally correct weighted-average cost basis formula:
Average Price = Total Cost ÷ Total Quantity
Where Total Cost is the sum of (quantity × price) across every lot you've bought, optionally including brokerage and other charges for each purchase, and Total Quantity is the simple sum of shares across all lots. This is the same formula used for tax cost-basis calculations and by every broker's holdings statement.
A worked example, step by step
You buy 100 shares at ₹185, and later add 150 shares at ₹165 as the price falls.
| Lot | Quantity | Price | Cost |
|---|---|---|---|
| Lot 1 | 100 | ₹185 | ₹18,500 |
| Lot 2 | 150 | ₹165 | ₹24,750 |
| Total | 250 | — | ₹43,250 |
| Average price | ₹173.00 | ||
₹43,250 total cost ÷ 250 total shares = ₹173.00 average — your true break-even price, not the midpoint between ₹185 and ₹165 (which would incorrectly suggest ₹175).
Averaging down vs averaging up
Averaging down
- Buying more shares as the price falls, to lower your average cost
- Lowers your break-even price, but increases total capital tied up in a losing position
- Only sound if your original investment thesis is still valid — not a substitute for a stop-loss
Averaging up
- Buying more shares as the price rises, adding to a winning position
- Raises your average cost, but is often used to scale into a confirmed trend
- Common in momentum and trend-following approaches, less common in value-style investing
Averaging down is one of the most misused techniques in retail trading. Buying more of a falling stock without a fresh, independent reason to believe it's undervalued — purely to "improve" your average — concentrates more capital into a position that's already moving against you. Use the Position Size Calculator to keep your total position size, including any averaging-down additions, within a sensible risk limit for your account.
Solving for a target average
This calculator includes a solver for the reverse question: "If I buy N more shares at price P, what will my new average become?" — or, run backward, "How many more shares do I need to buy at price P to bring my average down to a specific target?" Enter your target average and a hypothetical buy price, and the solver works out the exact additional quantity required.
Using the worked example above (250 shares at ₹173 average), enter a target average of ₹160 and a buy price of ₹150 in the solver — it will show you exactly how many additional shares at ₹150 would be needed to pull your average down to ₹160.
Common mistakes when tracking average price
- Averaging prices instead of weighting by quantity. The single most common error, covered above — always weight by how many shares each lot represents.
- Forgetting to include brokerage and charges. Each buy transaction has a small cost beyond the share price itself. Over many transactions, ignoring this slightly understates your true break-even price.
- Treating "average price" and "current price" as comparable without context. Your average price tells you your break-even point, not whether the stock is a good buy right now — those are two different questions.
- Averaging down indefinitely without a fresh thesis. Each additional purchase should be justified independently, not simply because "the average will look better."
How to use this calculator
- Enter each purchase lot's quantity and price in the table — add as many rows as you need with "Add another lot."
- Optionally include fees for a more precise, all-in cost basis.
- Read your weighted average price and total invested amount.
- Enter the current market price to see your unrealized profit or loss at a glance.
- Use the target average solver to plan exactly how many additional shares, at a given price, would move your average to where you want it.
Frequently asked questions
Because your broker correctly weights each purchase by quantity, exactly as this calculator does — a simple average of prices (ignoring how many shares each purchase involved) is mathematically incorrect whenever your lot sizes differ across purchases. If your broker's figure differs from a manual price-only average, the broker's figure is the correct one.
It depends on what your broker chooses to display. Some platforms show a pure share-price-weighted average; others fold in brokerage and transaction charges for a true all-in cost basis. This calculator lets you optionally add fees per lot so you can compute either version depending on what you're trying to track.
Not always, but it's frequently misused. Averaging down can be sound if you have a genuine, independent reason to believe the stock remains undervalued at the lower price — it's unsound when it's done purely as a psychological attempt to make a losing position 'feel better' by lowering the average, without re-evaluating the original thesis.
Average price tells you your cost basis — what you paid per share, in rupee terms. XIRR and CAGR tell you your annualised rate of return, accounting for the dates and amounts of your purchases (and sales). You typically need both: average price for your break-even point, and XIRR/CAGR for how well the investment has actually performed over time.
Yes, the same weighted-average logic applies whenever you've built a position through multiple entries at different prices, including futures and options, as long as you're tracking quantity-weighted cost rather than treating each entry as equally weighted.
This calculator computes your average cost basis from buy lots only. If you've partially sold a position, your remaining average cost basis (for tax and accounting purposes in India) typically follows FIFO (first-in-first-out) unless your broker's statement indicates otherwise — track your remaining lots after the sale and re-enter only those into this calculator.