1. Calculators
  2. Stock Market & Equity

Dollar Cost Averaging Calculator

Model a fixed amount invested in a stock or fund at regular intervals. See how many shares each purchase buys, why your average cost ends up below the average price, what the position is worth, and how it compares with investing everything at once.

Updated Oct 16, 2026Free · no sign-upFormulas tested

Your inputs

Invest the same amount every period and see what it bought. Paste your own prices, or use the example: a year with a dip and a recovery.

Fills five years of month-end prices, as if you bought at each month’s close. You can change any value afterwards.
$
One price per purchase, in order, separated by commas or new lines. The last price is used to value the position.
$
In dollars per trade. Enter 0 for a zero-commission broker or an automatic investment plan.

Results

Value at the last price$7,185.95$6,000 invested over 12 purchases: a gain of $1,185.95 (19.77%)
Profit
$1,185.95
Return on money invested
+19.77%
Total invested
$6,000.00
Shares bought
135.0742
Your average cost per share
$44.42
Total invested ÷ shares
Average market price
$44.98
Simple average of the 12 prices
Lump sum at the first price
$6,384.00
$6,000 invested at $50.00
DCA minus lump sum
$801.95

Your average cost of $44.42 per share is 1.25% below the $44.98 average price, because the same $500 bought more shares when the price was low. Here, buying in stages beat investing everything at the first price by $801.95.

Share price at each purchase and your average cost

Share priceYour average cost
$35$40$45$50$55Mo 1Mo 3Mo 5Mo 7Mo 9Mo 11Average price $44.98

When the price line is above your average cost, the position is in profit.

Month by month

MonthPriceShares boughtShares heldInvestedAverage costValueProfit / loss
1$50.0010.000010.0000$500.00$50.00$500.00$0.00
2$48.2010.373420.3734$1,000.00$49.08$982.00-$18.00
3$45.6010.964931.3384$1,500.00$47.86$1,429.03-$70.97
4$41.3012.106543.4449$2,000.00$46.04$1,794.27-$205.73
5$38.9012.853556.2984$2,500.00$44.41$2,190.01-$309.99
6$36.5013.698669.9970$3,000.00$42.86$2,554.89-$445.11
7$39.8012.562882.5598$3,500.00$42.39$3,285.88-$214.12
8$42.7011.709694.2694$4,000.00$42.43$4,025.30$25.30
9$45.1011.0865105.3559$4,500.00$42.71$4,751.55$251.55
10$47.9010.4384115.7943$5,000.00$43.18$5,546.55$546.55
11$50.609.8814125.6757$5,500.00$43.76$6,359.19$859.19
12$53.209.3985135.0742$6,000.00$44.42$7,185.95$1,185.95

Results are estimates from the numbers you enter. They are not financial, tax or legal advice.

How to use the dollar cost averaging calculator

  1. Enter the amount you invest each period. This is the fixed sum you put in every month, week or quarter, before fees.
  2. Choose how often you buy. The setting only labels the chart and table; the calculation is the same for any interval.
  3. Paste the share prices at each purchase, in order, separated by commas or on separate lines. For a past plan, use the prices you actually paid from your broker’s statements. To test a stock’s history, read monthly closing prices off a chart. The example is a year of monthly prices that fall about 27% and then recover to above where they started.
  4. Add a fee per purchase if your broker charges one. Many automatic investment plans have no fee.

The calculator values the position at the last price in the list. The chart shows the share price at each purchase against your running average cost: whenever the price line is above the blue line, the position is in profit. The table lists every purchase with the shares bought, the running total and the profit or loss at that point.

How dollar cost averaging is calculated

Each period, a fixed amount buys as many shares as it can at that period’s price:

Shares bought in period i = (A − F) ÷ Pi
Average cost per share = Total invested ÷ Total shares = (n × A) ÷ Σ [(A − F) ÷ Pi]
Average price = (P1 + P2 + … + Pn) ÷ nA is the amount invested each period, F the fee per purchase, Pi the price in period i and n the number of purchases. Value = Total shares × last price.

With no fees, the average cost is the harmonic mean of the prices, and the average price is their arithmetic mean. A basic mathematical fact is that the harmonic mean is never larger than the arithmetic mean, and is strictly smaller whenever the numbers differ. That is the whole of the “averaging” advantage: when you spend a fixed amount, cheap periods buy more shares and so carry more weight in your average.

The lump-sum comparison invests the same total at the first price, with a single fee:

Lump-sum value = (n × A − F) ÷ P1 × PnThis assumes the whole amount was available at the start. In real life, money saved from each paycheck cannot be invested before you earn it.

A worked example

You invest $500 at the start of every month for a year. The price starts at $50.00, falls to $36.50 in month six, and recovers to $53.20.

Over 12 purchases you put in $6,000.00 and buy 135.0742 shares. The simple average of the twelve prices is $44.98, but your average cost is $44.42, 1.25% lower, because the months near the bottom bought the most shares.

At the last price the shares are worth $7,185.95, a profit of $1,185.95 or +19.77%, even though the price rose only 6.4% from where you started.

Investing the full $6,000.00 at the first price would have bought 120 shares, now worth $6,384.00. In this case the staged purchases came out $801.95 ahead.

The effect is clearest when the price simply returns to where it began. If the last two months had been $49 and $50 instead, a lump sum would show exactly no gain, while the monthly plan would be up $799.92, because the shares bought during the dip are worth more at $50 than they cost.

When DCA beats a lump sum, and when it does not

The outcome depends entirely on the path of the price. Using the same $500 a month for twelve months:

Price path DCA value DCA profit Lump-sum value Lump-sum profit
Dip and recovery ($50 → $36.50 → $53.20) $7,185.95 $1,185.95 $6,384.00 $384.00
Steady rise ($50 → $69.10) $7,092.74 $1,092.74 $8,292.00 $2,292.00
Steady fall ($50 → $25.50) $4,430.39 -$1,569.61 $3,060.00 -$2,940.00

In a rising market, a lump sum wins because every dollar is invested at the lowest price of the year; dollar cost averaging leaves money waiting while the price climbs. In a falling market, DCA loses much less, because later purchases are made at lower prices. A dip followed by a recovery is the case where DCA shines.

Since stock markets have historically risen in most years, a lump sum invested immediately has usually ended up ahead when the money was available all along. The case for dollar cost averaging rests on two other points. First, most people do not have a lump sum: they invest from income, so regular purchases are simply how saving works. Second, spreading a large sum over several months limits the damage from bad timing and makes it easier to stick with the plan, which matters if a sharp fall right after investing would push you to sell.

What changes the result most

  • The final price. The value is measured at the last price, so the same purchases can show a gain or a loss depending on the day you stop. Check how sensitive your result is by changing the last number in the list.
  • Volatility. The bigger the swings, the larger the gap between your average cost and the average price. With prices that never change, the two are equal and DCA has no effect.
  • Fees. A fixed fee takes a bigger bite from small purchases. With a $5 fee, the example’s average cost rises to $44.87; on purchases of $100 a month the same fee eats 5% of every purchase and pushes the average cost to $46.76. With per-trade fees, buying less often in larger amounts costs less.
  • Time. Over many years, each new purchase is a smaller share of the total, so the averaging effect fades and the long-run return of the investment itself dominates. The investment calculator projects that longer-term growth.

Mistakes to avoid

  • Stopping during the fall. The purchases made near the bottom produce most of the benefit. Pausing a plan when prices drop removes exactly those purchases.
  • Comparing with the wrong benchmark. “My average cost is below the average price” is always true when prices vary, so it is not evidence that the plan worked. Compare the final value with what the same money would have earned elsewhere.
  • Treating DCA as risk control for a single stock. Averaging purchases into one company does not reduce the risk that the company itself fails. Diversification does that; DCA only spreads your entry over time.

What this calculator does not include

  • Dividends. Reinvested dividends buy extra shares and raise the value; the dividend reinvestment calculator models them.
  • Interest on cash waiting to be invested. In the lump-sum comparison, the DCA investor’s uninvested money could be earning interest, which narrows the gap slightly.
  • Fractional shares. The calculator assumes each purchase can buy fractional shares, as most brokers and automatic plans allow. With whole shares only, small leftover amounts would carry over to the next purchase.
  • Taxes. Each purchase is a separate tax lot with its own cost basis and holding period, which matters when you sell part of the position.

Frequently asked questions

What is dollar cost averaging?
Dollar cost averaging means investing the same dollar amount at regular intervals, such as every month, regardless of the price. Each purchase buys more shares when the price is low and fewer when it is high. Automatic contributions to a 401(k) or a monthly investment plan are dollar cost averaging by design.
Does dollar cost averaging lower your average cost?
It makes your average cost per share lower than the simple average of the prices you bought at, whenever the prices vary. In the example, the average price is $44.98 but the average cost is $44.42. It does not guarantee a lower cost than buying everything at once, which depends on where the price starts and ends.
Is dollar cost averaging better than investing a lump sum?
Not on average. Markets have risen more often than they have fallen, so money invested sooner has usually had more time to grow, and historical comparisons generally find a lump sum ahead more often than not. Dollar cost averaging does better when prices fall after you start, and it reduces the regret of investing everything just before a drop.
How often should I invest when dollar cost averaging?
Monthly is common because it matches most pay cycles. More frequent purchases smooth the average a little more, but with per-trade fees they cost more; with zero-commission trading or automatic plans, the frequency matters much less than investing consistently.
Can I lose money with dollar cost averaging?
Yes. If the price ends below your average cost, the position is at a loss. In a steady decline from $50 to $25.50, the example plan ends with a loss of -$1,569.61, though that is far less than the loss on a lump sum invested at the first price (-$2,940.00).

Related calculators

All calculators →

Get price history for a stock

All stocks →

Each US stock page has an interactive price chart, so you can read off monthly closes and paste them in to test a real DCA plan.

This calculator is for education and planning. It uses the formulas described above and the inputs you provide; real results depend on fees, taxes, timing and other details that a general tool cannot know. PromtFinance does not give personal financial advice. Check important decisions with your provider or a qualified professional.