Skip to content
Calcapedia
Money

Dollar Cost Averaging Calculator

See the shares you buy, your average cost per share and your gain when you invest a fixed amount at changing prices. You can also average purchases of different sizes.

Level: Grades 6–7

  • Common Core standard 6.RP.A.3.bSolve unit rate problems including those involving unit pricing and constant speed.
  • Common Core standard 7.RP.A.3Use proportional relationships to solve multistep ratio and percent problems. Examples: simple interest, tax, markups and markdowns, gratuities and commissions, fees, percent increase and decrease, percent error.
Printable worksheet

Dollar Cost Averaging Calculator

Know the answer you need? Pick an input to work backward.

Inputs
Purchases

One price per purchase, separated by commas.

Optional. Leave it blank to use the last purchase price.

Result

Average cost per share

$38.46

Investing $500.00 at each of 5 prices buys 65 shares at an average of $38.46, $2.54 below the $41.00 average price.

Total shares
65
Total invested
$2,500.00
Simple average of the prices
$41.00
Current value
$3,250.00
Gain
$750.00
Return on amount invested
30%
Purchase price and running average cost
$0$20$40$6012345

Purchase

  • Price
  • Average cost

See the step-by-step solution ↓

Each purchase and the running average cost
Each purchase and the running average cost
PurchasePriceSharesCostShares to dateAverage cost to date
1$50.0010$500.0010$50.00
2$40.0012.5$500.0022.5$44.44
3$25.0020$500.0042.5$35.29
4$40.0012.5$500.0055$36.36
5$50.0010$500.0065$38.46

Step-by-step solution

  1. Find how many shares each $500.00 purchase buys: the amount ÷ that day's price, so lower prices buy more

    $500.00 ÷ $50.00 = 10; $500.00 ÷ $40.00 = 12.5; $500.00 ÷ $25.00 = 20; $500.00 ÷ $40.00 = 12.5; $500.00 ÷ $50.00 = 10
  2. Add up all the shares you bought

    10+12.5+20+12.5+10=65
  3. Add up everything you put in

    total invested=$2,500.00
  4. Find what you paid per share on average: total invested ÷ total shares

    $2,500.0065=$38.46
  5. For comparison, find the plain average of the prices, ignoring how many shares each bought

    sum of 5 prices5=$41.00
  6. Find what your shares are worth now, at $50.00 a share

    65×$50.00=$3,250.00
  7. Show the gain or loss as a percentage of what you put in

    $3,250.00−$2,500.00$2,500.00×100=30%

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

Please note: Results are estimates for planning and comparison. Lenders, banks, and tax authorities may round differently or include fees not modeled here, so confirm figures with your provider before deciding.

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

  1. Choose whether you invested the same dollar amount each time or bought different numbers of shares.
  2. Enter the amount per purchase, or the share count for each purchase. Then list the price paid each time, in order.
  3. 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.
  4. 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.

  1. Shares bought: 500 ÷ 50 = 10, 500 ÷ 40 = 12.5, 500 ÷ 25 = 20, then 12.5 and 10 again.
  2. Total shares: 10 + 12.5 + 20 + 12.5 + 10 = 65.
  3. Total invested: 5 × $500 = $2,500.
  4. Average cost per share: $2,500 ÷ 65 = $38.46, compared with a simple average price of ($50 + $40 + $25 + $40 + $50) ÷ 5 = $41.00.
  5. 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: