Finance calculators

Stock Average Calculator

Updated Jun 20, 2026 By Jehan Wadia
Formulas
Stock Details (Optional)
Fetches the latest market price into the active or first empty purchase row. You can also type prices manually.
Enter to see unrealized gain/loss and percentage return.
Your Purchases

Your Stock Average
Total Shares
0
Total Amount Invested
$0.00
Average Cost Per Share
$0.00
Total Amount Invested
$0.00
÷
Total Shares
0
=
Average Cost
$0.00
Step-by-Step Solution
Investment Weight by Purchase
Breakdown of each purchase showing shares, price per share, amount invested, and percentage of total investment.
Purchase Shares Price/Share Amount Invested % of Total

Introduction

A stock average calculator helps you find the average price you paid for a stock across multiple purchases. When you buy shares of the same stock at different prices over time, it can be hard to know your true cost per share. This tool does the math for you in seconds.

Enter the number of shares and the price you paid for each purchase. The calculator adds up your total investment and divides it by your total number of shares. The result is your weighted average cost per share. You can also enter the current market price to see if you have a gain or a loss on your investment. If you want to calculate the exact dollar profit from selling shares, try our Stock Profit Calculator.

This is useful for investors who use dollar-cost averaging, buy the dip, or simply want a clear picture of where they stand. The calculator shows a full step-by-step breakdown, a chart of how your money is spread across purchases, and an optional auto-fill feature that pulls the latest stock price by ticker symbol.

How to Use Our Stock Average Calculator

Enter your stock purchase details below to find your average cost per share, total investment, and unrealized gain or loss.

Ticker Symbol (Optional): Type a stock ticker like AAPL or TSLA and click "Auto-Fill" to pull the latest market price into a purchase row automatically.

Current Market Price (Optional): Enter the current price of the stock. This lets the calculator show your total gain or loss and percentage return. You can also use our Percent Change Calculator to measure price changes between any two values.

Number of Shares: For each purchase, enter how many shares you bought. You can use whole numbers or decimals for fractional shares.

Price Per Share: For each purchase, enter the price you paid per share in dollars.

Add Purchase: Click the "Add Purchase" button to add more rows if you bought the same stock at different prices over time.

Calculate: Click the "Calculate" button to see your weighted average cost per share, total shares owned, total amount invested, and a full step-by-step breakdown of the math.

What Is a Stock Average Calculator?

A stock average calculator helps you find the average price you paid per share of a stock. When you buy the same stock more than once, you often pay a different price each time. This tool adds up all the money you spent and divides it by the total number of shares you bought. The result is your average cost per share. The math behind this is a weighted average, where each purchase is weighted by the number of shares bought.

Why Does Your Average Cost Matter?

Your average cost tells you the real price you paid for your shares. It helps you see if you are making money or losing money on your investment. If the current market price is above your average cost, you have a gain. If the current price is below your average cost, you have a loss. Knowing this number helps you make smarter choices about when to buy more shares or when to sell. When you do sell at a profit, our Capital Gains Tax Calculator can help you estimate the taxes you may owe. To measure your overall return on any investment, you can use our ROI Calculator.

How Stock Averaging Works

Stock averaging uses a simple formula:

Average Cost Per Share = Total Amount Invested ÷ Total Shares Bought

For example, say you buy 10 shares at $50 and later buy 10 more shares at $40. You spent $500 + $400 = $900 total on 20 shares. Your average cost is $900 ÷ 20 = $45 per share. If you want to project how your investments could grow over time with reinvested returns, check out our Compound Interest Calculator.

What Is Averaging Down?

Averaging down means buying more shares of a stock after its price drops. This lowers your average cost per share. Many investors use this strategy because it means the stock does not need to rise as high for them to break even or make a profit. However, averaging down carries risk. If the stock keeps falling, you lose more money because you own more shares.

What Is Averaging Up?

Averaging up is the opposite. It means buying more shares after the price goes up. This raises your average cost, but investors do it when they believe the stock will keep growing. It is a way to add to a winning position over time. To decide how many shares to add at each price level, a Position Size Calculator can help you manage risk.

When Should You Use This Calculator?

Use this calculator any time you buy the same stock at different prices. It works for stocks, ETFs, and other investments you purchase in multiple batches. It is especially helpful when you dollar-cost average, which means investing a fixed amount of money on a regular schedule regardless of the share price. Our DCA Calculator can help you plan and visualize a dollar-cost averaging strategy. The calculator shows your true cost basis so you can track your investment performance clearly. If you also earn dividends on your shares, our Dividend Calculator can help you estimate your dividend income, and for a broader view of your portfolio growth, try the Investment Calculator.


Formulas used

Amount Invested per Purchase
\text{Amount Invested}_i = \text{Price Per Share}_i \times \text{Number of Shares}_i
Total Amount Invested
\text{Total Invested} = \sum_{i=1}^{n} (\text{Price}_i \times \text{Shares}_i)
Average Cost Per Share
\text{Average Cost} = \frac{\text{Total Amount Invested}}{\text{Total Shares}}
Gain/Loss Per Share
\text{Gain/Loss Per Share} = \text{Current Price} - \text{Average Cost}
Total Unrealized Gain/Loss
\text{Total Gain/Loss} = (\text{Current Price} - \text{Average Cost}) \times \text{Total Shares}
Percentage Return
\text{Return \%} = \frac{\text{Current Price} - \text{Average Cost}}{\text{Average Cost}} \times 100

Frequently asked questions

Is this stock average calculator free to use?

Yes. This calculator is 100% free. There are no sign-ups, no fees, and no limits on how many times you can use it.

Can I use this calculator for ETFs or mutual funds?

Yes. This tool works for any investment you buy in multiple batches at different prices. That includes stocks, ETFs, mutual funds, and even crypto.

Does the calculator support fractional shares?

Yes. You can enter decimal values in the shares field. For example, you can type 0.5 if you bought half a share.

How many purchases can I add?

There is no set limit. Click the Add Purchase button to add as many rows as you need. Each row represents a separate buy.

Does the auto-fill ticker feature work for all stocks?

The auto-fill feature pulls live prices from Yahoo Finance. It works for most U.S. stocks and major global tickers. If a ticker is not found, you can type the price in manually.

Do I have to enter a current market price?

No. The current market price field is optional. If you leave it blank, the calculator still shows your average cost, total shares, and total amount invested. Fill it in only if you want to see your unrealized gain or loss.

What is the difference between average cost and weighted average cost?

They mean the same thing here. A weighted average cost accounts for how many shares you bought at each price. Buying 100 shares at $10 counts more than buying 5 shares at $20. A simple average would treat both prices equally, which gives a wrong result. This calculator always uses the weighted method.

Does this calculator include broker fees or commissions?

No. The calculator only uses the share price and number of shares you enter. If you paid fees, you can add them to the price per share yourself to get a more accurate cost basis.

What does the chart show?

The bar chart shows how much money you invested in each purchase. It also displays the percentage of your total investment that each purchase represents. You need at least two purchases for the chart to appear.

Is my data saved or stored anywhere?

No. All calculations happen in your browser. Nothing is sent to a server, and no data is saved. If you refresh the page, your entries will reset.

How is unrealized gain or loss calculated?

The calculator subtracts your average cost per share from the current market price. That gives your gain or loss per share. It then multiplies that number by your total shares to get the total gain or loss. The percentage return is the per-share difference divided by your average cost, times 100.

Can I use this calculator for stocks sold in the past?

This tool is designed to find your average cost on shares you currently hold. It does not track sell transactions. If you want to calculate profit from a completed trade, a stock profit calculator is a better fit.

Why is my average cost different from what my broker shows?

Brokers sometimes adjust cost basis for things like commissions, wash sale rules, stock splits, or reinvested dividends. This calculator uses only the raw share count and price you enter. Check your broker's method if you see a difference.

What happens if I enter zero or a negative number?

The calculator will show an error message. Both the number of shares and the price per share must be greater than zero for the calculation to work.

Can I remove a purchase row I no longer need?

Yes. Click the X button on the right side of any purchase row to remove it. You must always have at least one row, so the last one cannot be deleted.