Average Cost Basis Calculator
What did you really pay per share?
Enter up to five purchases to find your average cost per share, your total cost and your gain or loss at the current price.
- Free, no sign-up
- Runs in your browser
- Shareable results
- Educational only
Your purchases.
Leave at 0 if unused.
Leave at 0 if unused.
Added to your cost.
Enter each purchase as a lot. Unused lots can stay at zero. These are hypothetical assumptions for learning, not forecasts or expected results for any investment.
Result
Each buy against your average.
View the detailed table
What the numbers mean.
A weighted average.
Your average cost is not the simple average of your prices. Lots with more shares count for more, so it is total cost divided by total shares.
Fees raise your cost.
Commissions add to what you paid, so they raise your average cost and your break-even price.
Tax rules differ.
Some countries use average cost for tax. Others use specific lots or first-in, first-out. Check the rules that apply to you.
About this average cost basis calculator.
An average cost basis calculator finds the average price you paid per share when you bought a stock or fund in several lots. Enter the shares and price for up to five purchases, add any commissions and fees, and the current price. The calculator returns your average cost, your total cost, your break-even price and your gain or loss.
Your average cost matters because it shows the price the market has to reach for you to break even, and it changes each time you add to a position. It is the idea behind dollar-cost averaging too. See the glossary entry on cost basis, and use the dollar-cost averaging calculator to compare regular buying with a lump sum.
How the average cost basis calculator works in practice.
You buy 100 shares at $50, then 50 shares at $45, then 75 shares at $55. The current price is $60, with no fees.
Total cost: $11,375
Average cost per share: $50.56
Current value: $13,500
Unrealized gain: $2,125 (18.68% on cost)
Break-even price: $50.56
The simple average of the three prices is $50.00, but your average cost is $50.56, because you bought more shares at the higher prices. Average cost is a weighted average: total cost divided by total shares. In the “Buying the dip” scenario, buying 100 shares each at $60, $45 and $35 brings the average down to $46.67, even though the first purchase cost $60.
How to choose your inputs.
Lots (shares and price). Enter the number of shares and the price paid for each purchase. Leave unused lots at 0.
Current price per share. The latest price, used for the current value and the gain or loss.
Total commissions and fees. Add all trading costs. They raise your cost and your break-even price.
How the average cost calculator works.
For each lot the calculator multiplies shares by price, adds up the cost, adds your fees, and divides by total shares.
Average cost = (sum of lot costs + fees) ÷ total shares
Unrealized gain = shares × current price − total cost
Dividends, splits and reinvested shares are not modeled. Use the total return calculator to include income.
Limits of this average cost basis calculator.
This is a simple weighted average for your information. Tax rules for working out cost basis differ by country and may require specific methods, such as first-in first-out or specific lots, so do not use this as tax advice. The calculator ignores dividends, splits and currency changes, and shows unrealized gain only; it does not model selling.
Common questions about the average cost basis calculator.
Is average cost the same as cost basis for taxes?
Not necessarily. Tax authorities use different methods in different places. Treat this as an informational tool.
Why is my average cost not the middle of my prices?
Because bigger purchases carry more weight. Buying more shares at a low price pulls the average down more.
Do I have to enter every purchase?
Group small purchases at similar prices into one lot if you have more than five.
How does this relate to dollar-cost averaging?
Regular fixed-amount buying produces a lower average cost than the average market price. See the dollar-cost averaging calculator.
How do I calculate average cost per share?
Add up the cost of every purchase, including fees, and divide by the total number of shares. Do not simply average the prices, because larger purchases should count for more.
What is cost basis?
Cost basis is what you paid for an investment, including fees. It is the starting point for working out a gain or loss.
What does averaging down mean?
It means buying more of an investment after the price has fallen, which lowers your average cost per share. It also increases your exposure to that investment, so it adds risk.
Does the calculator include fees?
Yes. Enter total commissions and fees and they are added to your cost, which raises your average cost and break-even price.
More calculators.
Educational illustration only, not personal investment or tax advice. Tax treatment of cost basis varies by country.
Further learning: Dollar-cost averaging explained · Glossary: Cost basis · Dollar-Cost Averaging Calculator · Investor.gov: Financial tools and calculators · Research methodology · Financial disclaimer