MoneyFinancial Math

Dollar-Cost Averaging
calculator.

Find your average cost per share and return from buying the same amount on a schedule.

Before you rely on this result.This is an estimate for planning. Banks, lenders and other providers apply their own rules, fees and rounding, so confirm figures with them before you commit to a financial decision. Sources used on this page.

How it's worked out

Dollar-cost averaging means investing the same amount at regular times, whatever the price. Each purchase buys the amount, less any fee, divided by that day's price. A low price buys more shares and a high price buys fewer. Your average cost is everything you spent divided by all the shares:

shares bought\displaystyle \text{shares bought}=amount−feeprice\displaystyle {}= \frac{\text{amount} - \text{fee}}{\text{price}}average cost\displaystyle \text{average cost}=total investedtotal shares\displaystyle {}= \frac{\text{total invested}}{\text{total shares}}

With no fees, that average cost is the harmonic mean of the prices, which is never above their simple average. That is the whole effect: the fixed amount leans toward the cheap purchases. The value is your shares times the last price.

The yearly return is money-weighted. Each purchase counts from its own date, and the tool solves for the one rate that makes all the purchases grow to the final value, the internal rate of return. For the lump sum, the tool invests the same total, less one fee, at the first price.

Worked examples

Sam's index fund

Sam invests $500 on the first of each month for a year, at prices from $41.00 to $58.00. That buys 120.98 shares for $6,000, an average cost of $49.60 against a simple average price of $50.08. At the last price of $58.00 the shares are worth $7,016.65, a gain of 16.9%. All $6,000 at the first price of $50.00 would be worth $6,960.00, so averaging came out $56.65 ahead on these prices. Open this example in the tool

A falling market

On the example path that falls 1% a purchase, $200 a month for 24 months from $100 invests $4,800 and ends worth $4,286.44, a loss of $513.56. A lump sum at the first price would be worth $3,809.35. Averaging lost less here, but it still lost money: a regular plan does not protect against a falling market. Open this example in the tool

Weekly bitcoin buys with a fee

$100 of bitcoin every week for 8 weeks, with a $1.50 fee each time, gives an average cost of $61,281.23. That is above the simple average price of $60,562.50, because $12.00 of the $800 went to fees. Without the fee it would have been $60,362.01. Open this example in the tool

Reading your result

An average cost below the last price means the holding is worth more than you put in; the price what-if table shows this break-even point. The gap between your average cost and the simple average price shows how much the fixed amount helped, and fees work against it.

The lump-sum card answers a backward-looking question: on these exact prices, which would have ended with more? It says nothing about the next prices. Vanguard's 2012 study of US, UK and Australian markets found that investing a lump sum at once beat averaging it in about two-thirds of the time, because markets rose more often than they fell. Averaging did better when prices dropped soon after the start.

FINRA notes that spreading purchases out usually lowers risk but often lowers returns compared with a lump sum, and that more purchases can mean more fees (FINRA, the benefits and limitations of dollar-cost averaging). FINRA's rules also require any sales material on a regular plan to say it does not assure a profit or protect against loss in a declining market (Notice to Members 98-83).

Common mistakes

  • Averaging the prices. The simple average of your prices is not your cost. Divide what you spent by the shares you hold.
  • Leaving out fees. A flat fee on a small purchase is a large share of it, as the weekly example shows.
  • Reading a yearly return from a few weeks. A small gain over two months turns into a large yearly rate. Wait for a year of purchases.
  • Mixing the order. Enter prices oldest first. The last price is the one used to value the holding.
  • Forgetting reinvested dividends. They buy shares too. Add them as extra purchases, or use the DRIP calculator for a dividend stock.

Questions people ask

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.

Sources