CalculateItNow home

Stock Average Calculator

Average cost basis across up to five purchases, in shares or dollars, with the current gain or loss, the break-even price and what averaging down really does.

Stock Average Calculator: with the default inputs, average cost per share is $38.5714.

$
$
$
$
Try an example
The simple average of the prices you paid is $40.00, but your actual cost basis is $38.57. Cost basis is share-weighted — bigger purchases pull it further.
Average cost per share
$38.5714
In words
350 shares at an average of $38.5714, $13,500.00 invested and now worth $15,750.00 — up $2,250.00 (16.67%).
Total shares
350
Total invested
$13,500.00
Current value
$15,750.00
Unrealized gain or loss
$2,250.00
Return on cost
16.67%
Break-even price
$38.5714
Move needed to break even
-14.29%
Highest price paid
$50.00
Lowest price paid
$30.00
Simple average of the prices paid
$40.0000
Assumptions
  • Average cost basis, not FIFO or specific-lot identification.
  • Commissions are added to cost basis, once per purchase entered.
  • No adjustment for stock splits, dividends, return of capital or wash sales.
  • Return on cost is a simple percentage, not annualized.
Shares bought at each price
050100150$50.00$40.00$30.00Price paid
Shares
Position by purchase
PurchasePrice paidSharesCost% of sharesWorth now
#1$50.0000100$5,000.0028.6%$4,500.00
#2$40.0000100$4,000.0028.6%$4,500.00
#3$30.0000150$4,500.0042.9%$6,750.00

Cost basis is weighted by shares, not by the number of purchases. The lot that bought the most shares moves the average the most.

Math verified by automated testsUpdated 2026-09-093 sources cited

How this is worked out

The formula

Shares (dollars mode) = amount invested ÷ price paid
Total cost   = Σ (shares × price) + commissions
Total shares = Σ shares

Average cost per share = total cost ÷ total shares
Break-even price       = average cost per share
Unrealized gain        = total shares × current price − total cost
Return on cost         = gain ÷ total cost

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Each purchase entered as
Dollars is the true dollar-cost-averaging case: a fixed amount each month buys more shares when the price is low.Number of shares · Dollars invested
Purchase 1 — shares or $
A number.0 or more · defaults to 100
Purchase 1 — price per share
A number.in dollars · 0 or more · defaults to 50
Purchase 2 — shares or $
A number.0 or more · defaults to 100
Purchase 2 — price per share
A number.in dollars · 0 or more · defaults to 40
Purchase 3 — shares or $
A number.0 or more · defaults to 150
Purchase 3 — price per share
A number.in dollars · 0 or more · defaults to 30
Purchase 4 — shares or $(under More options)
A number.0 or more · defaults to 0
Purchase 4 — price per share(under More options)
A number.in dollars · 0 or more · defaults to 0
Purchase 5 — shares or $(under More options)
A number.0 or more · defaults to 0
Purchase 5 — price per share(under More options)
A number.in dollars · 0 or more · defaults to 0
Current price
A number.in dollars · 0 or more · defaults to 45
Commission per trade(under More options)
Added to cost basis, which is where it belongs — it raises your break-even price.in dollars · 0 or more · defaults to 0

What you get back

Average cost per sharemain answer
In words
Total shares
Total invested
Current value
Unrealized gain or loss
Return on cost
Break-even price
The price at which the whole position is worth exactly what you paid, commissions included.
Move needed to break even
Highest price paid
Lowest price paid
Simple average of the prices paid
The unweighted mean — shown only to make the point that it is not your cost basis.

What this assumes

  • Average cost basis, not FIFO or specific-lot identification.
  • Commissions are added to cost basis, once per purchase entered.
  • No adjustment for stock splits, dividends, return of capital or wash sales.
  • Return on cost is a simple percentage, not annualized.

About this calculator

Your average cost per share is total dollars in divided by total shares held — not the average of the prices you paid. The distinction matters as soon as the purchases are different sizes. Buy 100 shares at $50, 100 at $40 and 150 at $30 and the simple average of the prices is $40.00, while your actual cost basis is $38.57, because the biggest purchase happened at the lowest price.

Two ways to enter it, and they behave differently

Shares mode is for recording what actually happened: you bought a specific number of shares at a specific price. Dollars mode is the true dollar-cost-averaging case — a fixed $500 a month, whatever the price. That fixed amount automatically buys more shares when the price is low and fewer when it's high, which is the entire mechanism behind DCA: it pulls your average cost below the simple average of the prices you paid, with no market timing required.

Break-even is further away than it looks

The break-even price is just your average cost, and getting back to it is always a bigger percentage than the fall that got you there. A stock that drops 33% has to rise 50% to recover; down 50% needs 100%. The move needed to break even output does that arithmetic, and it's a useful antidote to the feeling that a small bounce will make you whole.

What averaging down does — and what it doesn't

Buying more as a price falls lowers your average cost. That is arithmetic, and this calculator will confirm it every time. What it does not do is improve the investment. Lowering the average cost also increases the amount of money you have in a position that is currently going the wrong way, which is the same trade twice with more conviction and less diversification. The honest test is the one a fund manager applies: if I held no shares today, would I buy this at this price? If the answer is yes, buy — but buy because of that, not because it lowers a number on a screen. If the answer is no, the low average cost is a consolation, not a reason.

Reading the results

Total invested includes commissions, which belong in cost basis — they raise your break-even price and, in a taxable account, reduce your eventual gain. Return on cost is the simple percentage gain, not an annualized return: two positions both up 20% are not equivalent if one took nine months and the other took nine years. For a time-weighted figure, use the CAGR calculator.

Where it misleads

This computes a single average cost basis, which is how mutual funds are usually reported and how many brokers display an equity position. For US tax purposes on individual shares, the default is FIFO unless you specifically identify lots at the time of sale, and specific identification can be worth real money — selling your highest-cost lots first defers tax. The average shown here is the right number for "how am I doing"; it is not necessarily the number that goes on your tax return. It also ignores dividends received, stock splits (adjust both share counts and prices), and any wash-sale adjustments.

Frequently asked questions

How do I calculate my average cost per share?

Total dollars invested divided by total shares owned, including commissions. It is not the average of the prices you paid — that only matches when every purchase was the same number of shares.

Does averaging down reduce my risk?

No. It reduces your average cost and increases your position size in something that is falling. The test is whether you'd buy at today's price holding nothing; if you wouldn't, a lower average cost isn't a reason to.

Why does a stock that fell 50% need to rise 100% to break even?

Because the gain is measured against the smaller base. $100 falling to $50 is −50%; $50 back to $100 is +100%. This asymmetry is why avoiding large drawdowns matters more than capturing large gains.

Is average cost the same as my tax cost basis?

Not necessarily. Average cost is standard for mutual funds, but for individual shares the US default is FIFO unless you identify specific lots at the time of sale. Specific identification often produces a better tax result, so check with your broker before selling.

Should I include dividends in my cost basis?

Dividends received in cash don't change cost basis. Dividends reinvested do — each reinvestment is a new purchase at that day's price, so enter it as one of the purchase lines.

Put this calculator on your own site

A working stock average, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Stock Average Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a stock average.

All finance calculators·Browse everything