What this calculator does
See what you really paid per share when you invest the same amount on a regular schedule. That habit is called dollar-cost averaging. When the price is low, your fixed amount buys more shares. When it's high, it buys fewer. So your average cost per share ends up below the simple average of the prices you paid, as long as the prices changed at all.
Enter the amount you invest each time and the price at each purchase. The calculator shows the shares bought each time, the total shares, your average cost per share and what the holding is worth now. Maybe your purchases were different sizes, for example when you buy more of a stock after its price drops (averaging down). Then switch to share counts, and it works out the weighted average cost instead.
Where it's used
Why this math matters outside the classroom:
- Paycheck investing. A worker puts $200 into an index fund every month, buying 4 units at $50 one month and 5 units at $40 the next.
- Averaging down. An investor holding 100 shares at $20 buys 100 more at $10 and finds a new average cost of $15 a share.
- Classroom unit rates. Students divide $500 by each month's share price to see how many shares a fixed budget buys.
- Comparing averages. Buying $100 of a fund at $10 and again at $40 gives an average cost of $16, below the $25 average price.
- Workplace savings plans. An employee reviews a year of payroll contributions to a retirement fund to see the average price paid per unit.
Grade level and standards: Grades 6–7; Common Core State Standards for Mathematics 6.RP.A.3.b, 7.RP.A.3. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Choose whether you invested the same dollar amount each time or bought different numbers of shares.
- Enter the amount per purchase, or the share count for each purchase. Then list the price paid each time, in order.
- If you like, add a fee per purchase and the current share price. If you leave the current price blank, the last purchase price is used.
- Read the average cost per share and compare it with the simple average price. The table shows the running average after each purchase.
What the inputs mean
- Purchases
- Same dollar amount is classic dollar-cost averaging, such as a monthly automatic investment. Different share counts suits any set of purchases, such as buying more after a price drop.
- Shares bought each time
- The number of shares bought in each purchase, in the same order as the prices. The two lists must be the same length.
- Price per share at each purchase
- The price per share at each purchase, in order. If you buy a fund, enter the price per unit or the net asset value (the fund's price per share).
- Fee per purchase
- A flat commission or fee charged on every purchase. It's added to your total cost, so it raises the average cost per share.
- Current share price
- Today's price, used to value what you own. Leave it blank to use the last price in the list.
Formula and method
shares bought each time = amount ÷ price average cost per share = total invested ÷ total shares with equal amounts and no fees: average cost = n ÷ (1/p₁ + 1/p₂ + … + 1/pₙ) current value = total shares × current price return = (current value − total invested) ÷ total invested × 100
In the formulas, n is the number of purchases and p₁ to pₙ are the prices you paid. With a fixed amount per purchase, the average cost per share works out to the harmonic mean of the prices. That's a kind of average that's always at or below the ordinary average. Low prices count for more, because the same money buys more shares at them.
With different share counts, the average cost is a weighted average. Each price counts in proportion to the number of shares bought at it. Fees are added to the total invested before dividing. Fractional shares (parts of a share) are allowed, as with most funds and many brokers.
Worked example
You invest $500 at each of five purchases, at prices of $50, $40, $25, $40 and $50 a share.
- Shares bought: 500 ÷ 50 = 10, 500 ÷ 40 = 12.5, 500 ÷ 25 = 20, then 12.5 and 10 again.
- Total shares: 10 + 12.5 + 20 + 12.5 + 10 = 65.
- Total invested: 5 × $500 = $2,500.
- Average cost per share: $2,500 ÷ 65 = $38.46, compared with a simple average price of ($50 + $40 + $25 + $40 + $50) ÷ 5 = $41.00.
- Valued at the last price of $50: 65 × $50 = $3,250, a $750 gain, or 30%.
Result: Your average cost is $38.46 a share, $2.54 below the average price, and the holding is worth $3,250.
Understanding the result
The gap between the simple average price and your average cost shows how much the fixed-amount approach helped. In the example, the price ended exactly where it started, yet the holding is up 30%. That's because the money invested at $25 bought twice as many shares as the money invested at $50.
If the price only rises, dollar-cost averaging buys fewer shares over time. Then a single lump sum at the start would have done better. Its main value is about habits. It keeps you investing on a schedule, and it avoids putting everything in at a bad moment.
Assumptions and limitations
- Every purchase goes through at the price listed, and fractional shares are allowed.
- Dividends, taxes and any sales between purchases aren't included.
- Fees are a flat amount per purchase.
- The calculator works with the prices you enter. It doesn't look up past prices.
- It shows the result of past or imagined purchases. It doesn't predict future prices or recommend a strategy.
- Fees charged as a percentage, and reinvested dividends, aren't modeled.
Frequently asked questions
Does dollar-cost averaging beat investing a lump sum?
Not usually in rising markets. Studies of long periods have generally found that investing a lump sum right away comes out ahead more often than not. That's because markets have tended to rise, and money invested earlier has more time to grow. Dollar-cost averaging lowers the risk of investing everything just before a fall. And it's the natural approach when you invest from each paycheck.
Why is my average cost lower than the average price?
Because a fixed amount buys more shares when the price is low. Those cheaper shares make up a bigger part of what you own, which pulls the average cost down. In math terms, your average cost is the harmonic mean of the prices. That can never be higher than their ordinary average.
How do I work out my average price after averaging down?
Switch to different share counts. Enter each purchase's shares and price, including the shares you started with. The calculator divides the total cost by the total shares to give your new average cost per share.
Do fees matter?
Yes, especially with small regular purchases. A $2 fee on a $100 purchase adds 2% to the cost of every share bought. Many brokers and fund platforms now offer commission-free regular investing. That makes small, frequent purchases more practical.
How this calculator is checked
Method: Average cost per share as total cost ÷ total shares; with equal investment amounts this equals the harmonic mean of the prices. Standard definitions of market value and simple return. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Dollar Cost Averaging Calculator on your own website or blog for free. Paste this code where you want it to appear: