Dollar-cost averaging and formula plans

Portfolio management
Should I invest a lump sum now or a fixed amount every month — and what do the other mechanical plans do?

Learning goals

After this page, you can:

  • Compute the shares bought each month under dollar-cost averaging, the total shares and the average cost per share, and compare that cost with the simple average price.
  • Explain why the average cost is below the average price whenever prices vary, and when a lump sum still wins.
  • Describe the constant-dollar, constant-ratio and variable-ratio plans in one sentence each.
  • Compute the trade a constant-dollar plan makes after a price move.

The idea

Every month you buy $50 of coffee beans, whatever the price. In a cheap month you come home with a big bag. In an expensive month you get a small one. At the end of the year you work out what you paid per pound. It is less than the average price on the shelf, because you bought more pounds when they were cheap. You did not predict anything. The fixed dollar amount did the work.

Dollar-cost averaging. Dollar-cost averaging means investing the same dollar amount on a fixed schedule, for example every month, at whatever the price is that day. It takes three lines of arithmetic.

Key formulas: dollar-cost averaging

shares bought in a month = dollars invested ÷ that month’s price

total shares = the sum of the monthly shares

average cost per share = total dollars ÷ total shares

simple average price = sum of the prices ÷ number of months

average cost ≤ average price (equal only when every price is the same)

The average cost per share is what you really paid for each share. It is always at or below the simple average of the prices. The reason is in the coffee story: a cheap month buys more shares, so it counts for more.

The honest part. “Below the average price” does not mean “better than buying everything at the start”. A lump sum is all the money invested at once, at the first price. If the price mostly rises, every later purchase costs more than the first one, and the lump sum ends ahead. If the price dips first, averaging ends ahead. So averaging is not a return machine. It is a discipline against fear and against hunting for the perfect day.

Four formula plans. A formula plan is a mechanical rule for trading: no forecast, no emotion. Dollar-cost averaging is one of four. Each plan holds a different thing fixed.

Plan What is held fixed What the rule does
Dollar-cost averaging the dollars invested each period buys more shares when the price is low
Constant-dollar plan the dollars kept in stocks moves any gain above that amount to bonds, and buys stocks with bond money after a fall
Constant-ratio plan the percent kept in stocks rebalances when the percent drifts past a trigger
Variable-ratio plan nothing: the percent itself changes lowers the stock percent after the market has risen, and raises it after the market has fallen
Key formulas: constant-dollar plan

stock value after a price move = shares × new price

move to bonds = stock value − dollar target

A negative number means: buy stocks with bond money.

Many investors add a trigger band to the constant-dollar plan: the plan trades only when the stock side is a set percent away from its target.

Orders are plans too. A limit order buys only at your price or better. A stop order sells when the price falls to your line. Both carry out a plan while you are not watching: decide the rule when you are calm, and let it act when you are not.

In Excel. Put the monthly amount in B4 and the prices in B7 to B12. Shares: =$B$4/B7, copied down column C. Total shares: =SUM(C7:C12). Average cost: =COUNT(B7:B12)*B4/SUM(C7:C12). Average price: =AVERAGE(B7:B12). Lump sum at the end, with the total dollars in B14: =B14/B7*B12. Constant-dollar plan: =shares*newprice-target for the dollars moved, and =move/newprice for the shares sold.

Try it

The first tab starts with twelve real month-end closing prices of SPY, a fund that follows the S&P 500 index (course data: prices Sep 2025–Aug 2026, month-end closes). Change the monthly amount, press a button, or type your own price path.

What to notice:

  • With the SPY prices, the average cost is $704.54 against an average price of $706.49. The lump sum still ends ahead, $6,908.49 against $6,532.34, because this path mostly rose.
  • Press Coffee beans. The price dips and then recovers. Now averaging ends ahead: $2,587.50 against $2,250.00. The tallest bar on the chart is the cheapest month.
  • Open the second tab. The plan keeps $5,000 in the stock fund and trades only when the stock side is 5% or more away from it. It trades twice and moves $657.02 to bonds. It ends at $10,726.88, a little below buy-and-hold at $10,757.08: selling on the way up gives up some gain.

Returns in the tool are on the dollars invested, not weighted by time. In the second tab the bond side earns nothing.

Worked example

Priya puts $300 into the Birchwood index fund at the start of each of six months. The prices are $40.00, $32.00, $25.00, $32.00, $40.00 and $50.00.

Step 1. Shares each month = 300 ÷ price.

Month Price Shares bought
1 $40.00 300 ÷ 40 = 7.5000
2 $32.00 300 ÷ 32 = 9.3750
3 $25.00 300 ÷ 25 = 12.0000
4 $32.00 300 ÷ 32 = 9.3750
5 $40.00 300 ÷ 40 = 7.5000
6 $50.00 300 ÷ 50 = 6.0000

The cheapest month bought twice as many shares as the most expensive month.

Step 2. Totals. Dollars: 6 × 300 = $1,800. Shares: 7.5 + 9.375 + 12 + 9.375 + 7.5 + 6 = 51.75.

Step 3. Average cost against average price. Average cost per share = 1,800 ÷ 51.75 = $34.78. Simple average price = (40 + 32 + 25 + 32 + 40 + 50) ÷ 6 = $36.50. The average cost is $1.72 below the average price.

Step 4. Value at the end, and the lump sum. Priya’s shares are worth 51.75 × 50 = $2,587.50. That is a gain of $787.50 on $1,800, or +43.75%. A lump sum of $1,800 at $40 would have bought 45 shares, worth 45 × 50 = $2,250 at the end, or +25.00%. On this path, averaging won.

Step 5. The constant-dollar plan. Marco keeps exactly $2,000 in the same fund: 50 shares at $40. He also has $1,000 in bonds. The price reaches $50. His stock side is now 50 × 50 = $2,500. Move to bonds = 2,500 − 2,000 = $500. He sells $500 of the fund, which is 10 shares at $50. The stock side is back at $2,000, and the bonds are $1,500.

Answer. Priya owns 51.75 shares at an average cost of $34.78, against an average price of $36.50. Her shares end at $2,587.50. Marco’s constant-dollar plan moves $500 to bonds after the rise.

To check it, press Coffee beans in the tool above.

Check yourself

Check 1.

You invest $200 a month for three months at prices of $20, $10 and $25. How many shares do you own?

Shares = dollars ÷ that month’s price, month by month.

Check 2.

In the same plan ($200 a month at $20, $10 and $25), what is the average cost per share, and how does it compare with the average price?

Average cost = total dollars ÷ total shares, always at or below the average price.

Check 3.

A stock’s price rises every single month for a year. Which statement about investing a lump sum at the start versus the same total spread over the twelve months is correct?

Averaging is a discipline, not a return machine; a steadily rising path favours the lump sum.

Check 4.

An investor keeps exactly $8,000 in a stock fund and the rest in bonds. The fund rises so her stock side is worth $9,100. Under her plan she:

Constant-dollar: fixed dollars in stocks; profit above the target goes to bonds.

Check 5.

Which pair correctly matches a plan with its rule?

Four plans, four things held fixed: monthly dollars, stock dollars, a stock percentage, or a moving percentage.

Video

Video coming soon.