Finance calculators

Stock Average Calculator

Updated Sep 1, 2026 By Jehan Wadia
Rate 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 calculates the average for you.

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.

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.

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.

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.

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.

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. The calculator shows your true cost basis so you can track your investment performance clearly.


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

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.

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.

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.

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.