Dollar Cost Averaging Calculator
Dollar cost averaging puts the same dollar amount in at each price, so cheap shares carry more weight. Four buys of $500 at $20, $25, $15 and $24 buy 99.17 shares for $2,000, an average cost of $20.17 against a plain average price of $21.00. The account is worth $2,380.00 at the last price.
Separate the prices with commas. Each price is one purchase, so 12 prices means 12 monthly buys.
| Average cost per share | |
| Shares owned | |
| Total invested | |
| Value at the last price | |
| Gain or loss | |
| Return on money invested |
What the prices say
| Purchases | |
| Lowest price paid | |
| Highest price paid | |
| Plain average of the prices | |
| Average cost with dollar cost averaging | |
| Cheaper than the plain average by | |
| Last price used for the value |
The other strategy
| Lump sum price | |
| Shares from that lump sum | |
| Value at the last price | |
| Gain or loss on the lump sum | |
| Dollar cost averaging versus that lump sum |
Purchase by purchase
| Buy | Price | Shares bought | Shares so far |
|---|
All of this runs in your browser. Nothing you type is sent anywhere.
What if the price follows one steady path?
This second calculator assumes the price moves at the same annual rate every month. It is for comparing a steady rise with a steady fall, not for predicting a real fund.
| Account value at the end | |
| Total invested | |
| Gain or loss | |
| Return on money invested | |
| Average cost per share | |
| Last price |
Against one lump sum at the start
| Lump sum value at the end | |
| Lump sum return | |
| Gap: dollar cost averaging minus lump sum | |
| Months bought |
Runs locally in your browser. Nothing is uploaded.
Type the prices you paid on each buy date and see your average cost per share, total shares, return, and how the plan compares with one lump sum purchase.
Key takeaways
- Average cost is total dollars divided by total shares, which is the harmonic mean of the prices, not the arithmetic mean
- Four buys of $500 at $20, $25, $15 and $24 come to 99.17 shares and an average cost of $20.17
- The same four prices average $21.00 if you add them and divide by four, so the plan paid $0.83 less per share
- A lump sum at the first price beats the monthly plan in rising markets, by $20.00 in the four buy example and $759.97 in a 2023 test
- A falling path flips the result: on a 10 year decline the monthly plan loses 38.45 percent against 65.13 percent for a lump sum
On this page
- How dollar cost averaging works
- The average cost formula, and why it is not the average price
- Worked example: four monthly buys of $500
- What a falling price path does to the same plan
- The same math on real 2023 prices
- Dollar cost averaging against a lump sum
- What dollar cost averaging does and does not protect against
- Fees, taxes and the mistakes that break the plan
How dollar cost averaging works
Dollar cost averaging means you invest the same dollar amount on a set schedule, no matter what the price is that day. Fifty dollars every Friday, $500 on the first of each month, $250 per paycheck. The amount stays fixed, so the share count floats.
That fixed amount does the work. When the price is low, your $500 buys a lot of shares. When the price is high, the same $500 buys fewer. Over a full cycle the cheap buys carry more weight than the expensive ones, and the average price you paid ends up below the plain average of the prices you saw.
The SEC's Investor.gov glossary puts it in one line: equal portions, at regular intervals, regardless of the ups and downs. FINRA's explainer adds the practical detail that anyone contributing to a 401(k) from each paycheck is already doing this without thinking about it.
Two numbers do most of the talking. At $20 a share, 500 / 20 = 25 shares. At $24 a share, 500 / 24 = 20.83 shares. The $20 buy got 25 - 20.83 = 4.17 more shares for the same money, which is the whole mechanism in one line.
Do that twelve times a year and 500 x 12 = $6,000 goes in over the year, in twelve buys of $500 each. The dollars are steady even when the share count is not.
The average cost formula, and why it is not the average price
Average cost per share is total dollars invested divided by total shares bought. With equal amounts in each period, that works out to the harmonic mean of the prices, not the arithmetic mean. The harmonic mean is always at or below the arithmetic mean when prices differ, and the gap grows as the prices spread out.
Put numbers on it. Three buys of $300 at $30, $20 and $10. The first buy is 300 / 30 = 10 shares. The second is 300 / 20 = 15 shares. The third is 300 / 10 = 30 shares. Those add up to 55 shares, and 300 x 3 = 900 dollars went in. The average cost is 900 / 55 = 16.36 dollars. The plain average of the three prices is (30 + 20 + 10) / 3 = 20.00 dollars. You paid 3.64 dollars less per share than the simple average.
This is arithmetic, not a market forecast. It holds for any set of prices, in any order, as long as each period gets the same dollar amount. Change the amount from period to period and the rule breaks, because the later, bigger buys start to dominate the average.
| Order of the same prices | Shares bought | Average cost | Last price | End value |
|---|---|---|---|---|
| $30, $20, $10 | 55.00 | $16.36 | $10 | $550.00 |
| $10, $20, $30 | 55.00 | $16.36 | $30 | $1,650.00 |
One more figure worth knowing: the order of prices does not change the average cost, but it changes the ending value. Same three prices in the order 10, 20, 30 give 55 shares and the same $16.36 average, yet the account ends at 55 x 30 = $1,650 instead of 55 x 10 = $550.
Worked example: four monthly buys of $500
Start with a simple path. You invest $500 a month for four months and the price you pay is $20, then $25, then $15, then $24.
Buy one: 500 / 20 = 25 shares. Buy two: 500 / 25 = 20 shares. Buy three: 500 / 15 = 33.33 shares. Buy four: 500 / 24 = 20.83 shares. Add them: 25 + 20 + 33.33 + 20.83 = 99.17 shares. Total invested is 500 x 4 = $2,000.
Average cost is 2,000 / 99.17 = $20.17. The plain average of the four prices is (20 + 25 + 15 + 24) / 4 = $21.00, so the plan paid $0.83 less per share than the simple average. At the last price of $24 the account is worth 99.17 x 24 = $2,380.00, a gain of 2,380 - 2,000 = $380.00, or 19.00 percent.
Now the comparison that stings a little. A single $2,000 buy at the first price of $20 would have bought 2,000 / 20 = 100 shares, worth 100 x 24 = $2,400.00 at the end. The monthly plan ends $20.00 behind, even though it paid a lower average price, because the lump sum had more money working during the rise from $20 to $24.
That is the trade in one example. The plan that bought the dip at $15 also held cash through the first two months.
What a falling price path does to the same plan
Now run a path that drops and then recovers. You invest $300 a month for six months at $50, $40, $25, $30, $45 and $40.
Go buy by buy. The first is 300 / 50 = 6 shares. The second is 300 / 40 = 7.5 shares. The third is 300 / 25 = 12 shares. The fourth is 300 / 30 = 10 shares. The fifth is 300 / 45 = 6.67 shares, and the sixth is 300 / 40 = 7.5 shares. The six buys add up to 49.67 shares, on 300 x 6 = 1,800 dollars invested.
Average cost is 1,800 / 49.67 = $36.24. The plain average price is (50 + 40 + 25 + 30 + 45 + 40) / 6 = $38.33, and the average cost lands $2.09 below it. The last price is $40, so the account is worth 49.67 x 40 = $1,986.67, a gain of 1,986.67 - 1,800 = $186.67, or 10.37 percent, even though the final price sits below the average price of the whole stretch.
A $1,800 lump sum at the first price of $50 would have bought 36 shares, worth 36 x 40 = $1,440. That is a loss of 1,440 - 1,800 = -$360.00, or -20.00 percent. Here the monthly plan beats the lump sum by 1,986.67 - 1,440 = $546.67.
The pattern is not luck. The worst prices got the smallest share counts and the best price got the largest, at 12 shares for $300.
The same math on real 2023 prices
Test it on a real year. The S&P 500 index closed 2023 at these month-end levels: 4076.60, 3970.15, 4109.31, 4169.48, 4179.83, 4450.38, 4588.96, 4507.66, 4288.05, 4193.80, 4567.80 and 4769.83. Those levels come from the S&P 500 series at FRED, the Federal Reserve Bank of St. Louis data service.
Put $1,000 in at each of those twelve levels. The units add up to 2.7843, on 1,000 x 12 = $12,000 invested, for an average cost of 12,000 / 2.7843 = $4,309.88. At the December level of 4,769.83 the account is worth 2.7843 x 4,769.83 = $13,280.64. That is a gain of 1,280.64, or 10.67 percent.
The lump sum version: 12,000 / 4,076.60 = 2.9436 units, worth 2.9436 x 4,769.83 = $14,040.61 at the end, a gain of 2,040.61 or 17.01 percent. The lump sum wins by 14,040.61 - 13,280.64 = $759.97.
Notice what the average cost did. It came in at $4,309.88 against a plain average level of $4,322.65, so the plan still paid less per unit than the simple average. It lost the race anyway, because 2.7843 units could not match the 2.9436 units a January buyer got during a year when the index rose 17.01 percent. The index figure also leaves out dividends, which both paths would have collected on the units they held.
Dollar cost averaging against a lump sum
The comparison above is the one that matters for a windfall, a bonus, an inheritance or a rolled over retirement account. You have the money today. The question is whether to put it in at once or spread it over months.
Vanguard compared the two across US, UK, Canadian, European, Australian, emerging and global markets for rolling one year periods from 1976 to 2022. Investing the lump sum beat a three month cost averaging plan between 61.6 percent and 73.7 percent of the time, according to Vanguard's cost averaging research. The median edge was 2.2 percentage points for a 100 percent equity portfolio, 1.8 points for a 60/40 mix and 1.2 points for a 40/60 mix.
The reason is simple arithmetic: cash waiting on the sideline misses the market's upward drift. Over the 1976 to 2022 window, an all stock portfolio put in at once ended 2.2 percentage points ahead of the same money dripped in over three months.
Put the same pot through both plans. A $30,000 windfall spread over six months is 30,000 / 6 = $5,000 a month, and 5,000 x 6 = $30,000 in total. Put the whole $30,000 in on day one and every dollar works from the first day. Hold $25,000 of it in cash for five months and that cash misses five months of return, which is the cost the Vanguard numbers measure.
Two cases still favor spreading the buys. When the path falls, the later buys get cheaper shares. And when the choice is between spreading the money and not investing at all, spreading wins, as the 2023 case showed for anyone who would have sat out the year entirely.
| Starting pot | Dollar cost averaging | Lump sum at the start | Who ends ahead |
|---|---|---|---|
| $2,000 over 4 months at $20, $25, $15, $24 | $2,380.00 | $2,400.00 | Lump sum by $20.00 |
| $1,800 over 6 months at $50, $40, $25, $30, $45, $40 | $1,986.67 | $1,440.00 | DCA by $546.67 |
| $12,000 over 12 months at 2023 S&P 500 levels | $13,280.64 | $14,040.61 | Lump sum by $759.97 |
| $60,000 over 10 years, price up 6% a year | $81,632.15 | $107,450.86 | Lump sum by $25,818.72 |
| $60,000 over 10 years, price down 10% a year | $36,928.43 | $20,920.71 | DCA by $16,007.72 |
What dollar cost averaging does and does not protect against
Spreading purchases lowers timing risk. It does not lower market risk. If the investment falls and stays down, every buy loses money, just by different amounts. A plan that spreads $12,000 over twelve months still ends down when the price ends 40 percent lower than it started.
Run the steady path in the second calculator. At $500 a month for 10 years, 500 x 120 = $60,000 goes in. If the price rises 6 percent a year from $20, it ends at $35.82, the account is worth $81,632.15, and the average cost is $26.33. The same $60,000 put in at $20 on day one would end at $107,450.86, so the steady plan trails by $25,818.72.
Flip the sign. If the price falls 10 percent a year from $20, it ends at $6.97 and the plan is worth $36,928.43, a loss of 38.45 percent. The lump sum in that case ends at $20,920.71, a loss of 65.13 percent. The plan lost less because each later buy got a lower price, and it still lost a lot.
| Same average price, different order | Shares | Average cost | End value | Lump sum at first price |
|---|---|---|---|---|
| $20, $22, $24, $26 (rising) | 87.79 | $22.78 | $2,282.58 | $2,600.00 |
| $26, $24, $22, $20 (falling) | 87.79 | $22.78 | $1,755.83 | $1,538.46 |
What the plan does buy is behavior. A fixed automatic transfer keeps you buying in months when the news is bad, which is the opposite of what most people do on their own.
Fees, taxes and the mistakes that break the plan
A schedule of small purchases multiplies trading costs. If each buy costs $5 and you buy 12 times a year, that is 5 x 12 = $60 a year. On $12,000 invested that is 60 / 12,000 = 0.50 percent, which is real money against a fund charging 0.03 percent. A $50 monthly buy with a $5 ticket charge gives up 5 / 50 = 10 percent of every deposit, while the same charge on a $500 buy is 5 / 500 = 1 percent.
Taxes add a second layer in a taxable account. Each purchase starts its own holding period, so a share bought in month one and a share bought in month twelve can be long term and short term on the same sale date. That is one more reason a 401(k) or IRA is a cleaner home for a monthly plan. The SEC bulletin on fees and expenses shows how a 1 percent annual drag compounds over 20 years.
The mistakes are mostly about stopping. Skipping the $500 buy because the price looks high means you have stopped dollar cost averaging and started timing the market, and twelve skipped months is $6,000 that never gets invested. Stopping in a fall is worse, because the cheap shares that pull the average down only arrive if you keep buying.
Two more traps. Stretching a windfall too thin keeps money in cash: $20,000 at $1,000 a month takes 20 months to deploy, while $2,500 a month takes 8. And ignoring what you already own can leave you with more stock exposure than you planned, since a 401(k) putting in $600 twice a month is already 600 x 2 = $1,200 of automatic buying.
Frequently asked questions
What is dollar cost averaging in simple terms?
You invest the same dollar amount on a fixed schedule, whatever the price is that day. A $500 monthly buy gets 25 shares at $20 and 20 shares at $25. The fixed amount means low prices buy more shares, which pulls your average cost down.
How do you calculate average cost per share?
Divide total dollars invested by total shares bought. Four buys of $500 at $20, $25, $15 and $24 come to $2,000 and 99.17 shares, so the average cost is 2,000 / 99.17 = $20.17. A spreadsheet or the calculator above does the same division for any price list.
Why is average cost lower than the average price?
Because each price gets the same dollars, not the same shares. Cheap prices buy more shares, so they carry more weight. In the four buy example the average cost is $20.17 against a plain average price of $21.00, a gap of $0.83.
Does dollar cost averaging beat a lump sum?
Usually not. Vanguard's study of rolling one year periods from 1976 to 2022 found the lump sum won 61.6 to 73.7 percent of the time, with a median edge of 2.2 percentage points for an all stock portfolio. It wins when prices fall after you buy.
Is dollar cost averaging the same as buying the dip?
No. Buying the dip means waiting for a lower price, which requires a forecast. Dollar cost averaging buys on a schedule no matter what the price is, so it never depends on a prediction. One buy might land near a low, another near a high.
Does the order of prices change the average cost?
No. The same set of prices in any order gives the same average cost, because each price gets the same dollars. Order does change the ending value. The set 30, 20, 10 and 10, 20, 30 both give 55 shares at an average cost of $16.36, but the account ends at $550 in the first case and $1,650 in the second.
How much does a $5 trade fee cost over a year?
Twelve buys a year at $5 each is 5 x 12 = $60. On $12,000 invested that is 0.50 percent a year. On a $50 monthly contribution the same fee eats 10 percent of every deposit, so small plans need a zero commission broker.
Can you dollar cost average with a small amount?
Yes, and fractional shares make it practical. A $50 buy at a $400 share price gets 0.125 shares. Check that the broker allows fractional shares and charges no commission, or the fee will be a larger drag than the market return.
What happens to dollar cost averaging in a falling market?
Each buy gets cheaper shares, so the average cost falls with the price. On a path from $20 down 10 percent a year for 10 years, $500 a month ends at $36,928.43 on $60,000 invested, a 38.45 percent loss. The same money put in at $20 on day one ends at $20,920.71, a 65.13 percent loss.
How long should you spread out a lump sum?
Three to twelve months is the common range, and shorter periods reduce the drag from holding cash. $20,000 at $1,000 a month takes 20 months. At $2,500 a month it takes 8 months. Vanguard's research used a three month split as its base case.
Does dollar cost averaging work in a 401(k)?
You are already doing it. Each paycheck contribution buys fund shares at that day's price, so a $600 contribution twice a month is 600 x 2 = $1,200 of automatic investing a month. No extra account is needed to get the effect.
How is dollar cost averaging taxed?
Each purchase starts its own holding period. A share bought in January 2024 and sold in December 2025 is a long term gain, while a share bought in November 2025 and sold the same month is short term. Retirement accounts avoid the issue because trades inside them are not taxed.
Is dollar cost averaging risky?
It lowers timing risk, not market risk. If the investment falls and stays down, every purchase loses money. Spreading buys cannot turn a losing fund into a winner, and it does not replace an emergency fund or a plan for the money.
How many purchases do I need to see the averaging effect?
Four purchases are enough to see it. In the example, four buys at $20, $25, $15 and $24 produce an average cost of $20.17 against a plain average of $21.00. Twelve purchases smooth the result further, and 120 purchases over 10 years smooth it more.
Spotted a wrong number or a broken result?
More Finance tools
- $100,000 Loan for 15 Years Calculator
- $15 an Hour Is How Much a Year?
- $15,000 Loan Over 5 Years Calculator
- $20 an Hour Is How Much a Year?
- $25 an Hour Is How Much a Year?
- $30 an Hour Is How Much a Year?
- 1 Year CD Rate Calculator
- 10 Year ARM Mortgage Calculator
- 10 Year Equipment Loan Calculator
- 10-Year Balloon Mortgage Calculator
- 10-Year Fixed Loan Calculator
- 10-Year Fixed Mortgage Calculator
- 10-Year Fixed Mortgage Rates Calculator
- 10-Year Second Mortgage Calculator
- 10/1 ARM vs 30 Year Fixed Calculator
- 1099 vs W-2 Calculator
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.