What is your average buy price?

Your average buy price — also called your average cost, stock average, or average stock price — is the total amount you spent on a stock divided by the total number of shares you bought. It is the single number that summarises a position built up over several purchases at different prices, and it is the number every other judgement hangs off: you are in profit when the market price is above it, in loss when it is below it, and it is the break-even level a falling stock has to climb back to before you are whole again.

Almost nobody buys a stock exactly once. You buy some shares this month, more after a salary lands, more again when the price dips — and each purchase happens at whatever the price happened to be that day. Your broker remembers every lot separately, but your brain needs one figure, and that figure is the weighted average this page calculates. Searchers type this problem into Google in several ways — stock average calculator, average stock price calculator, share average calculator — and every one of them is asking for the same division: everything you paid, divided by everything you hold.

One warning before the arithmetic: the average price is a description of your position, not a verdict on it. A low average does not make a stock good, and a high average does not make it bad. It tells you where you stand, which is the necessary first step for any decision — hold, add, trim or sell — but it cannot make the decision for you, and this page will not pretend otherwise.

How this stock average calculator works

Quick answer: Add one row per buy — how many shares, and the price per share you paid — and the calculator returns your total shares, total invested and weighted average price. The page starts with 100 shares at ₹500 and 50 shares at ₹400: 150 shares, ₹70,000 invested, and an average price of ₹466.67. Add today's market price and it also shows your unrealised profit or loss.

Using it takes three short steps. First, list your buys. Each row is one purchase: the number of shares and the price per share from that order. The two starting rows are the worked example from this guide, so the calculator opens showing a result you can check by hand; replace them with your own orders, using your broker's contract notes or order history for the exact figures. Second, add rows as needed. The “Add another buy” button appends a row, and the remove button on each row deletes it — two buys, five buys or fifteen buys all work the same way, and rows left at zero are ignored rather than treated as errors.

Third, read the three headline figures, then optionally test today's price. The preview shows your average price as the headline, with total shares and total invested beside it, a table of your buys with each row's cost, and a breakdown you can copy or download. Enter the current market price and a second set of figures appears: the unrealised profit or loss in total, per share and as a percentage. The currency selector switches labels between rupees and dollars; the maths does not change. Everything runs in your browser — your portfolio numbers are never uploaded anywhere.

The weighted average formula, step by step

The formula is one line:

Average price = (shares₁ × price₁ + shares₂ × price₂ + … ) ÷ (shares₁ + shares₂ + …)

It is called a weighted average because each price is weighted by how many shares were bought at it. Worked through slowly with the page's starting example — 100 shares at ₹500, then 50 shares at ₹400:

  • Step 1 — cost of buy one: 100 × ₹500 = ₹50,000.
  • Step 2 — cost of buy two: 50 × ₹400 = ₹20,000.
  • Step 3 — total invested: ₹50,000 + ₹20,000 = ₹70,000.
  • Step 4 — total shares: 100 + 50 = 150 shares.
  • Step 5 — divide: ₹70,000 ÷ 150 = ₹466.67 per share (466.666…, rounded to two decimals).
BuySharesPrice per shareCost of buy
Buy 1100₹500₹50,000
Buy 250₹400₹20,000
Total / average150₹466.67₹70,000

Sanity-check the answer the way you should check every average: it must sit between the lowest and highest prices you paid — ₹466.67 is between ₹400 and ₹500 ✓ — and it must sit closer to the price of the bigger buy. You bought twice as many shares at ₹500, so the average sits twice as close to ₹500 as to ₹400: it is ₹33.33 below ₹500 and ₹66.67 above ₹400 ✓. If an average you calculate ever falls outside the range of prices paid, the arithmetic is wrong, full stop. That two-second check catches most spreadsheet errors before they cost you a decision.

Why the simple average is wrong

The mistake nearly everyone makes once is averaging the prices directly: (₹500 + ₹400) ÷ 2 = ₹450. It feels reasonable and it is wrong, because it silently assumes you bought the same number of shares at each price. You did not — you bought 100 at one price and 50 at the other — so the simple average describes a portfolio you never owned, one with 75 shares at each price.

MethodCalculationResultVerdict
Simple average of prices(500 + 400) ÷ 2₹450.00Wrong — assumes equal quantities
Weighted average (correct)70,000 ÷ 150₹466.67Your real cost per share
Difference466.67 − 450.00₹16.67 per share₹2,500 across 150 shares

The gap is not academic. An investor who believes their average is ₹450 thinks they break even at ₹450 and might sell at ₹460 believing they have made ₹10 a share. Their real average is ₹466.67, so that “profitable” sale actually loses ₹6.67 a share — ₹1,000 across the holding — before charges. The wider apart your buy quantities are, the bigger this error grows: buy 190 shares at ₹500 and 10 at ₹400 and the simple average still says ₹450 while your true average is ₹495. Weighting is not a refinement; it is the whole calculation.

Averaging down, worked in full

The most common reason people reach for this calculator is a stock that has fallen. You bought, the price dropped, and now you are deciding whether buying more — averaging down — is worth it. The arithmetic first, with clean numbers: you hold 200 shares bought at ₹800 (₹160,000 invested). The price falls to ₹600 and you buy 200 more (₹120,000). Your position becomes 400 shares, ₹280,000 invested, and an average of ₹280,000 ÷ 400 = ₹700. Your break-even has genuinely fallen from ₹800 to ₹700: the stock now needs to recover to ₹700, not ₹800, for you to be whole.

StageSharesTotal investedAverage priceBreak-even
After buy 1 at ₹800200₹160,000₹800.00₹800
After buy 2 at ₹600400₹280,000₹700.00₹700
If price reaches ₹750400₹280,000₹700.00Profit ₹20,000 (+7.14%)

Now the honesty the arithmetic cannot supply. Averaging down lowered your break-even by ₹100 — and doubled the money you have riding on a stock the market is marking down. If the price falls to ₹500 instead of recovering, the averaged position loses ₹80,000 against the ₹60,000 the original holding alone would have lost. Prices usually fall for reasons: weakening results, debt, a broken market. Sometimes the reason is temporary and averaging down is exactly right; sometimes you are buying more of a company in genuine decline, and each new buy lowers the average of a position heading towards a much larger loss. The calculator's job is to tell you precisely what a new buy does to your average and your exposure — both numbers, side by side. Whether the company deserves more of your money is research, not arithmetic, and no average calculator can do it for you.

Adding a third, fourth or tenth buy

Real positions rarely stop at two buys. A monthly investor might have twelve rows a year; a long-term holder, dozens. The formula does not change — it simply keeps summing. Add a third buy to the running example, 100 shares at ₹450 (₹45,000), and the position becomes 250 shares, ₹115,000 invested, average ₹115,000 ÷ 250 = ₹460.00 exactly. Notice the direction of travel: the third buy, made below the previous average of ₹466.67, pulled the average down by ₹6.67 — any buy below your current average lowers it, any buy above raises it, and the size of the move depends on how big the new buy is relative to everything you already hold.

That last point deserves emphasis because it surprises people. Late in a position's life, a single small buy barely moves the average at all. If you hold 1,000 shares at an average of ₹466.67 and buy 10 more at ₹400, the new average is ₹465.84 — a change of less than a rupee. The same ₹400 buy made as your second purchase, when you held only 100 shares, would have dragged the average down dramatically. This is why long-running SIP investors see their average cost stabilise over the years: each instalment is small next to the accumulated holding. If you invest a fixed amount monthly, the SIP Calculator projects what that habit builds; this page works out the average cost of the shares you have actually accumulated so far, and the two together give you both halves of the picture — where you are, and where the habit leads.

Practical tip for many-row positions: enter buys in the order you made them, oldest first, and keep the downloaded report. If a figure ever looks wrong, the buys table in the preview shows each row's cost separately, so the offending row is easy to spot — a mistyped price usually announces itself as a cost wildly out of line with its neighbours.

Profit and loss at today's price

An average price earns its keep when you compare it with today's price. Enter the current market price and the calculator produces the three versions of the same gap: per share (current price − average price), in total (that gap × your total shares, equivalently market value − total invested), and as a percentage (total profit or loss ÷ total invested × 100). With the guide's example — 150 shares, average ₹466.67, ₹70,000 invested:

Current priceMarket valuePer shareTotal profit / lossPercentage
₹520₹78,000+₹53.33+₹8,000+11.43%
₹466.67₹70,000₹0.00₹00.00%
₹400₹60,000−₹66.67−₹10,000−14.29%

The word that matters in every one of those rows is unrealised. Until you sell, these figures are a snapshot of what you would get at this moment's price — a price that will be different tomorrow. An unrealised gain is not money in the bank, and an unrealised loss is not money lost; both become real only at the moment of sale, at whatever price that sale achieves. Investors who check the percentage column daily are mostly manufacturing emotion. The figures are worth knowing at decision points — rebalancing, tax planning, reviewing whether a holding still earns its place — and worth ignoring in between. And once you do sell, the question changes from “what is my position worth?” to “what did the completed trade make?”, which needs commissions and both sides of the trade: that is the job of the Stock Profit Calculator, described in the next-but-one section.

What happens to your average when you sell?

Under the average-cost method — the method this calculator uses, and the one most brokers display for a holding — selling part of a position does not change the average price of the shares that remain. Sell 50 of the example's 150 shares at any price you like, and the 100 shares left still carry an average cost of ₹466.67 each. What changes is the totals: you remove 50 shares and 50 × ₹466.67 = ₹23,333.33 of cost from the position, leaving 100 shares and ₹46,666.67 invested. The logic is that every share in the holding is identical and interchangeable, so each one carries the same average cost out of the door as the ones that stay.

Two honest caveats. First, other cost methods exist — first-in-first-out (FIFO) treats your oldest shares as the ones sold, which changes the cost attributed to a sale and therefore the taxable gain, even though your displayed holding average may look similar. Tax authorities and brokers in different countries apply different methods, and the figure that matters for your tax return is your broker's or your jurisdiction's, not this page's. Second, corporate actions move averages in ways no buy-and-sell arithmetic captures: a 2-for-1 stock split doubles your share count and halves your average price without you spending a rupee, and a bonus issue does the same in proportion. If your broker's average jumps after such an event, that is the adjustment working as intended — update the share counts and prices in your rows to match the post-action position.

Stock average calculator vs stock profit calculator

These two FreeSoftis tools are confused often enough that the distinction deserves its own section. This page — the stock average calculator — is for a position you still hold. It takes many buys, works out your weighted average cost, your total invested and your unrealised position at today's price. It knows nothing about selling and charges no commissions, because no sale has happened. The Stock Profit Calculator is for a trade you have completed. It takes one buy price, one sell price, the quantity, and the buying and selling commissions, and returns the net profit or loss on that finished round trip.

A typical journey uses both in order. While you accumulate a stock over months, this page tracks your average — ₹466.67, say — and your break-even. When you finally sell the whole holding at ₹520 with commissions on both sides, the stock profit calculator turns that completed trade into a final net figure, charges included. Using the profit calculator mid-holding forces you to invent a sell price and pay imaginary commissions; using this page after a sale throws away the commission information that decides whether the trade truly made money. Two questions, two tools. Investors reinvesting dividends into the same stock have a third: the DRIP Calculator projects how reinvested dividends grow a holding over future years, while this page reports the average cost of the shares you hold today.

Rupees, dollars and any other currency

This calculator defaults to rupees for a simple reason: the demand for it is concentrated in India, where lakhs of retail investors buy shares in tranches on the NSE and BSE and track their average price in ₹ — the search data behind this page shows “stock average calculator” searched in India many times more often than anywhere else. Indian investors also meet this calculation inside their broker apps, where the holding's average price is displayed per stock; this page exists for the moments the app is not enough — checking the broker's figure, planning a new buy's effect before placing it, or averaging a position held across two brokers, which no single app can see.

The currency selector switches every label to dollars for investors holding US or other dollar-priced shares. Beyond those two, the honest truth is that the symbol is decoration: the weighted-average arithmetic is identical in euros, pounds, dirhams or yen, so enter prices in whatever currency your shares trade in and read the results in that currency. What you must not do is mix currencies in one calculation — averaging rupee buys of an Indian share with dollar buys of a US share produces a number in no currency at all. One stock, one currency, one calculation. For converting amounts between currencies at live rates, the Currency Converter is the right tool.

The average price formula in Excel

A spreadsheet does this calculation in one formula, and it is worth knowing because it doubles as a check on this page. Put the shares from each buy in column A and the price per share in column B, one buy per row. Then:

=SUMPRODUCT(A2:A10, B2:B10) / SUM(A2:A10)

SUMPRODUCT multiplies each pair across the two columns — shares × price for every row — and adds the products, which is exactly your total invested (₹70,000 in the guide's example). SUM adds the shares column (150). The division is the weighted average: 466.67. If your sheet returns 450 instead, you have used AVERAGE on the price column — the simple-average trap from earlier in this guide, and the single most common spreadsheet error in this whole topic. Google Sheets uses the identical formula with the same function names. The advantage of the calculator above is the surrounding machinery: unlimited tidy rows, the buys table with each row's cost, the profit-and-loss readout at today's price, and a report you can copy or download without building anything.

Common mistakes

  • Averaging the prices instead of the costs. (500 + 400) ÷ 2 = ₹450 is the wrong answer to a question about 100 shares and 50 shares. Weight every price by its quantity — or use this page, which cannot forget.
  • Forgetting a buy. A missing row understates both your shares and your invested total, and skews the average towards whichever buys you did remember. Work from contract notes or the broker's order history, not from memory.
  • Mixing two stocks, or two currencies. One calculation per stock, in the currency that stock trades in. A blended average describes a position that does not exist.
  • Trusting the average over the broker's official figure at tax time. Brokers may include charges or adjust for splits and bonus issues. For a tax return, the broker's cost figure governs; this page is for planning and checking.
  • Averaging down on autopilot. A lower break-even is real, but so is the extra money exposed to a falling stock. Decide from the company's prospects, then use the calculator to size the buy — never the other way round.
  • Treating an unrealised figure as final. The profit-and-loss readout moves with the market price until the day you sell. It is a snapshot for decisions, not a result.

What this calculator leaves out

  • Brokerage and taxes. No brokerage, securities transaction tax (STT), exchange charges, GST, stamp duty or capital-gains tax is added anywhere. Your all-in cost per share is slightly higher, and your eventual net profit slightly lower, than the pure price figures shown.
  • Corporate actions. Splits, bonus issues, rights issues and mergers change share counts and effective prices in ways a buy list cannot know about. Adjust your rows after such events, as the selling section explains.
  • Dividends received. A holding's average cost is shown gross; dividends the stock has paid you along the way are not netted against it. If you reinvest those dividends, the DRIP Calculator models that path; if you hold them as cash, they are simply separate money.
  • Advice. This page reports arithmetic. It does not know the company, your finances or your reasons, and nothing it shows is a recommendation to buy, hold or sell anything.
  • Real-time prices. The “current price” is whatever you type — the page fetches no live quotes, so check the market price on your broker or exchange before relying on a profit-and-loss figure.

Within those limits, the calculation itself is exact: total cost divided by total shares, weighted properly, every time. Know your average, know what it leaves out, and you know where you stand.

Sources & References

Every figure in this guide was calculated with this page's own method and rounding, so you can reproduce each one exactly by entering the same numbers above.