Home/Calculator Tools/Stock Average Calculator

Stock Average Calculator

NEW

Work out your average cost per share across several buys

Free · No sign-up required
Loading...

What a stock average calculator does

When you buy the same stock more than once at different prices, the single number that matters afterwards is your average cost per share — the price the whole holding effectively cost you. Every profit figure, every break-even target and every tax calculation is measured against it. This tool takes each purchase as a quantity and a price, adds them up the way a broker does, and returns your true average. Add a current price and it also shows the unrealised gain or loss on the combined position.

The formula

average cost per share = total amount paid ÷ total shares owned

Note what this is not: it is not the average of the prices you paid. If you buy 100 shares at $50 and 400 shares at $30, the average of the two prices is $40, but your average cost is $34 — because far more of your money went in at the lower price. This is the mistake that makes people think they are closer to break-even than they are.

Worked example

PurchaseSharesPriceAmount paid
First buy100$50.00$5,000
Second buy400$30.00$12,000
Total500$17,000
Average cost$34.00$17,000 ÷ 500

At a current price of $36 the position is worth $18,000, an unrealised gain of $1,000 or 5.88%. At $34 exactly you are flat. Anything below $34 is a loss, even though your first purchase was made at $50.

Averaging down, and what it does not fix

  • Buying more at a lower price pulls the average down and lowers the break-even price. That much is arithmetic.
  • It does not reduce the loss you already have — it increases the money exposed to the same position.
  • The bigger the second purchase relative to the first, the more the average moves. A small top-up barely shifts it.
  • Averaging down into a company whose situation has changed is how a small loss becomes a large one.

Things that change your real cost basis

  • Commissions and fees — add them to the amount paid. Many brokers already include them in the cost basis they report.
  • Stock splits — a 2-for-1 split doubles your shares and halves your average cost. Re-enter the post-split numbers.
  • Partial sales — selling some shares does not change the average cost of the rest under average-cost accounting, but FIFO and specific-identification methods do. Which one applies depends on your broker and tax jurisdiction.
  • Reinvested dividends — each reinvestment is a new purchase at that day's price. Enter it as another row.

Frequently asked questions

Why is my average not the midpoint of my two prices?

Because the share counts differ. The average is weighted by how much money went in at each price, not by how many times you bought.

Should I include brokerage fees?

Yes, if you want the figure your broker and your tax return will use. Add the fee to that purchase's amount — for example 100 shares at $50 plus a $5 fee is $5,005 for 100 shares.

Does this work for fractional shares?

Yes. Enter decimals such as 3.4571 in the shares field.

How do I handle a stock split?

Multiply your share count by the split ratio and divide each price by the same ratio, then recalculate. The total amount paid never changes.

What about selling part of the position?

Under average-cost accounting the average per share stays the same and only the share count drops. Under FIFO the specific lots you sell are removed, which can change the average of what is left.

Is my data sent anywhere?

No. The calculation runs entirely in your browser — nothing is uploaded or stored.

Note

This calculator is an arithmetic tool, not investment advice. Tax treatment of cost basis differs by country and by broker; confirm the method that applies to you before relying on these figures for a tax return.

Guides

Averaging Down: What It Does to Your Average Cost (and What It Doesn't Fix)
7 min read
🪙
Dollar-Cost Averaging vs Lump Sum: What the Arithmetic Says, and What It Leaves Out
7 min read
💵
Dividend Yield, Yield on Cost and Payout Ratio: Reading an Income Stock
7 min read
🎯
Position Sizing: How Many Shares to Buy for a Fixed Risk
7 min read

More tools in this category

🪙
DCA Calculator
Dollar-cost averaging: shares accumulated and average cost at each price
📶
CAGR Calculator
Compound annual growth rate between a starting and ending value
💹
Stock Profit Calculator
Profit or loss on a trade after commissions and capital gains tax
💵
Dividend Yield Calculator
Dividend yield, yield on cost, payout ratio and income per month
🎯
Position Size Calculator
How many shares to buy for a fixed risk per trade and a stop-loss
🏠
Mortgage Calculator
Calculate monthly mortgage payments and amortization