Dollar-Cost Averaging Calculator
Average cost per share from regular purchases
Enter the prices you paid on a regular investing schedule to get your share count, average cost per share, value, money-weighted return and a comparison with investing the same total as a lump sum.
Financial MathUpdated October 21, 2026Checked against 6 reference values
Used only to annualize the return
One price per purchase, oldest first, separated by commas, spaces or new lines
Average cost per share
$49.60
120.9767 shares from 12 monthly purchases. The simple average of the prices was $50.08.
- Total invested
- $6,000
- Value at the last price
- $7,017
- +16.94% on money invested
- Annualized return (money-weighted)
- +39.32%
- Same total as a lump sum at the first price
- $6,960
- Dollar-cost averaging ahead by $57
Chart data as a table
| Purchase number | Purchase price | Average cost |
|---|---|---|
| 1 | $50.00 | $50.00 |
| 2 | $46.00 | $47.92 |
| 3 | $41.00 | $45.37 |
| 4 | $44.00 | $45.02 |
| 5 | $48.00 | $45.58 |
| 6 | $53.00 | $46.67 |
| 7 | $51.00 | $47.24 |
| 8 | $47.00 | $47.21 |
| 9 | $52.00 | $47.70 |
| 10 | $56.00 | $48.42 |
| 11 | $55.00 | $48.95 |
| 12 | $58.00 | $49.60 |
| # | Price | Shares bought | Total shares | Invested | Average cost | Value |
|---|---|---|---|---|---|---|
| 1 | $50.00 | 10 | 10 | $500 | $50.00 | $500 |
| 2 | $46.00 | 10.8696 | 20.8696 | $1,000 | $47.92 | $960 |
| 3 | $41.00 | 12.1951 | 33.0647 | $1,500 | $45.37 | $1,356 |
| 4 | $44.00 | 11.3636 | 44.4283 | $2,000 | $45.02 | $1,955 |
| 5 | $48.00 | 10.4167 | 54.845 | $2,500 | $45.58 | $2,633 |
| 6 | $53.00 | 9.434 | 64.279 | $3,000 | $46.67 | $3,407 |
| 7 | $51.00 | 9.8039 | 74.0829 | $3,500 | $47.24 | $3,778 |
| 8 | $47.00 | 10.6383 | 84.7212 | $4,000 | $47.21 | $3,982 |
| 9 | $52.00 | 9.6154 | 94.3366 | $4,500 | $47.70 | $4,906 |
| 10 | $56.00 | 8.9286 | 103.2651 | $5,000 | $48.42 | $5,783 |
| 11 | $55.00 | 9.0909 | 112.356 | $5,500 | $48.95 | $6,180 |
| 12 | $58.00 | 8.6207 | 120.9767 | $6,000 | $49.60 | $7,017 |
What dollar-cost averaging does to your cost basis
Dollar-cost averaging means investing the same dollar amount on a schedule, such as $500 on the first of every month, whatever the price. Because the amount is fixed, you automatically buy more shares when the price is low and fewer when it is high. Most people already do this through payroll contributions to a 401(k).
Paste the prices you actually paid (or the fund's price on each purchase date) and the calculator returns your share count, your average cost per share, the value at the latest price, a money-weighted annualized return and what the same total would be worth if it had all gone in at the first price. If you have no price history to hand, the example price paths show how averaging behaves when prices are flat, rising, falling or swinging.
Why the average cost sits below the average price
shares boughti = (A − fee) ÷ Pi
average cost = total invested ÷ total shares = n ÷ (1/P1 + 1/P2 + … + 1/Pn) with no fees
A is the amount invested each time, Pi the price at purchase i and n the number of purchases. With no fees, the average cost is the harmonic mean of the prices, and the harmonic mean of positive numbers is never larger than their ordinary (arithmetic) mean. So a fixed-dollar plan always buys at or below the simple average price; the two are equal only when the price never changes.
That does not mean averaging beats investing all at once. A lump sum put in at the first price owns more shares from the start whenever prices go on to rise. The annualized return shown is money-weighted: it is the internal rate of return of the cash flows (each purchase out, the holding valued at the last price), turned into a yearly rate using your purchase frequency.
Worked example: $300 at four prices
Buying $300 at $30, $20, $25 and $30 gets 10 + 15 + 12 + 10 = 47 shares for $1,200. The average cost is 1,200 ÷ 47 = $25.53, while the simple average of the four prices is $26.25. At the final $30 price the holding is worth $1,410.00, a gain of $210.00 even though the price ended where it started. A $1,200 lump sum at the first $30 price would be worth exactly $1,200.00.
Averaging against a lump sum on four price paths
$500 a month for 24 months starting at $50, compared with investing the full $12,000 at the first price. Each path is a simple pattern computed by the calculator, not market data.
| Price path | Average cost | Mean price | DCA value | Lump-sum value |
|---|---|---|---|---|
| Flat at $50 | $50.00 | $50.00 | $12,000 | $12,000 |
| Rising 1% a month | $55.93 | $56.19 | $13,487 | $15,086 |
| Falling 1% a month | $44.43 | $44.65 | $10,716 | $9,523 |
| Swinging around a slow rise | $51.02 | $51.73 | $11,514 | $11,748 |
On the rising path the lump sum ends $1,599 ahead because all the money rode the whole rise. On the falling path averaging loses $1,284 instead of $2,477, because later purchases were made at lower prices. Averaging trades some expected return for less regret about the timing of a single large purchase.
Reading your result
- Average cost is your cost basis per share for tax purposes if you sell the whole position (fees included). Brokers may track each purchase lot separately.
- Value and gain use the last price in your list. Add today's price as the final entry if your last purchase was some time ago, keeping in mind that it then counts as one more purchase.
- Annualized return is only meaningful over a year or more. Over a few months, small price moves turn into large yearly percentages. It shows n/a when the rate cannot be solved.
- Dividends are not included. For a fund that pays them, total return will be higher than shown.
What research says about lump sum versus averaging
Vanguard's 2012 study of US, UK and Australian markets found that investing a lump sum immediately beat spreading it over 12 months about two-thirds of the time, because markets rose more often than they fell. Averaging did better in the periods when prices fell soon after the start. The study noted that averaging can still suit an investor whose main worry is putting everything in just before a fall. That finding applies to money you already have; if you invest from each paycheck, regular purchases are simply how the money arrives. Past patterns do not guarantee future results, and your own outcome can only be measured afterward, with the prices you actually paid.
Dollar-Cost Averaging Calculator: common questions
How do I calculate my average cost per share?
Add up every dollar you spent, including fees, and divide by the total number of shares you bought. With a fixed dollar amount each time and no fees, this equals the harmonic mean of the purchase prices, which is always at or below the simple average of those prices.
Is dollar-cost averaging better than investing a lump sum?
Not on average. Because markets have risen more often than they have fallen, investing a lump sum straight away has usually come out ahead, while averaging does better when prices drop soon after you start. Averaging mainly reduces the risk of investing everything at a bad moment.
Does dollar-cost averaging work for crypto?
The arithmetic is the same for any asset with a price, so the calculator works for crypto purchases too. Averaging spreads out timing risk, but it does not reduce the risk that the asset itself falls in value over the whole period.
Why does the annualized return look so large for a short period?
The return is converted to a yearly rate, so a few percent gained over two or three months becomes a much larger annual figure. Treat the annualized return as meaningful only when your purchases cover a year or more.
Should I include fees?
Yes, if your broker charges a commission or a fund charges a purchase fee. The fee is taken from each purchase before shares are bought, so it raises your average cost and lowers your return.
Sources
- Vanguard Research, Dollar-cost averaging just means taking risk later (2012)
- U.S. Securities and Exchange Commission, Investor.gov glossary: dollar cost averaging
- Internal Revenue Service, Publication 550, Investment Income and Expenses: basis of identical shares and average basis
Related calculators
- Investment CalculatorProject an investment from a starting amount and monthly contributions at a return you choose. See contributions versus growth, the value in today's dollars, the cost of starting later and how a lower or higher return changes the result.
- ROI CalculatorCalculate return on investment from what you put in and got back, including income and costs, get the annualized return for the time held, and compare two investments.
- Compound Interest CalculatorCalculate compound interest with monthly contributions at any compounding frequency, solve for the time or rate to reach a target, and compare the Rule of 72 with the exact doubling time.
- Crypto Profit CalculatorCalculate the profit or loss on a cryptocurrency trade after buy and sell fees, the return on investment, the break-even sell price and an optional after-tax figure.
- Capital Gains Tax CalculatorEstimate the federal income tax and 3.8% net investment income tax on selling a stock, fund or property, using 2026 IRS brackets, the exact holding period from your dates, and an optional state rate.
- Dividend CalculatorWork out the dividend income from your shares per year, per month and per payment, with current yield, yield on cost, payout ratio and after-tax income. Or find the portfolio size needed for a monthly income target.