Stock Average Calculator

Add every purchase. Get your average share price, total shares and total cost — plus profit or loss when you enter a current price.

Shares Price per share
Current price per share — optional No live price feed here — type the price yourself, or leave this empty to skip the profit/loss figures.
Average price per share
Total shares
Total cost

How this calculator works

Each purchase is weighted by how many shares you bought. That is the whole idea — a weighted average, not a plain average of the prices.

Average price = (q1×p1 + q2×p2 + … + qn×pn) ÷ (q1 + q2 + … + qn)

where q is the number of shares bought and p is the price paid per share. The top of that fraction is your total cost; the bottom is your total shares.

Worked example: 100 shares at $50, then 50 shares at $60. Total cost = 100×50 + 50×60 = 8,000. Total shares = 150. Average = 8,000 ÷ 150 = 53.3333. That is the same figure this page returns when you type those two rows in.

Rounding: every figure on this page is rounded down, never up. Prices are shown to four decimals and amounts to two, so the number you read is never larger than the real one.

What is counted, and what is not

This is a share average calculator for one position at a time. It uses only the share counts and prices per share you type in.

If you want your commission included, add it into the price per share for that purchase before typing it in — that is the usual way to fold fees into an average cost per share figure. Amounts are shown in whatever currency you typed; no exchange rate is applied anywhere.

Frequently asked questions

How many purchases can I add?

As many as you need. Start with two rows, then use + Add purchase for each extra buy and the × on a row to remove it. There is no cap.

Is this the same as an average stock price calculator or an average cost per share calculator?

Yes — those are three names for the same weighted average. This page is one tool, not three: the same inputs, the same formula, one answer.

Why is my average not the plain average of my prices?

Because you bought different quantities. Buying 100 shares at $50 and 50 at $60 gives 53.3333, not 55 — the bigger, cheaper purchase pulls the average toward it.

Why does my broker show a different number?

This page counts only what you type. Brokers often fold commissions into the figure, and they may treat sales, dividends or corporate actions their own way. If your broker's number includes something this page excludes, its number will differ — that is a difference in what is included, not an error in the arithmetic here.

Can I use it for a position I have already sold part of?

Not directly. This page works out the average of the buys you enter; it does not model selling some of a holding, stock splits, or more than one ticker. Enter only the purchases that make up the position you want averaged.

Does it work on my phone?

Yes. The fields stack to a single column on a narrow screen and the results stay inside the width of the page.

Do I need to sign up or install anything?

No. Everything runs in your browser on this page; your numbers are not sent anywhere and are not saved.

This page is a calculator, not investment advice. Averaging down does not make a position safer.