Stock Average Calculator — Cost Basis & P/L

Ottimizzazione del motore di ricerca
  1. Home
  2. Calculators
  3. Stock Average Calculator
Share: Report

Stock Average Calculator

100% free · Runs 100% in your browser · No signup needed

Purchase lots

Current price per share (for P/L)

What-if: averaging down
Target average
Buy price now
 

Averaging down lowers your cost basis but increases exposure — never average down on a broken thesis. Estimates only, not financial advice.


Di Stock Average Calculator

What Is a Stock Average Calculator?

When you buy shares of a stock at different times and different prices, a single question decides whether you are actually in profit: what did all those shares cost you on average? Your brokerage app shows the current price, but your real break-even point is your weighted average cost per share across every lot you ever bought. Our free Stock Average Calculator computes it precisely. Add each purchase lot — the number of shares, the price per share, and any fee for that lot — and the tool returns your total shares held, your total invested capital, and your average cost per share. Enter the current market price and it shows your unrealized profit or loss in dollars and percent. A what-if panel goes further: type a target average cost and the price you plan to buy at, and it tells you how many additional shares you need to buy to reach it. Everything is calculated instantly in your browser, and nothing is stored or sent anywhere. As always with investment math, the results are estimates for planning — not financial advice.

How the Calculator Works

The heart of the tool is the purchase-lot table. Each row represents one buy order: how many shares you purchased, the price you paid per share, and optionally the commission or fee attached to that lot. Lots can be added and deleted freely, so the table can mirror your real trade history or a hypothetical scenario you are testing. From the lots, the calculator derives three core figures. Total shares is the simple sum. Total invested is the sum of (shares × price) for every lot, plus all lot fees. Average cost per share is total invested divided by total shares — the weighted average, which correctly gives more influence to the lots where you bought more shares. Enter the current market price and you get the current value of the position (total shares × market price) and the unrealized P/L: current value minus total invested, shown both in currency and as a percentage of invested capital.

The Formulas

FigureFormula
Total sharessum of shares across all lots
Total investedsum of (shares × price + fee) per lot
Average cost per sharetotal invested ÷ total shares
Current valuetotal shares × current market price
Unrealized P/L ($)current value − total invested
Unrealized P/L (%)P/L ÷ total invested × 100

Including per-lot fees matters more than most people think. A $10 commission on a 5-share lot adds $2 per share to your true cost — enough to flip a small position from apparent profit to real loss. If your broker charges per-trade fees, always enter them.

Worked Example: Three Lots of the Same Stock

Imagine you bought shares of a company in three rounds: 100 shares at $50, then 100 shares at $40 after a dip, then 200 shares at $30 after a bigger dip. No fees, for simplicity:

LotSharesPriceCost
1100$50$5,000
2100$40$4,000
3200$30$6,000
Total400$15,000

Average cost per share = $15,000 ÷ 400 = $37.50. If the stock now trades at $42, your position is worth $16,800 — an unrealized gain of $1,800, or 12%. Notice the naive "average of the three prices" ($50 + $40 + $30) ÷ 3 = $40 would have understated your gain, because it ignores that you bought twice as many shares at $30. That weighting error is exactly what this calculator eliminates. Use our Percentage Calculator for quick one-off percent changes, and our Compound Interest Calculator to see what reinvested gains could become over years.

Averaging Down vs. Averaging Up

Buying more after a price drop — averaging down — lowers your average cost and reduces the recovery needed to break even, as the example above shows. It is a legitimate strategy when your conviction in the company is based on fundamentals, not hope. But it has a dark side: averaging down into a structurally broken business is how small losses become portfolio-destroying ones, a pattern traders call "catching a falling knife." Averaging up — buying more as the price rises — does the opposite: it raises your average cost but concentrates capital in winners that are proving you right. Neither is universally correct; both change your average cost, and this calculator shows you the new number before you commit real money. Run the what-if panel first: enter your desired average and the price you would buy at, and it computes the exact share count needed. Seeing the required size of the next buy often reveals whether the plan is reasonable or a stretch.

Why Average Cost Matters for Stop-Losses

A stop-loss is only meaningful relative to your true cost basis. A trader who "remembers" buying at $50 when the weighted average is actually $37.50 will place stops in the wrong place — either stopping out of a position that was never in danger, or holding a loser far past the point their own rules would have exited. Your average cost per share is also the baseline for position sizing: risking "2% of capital" requires knowing your capital at risk, which is total invested, not a remembered price. The calculator's unrealized P/L panel gives you both numbers at a glance, so decisions about trimming, adding, or exiting start from facts instead of feelings. Pair it with our SIP Calculator if you invest fixed amounts on a schedule, and remember that none of this is financial advice — it is arithmetic in service of your own judgment.

Honest Limitations

Here is what the tool does not do, stated plainly. It tracks cost basis for standard long positions in shares; it does not model short positions, options, or leveraged products, where P/L math works differently. It does not account for dividends received, stock splits (you would need to restate your lots), or currency effects if you hold foreign stocks — our Currency Converter can help with the FX side separately. Tax treatment of gains is deliberately out of scope: capital gains rules vary widely by country and holding period, so consult a tax professional. Finally, an attractive average cost never makes a bad company a good investment. The calculator tells you precisely where you stand; it cannot tell you where the stock is going. Every output is an estimate for planning, not a recommendation.

Frequently Asked Questions

How do you calculate average stock price across multiple buys?

Add up everything you spent (shares × price per lot, plus fees) and divide by the total number of shares. That weighted average is your true average cost per share.

What does averaging down mean?

Buying more shares at a lower price than your previous purchases, which pulls your average cost down and reduces how far the price must recover for you to break even.

How many shares do I need to buy to reach a target average?

Enter your target average and the planned buy price in the what-if panel. The calculator solves for the share count that blends your existing position down (or up) to that target.

Is unrealized P/L the same as actual profit?

No. Unrealized P/L is a paper figure based on the current market price. It becomes real only when you sell — and selling may involve fees and taxes the calculator does not model.

Run a Finance Blog on FistHost Hosting From $0.99/mo

If this calculator helped you understand your numbers, imagine sharing that knowledge with an audience. FistHost web hosting starts at just $0.99 per month, giving you a fast, secure home for a personal finance blog, a trading journal, or a price-tracking site. Every plan includes one-click installs, free SSL, and performance tuned for content sites, so your pages load quickly for readers and search engines alike.

Get a Free Domain With Your FistHost Hosting

Every FistHost hosting plan comes with a free domain name for the first year, so your new project starts with a professional address at no extra cost. Pair it with the $0.99/mo starter plan and you can launch a finance blog, a portfolio tracker, or a small business site today for less than the cost of a coffee. Your domain, your hosting, your data — all under one roof at FistHost.

User Reviews

No reviews yet. Be the first to review this tool!

Write a Review

★★★★★

Captcha

Reviews are protected by captcha and moderated before they appear.


FistHost

Blazing-Fast Web Hosting

Plans from $0.99/mo
Free domain included

Get Hosting
FistHost Web Hosting Blazing-fast hosting for your website Plans from $0.99/mo · Free domain included Get Hosting