Dollar-Cost Averaging (DCA) vs. Average Price Calculator

Show how fixed-dollar purchases buy more shares at lower prices (harmonic mean cost).

DCA Harmonic Average Cost / Share USD 97.30
Arithmetic Mean Price USD 100.00
Total Shares Accumulated 30.83 shares
Ending Value at Period 3 Price USD 3,700.00
Inputs
Try:
Amounts are treated in the selected currency; no foreign-exchange conversion is applied.
USD
Fixed amount invested in each period.
USD
Asset unit price in Period 1.
USD
Asset unit price in Period 2 (dip).
USD
Asset unit price in Period 3 (recovery).
Results & Graph
DCA Harmonic Average Cost / Share
USD 97.30
Arithmetic Mean Price
USD 100.00
Total Shares Accumulated
30.83 shares
Ending Value at Period 3 Price
USD 3,700.00

DCA Harmonic Average Cost / Share

Graph 1 • How the inputs feed DCA Accumulation
Dollar-Cost Averaging (DCA) vs. Average Price Calculator • Custom Domain Schematic (Equities & Portfolio) USDperiodicDCA Accumulation Periodic Investment: 1.0k USD • Price Period1: 100 USD DCA HARMONIC AVERAGE COST USD 97.30 • Arithmetic Mean Price: USD 100.00 • Total Shares Accumulat: 30.83 shares Eq: TotalShares = D/P₁ + D/P₂ + D/P₃
Graph 2 • DCA Harmonic Average Cost / Share as Periodic Investment changes (40% to 160% of current)
0 USD 53.52 USD 107.0 USD 97.30 400 97.30 600 97.30 800 97.30 1.0k 97.30 1.2k 97.30 1.4k 97.30 1.6k
Graph 3 • Periodic Investment and Price Period1 together Compares DCA Harmonic Average Cost / Share when Price Period1 is shifted +25% (solid) vs. −25% (dashed).
0 USD 57.23 USD 114.5 USD --- Price Period1 @ 75% 104.0 -30% 104.0 -15% 104.0 +0% 104.0 +15% 104.0 +30%
Summary: Investing USD 1,000.00 across prices (100, 80, 120) accumulates 30.833 shares at USD 97.30/share (below the USD 100.00 arithmetic average).
Summary: Investing USD 1,000.00 across prices (100, 80, 120) accumulates 30.833 shares at USD 97.30/share (below the USD 100.00 arithmetic average).
Interactive chart & math engine powered by CalculatorGraph

Formula: DCA Accumulation Financial Formula

TotalShares = D/P₁ + D/P₂ + D/P₃
HarmonicCost = 3D / TotalShares
TotalShares = D/P₁ + D/P₂ + D/P₃; HarmonicCost = 3D / TotalShares
  • periodicInvestment: Periodic Investment (currency)
  • pricePeriod1: Price Period1 (currency)
  • pricePeriod2: Price Period2 (currency)
  • pricePeriod3: Price Period3 (currency)

Frequently Asked Questions

Does a bigger periodic investment lower the cost per share?

No. The payment amount cancels out. Each purchase buys the payment divided by the price, so doubling the payment doubles every share count and total money divided by total shares is unchanged. On the default prices the cost is $97.30 whatever amount you enter. A larger payment only means more shares and a larger ending value.

What is the harmonic mean in plain terms?

It is the average you get when each price is weighted by how many shares it bought. For equal payments, divide the number of purchases by the sum of 1 over each price. On the default that is 3 divided by the sum of one hundredth, one eightieth and one hundred-and-twentieth, which gives $97.30.

Can the DCA cost ever be higher than the average price?

Not with equal payments and positive prices. The harmonic mean of positive numbers is never above their arithmetic mean. It equals it only when every price is the same, as on the flat comparison path of 100, 100, 100, where both averages are $100.00. Any variation in price pushes the fixed-amount cost below the simple average.

Does a lower average cost mean I made money?

No. Profit depends on the current price against your cost, not on the cost against the average price. On the default the holding is worth $3,700.00 because the final price of 120 is above $97.30. Swap the last two prices to 120 then 80 and the cost is identical, but the holding is worth less than the money invested.

Why does the ending value use only the third price?

Because it values everything you own at the most recent price on the page. All 30.83 shares are priced at 120 on the default. The first two prices only matter for how many shares you bought. If you want a value at today's price, enter the current price as the third period, keeping in mind that this also changes the third purchase.

How many shares would whole-share buying give on the default?

Fewer. At 100, $1,000 buys exactly 10 shares. At 80 it buys 12 whole shares instead of 12.5, and at 120 it buys 8 instead of 8.33. That totals 30 shares against the page's 30.83, with some cash left unspent each time. The calculator assumes fractional shares throughout.

Can I enter more than three purchase prices?

Not on this page, which has three fixed price fields. The method itself extends to any number of equal payments: divide the number of purchases by the sum of 1 over each price. For uneven payment amounts, divide the total spent by the total shares bought instead. Both can be done in a spreadsheet from your purchase records.

Does the calculator account for brokerage fees?

No. Each payment is assumed to buy shares in full. A fee per purchase reduces the money that reaches the market and so raises the true cost per share. You can approximate its effect by entering each payment net of the fee, such as $1,000 minus the charge, while keeping in mind that the amount you actually paid is the full $1,000 each time.

Is this the same as a SIP calculator?

It uses the same idea of a fixed amount at regular intervals, but it answers a different question. A SIP calculator usually projects future value from an assumed growth rate. This page takes actual or hypothetical prices and shows the cost per share they produce. It makes no assumption about returns at all.

Why does the second price field mention a dip?

The default path of 100, 80, 120 is a dip followed by a recovery, chosen to show the averaging clearly. Nothing requires your second price to be lower. You can enter any three positive prices, rising, falling or flat, and the formula works the same way. Only the help text assumes a dip.

What if my three payments were not equal?

Then this page's formula does not describe your position. The harmonic mean shortcut only holds when every payment is the same. For uneven amounts, add up the money spent across all purchases and divide it by the total number of shares bought. That weighted figure is your real cost per share, and it can sit above or below the simple average of the prices.

Why does the page call the cost an advantage?

Because it compares fixed-amount buying with buying an equal number of shares each period. Against that benchmark the fixed-amount cost can only be lower or the same. The word does not mean the strategy beats a single upfront purchase, the market or any other plan. On the default the advantage is the gap between $97.30 and $100.00, about 2.7%.

Three purchases of $1,000 and a cost of $97.30

The default puts $1,000 into the same asset three times. The price is 100 the first time, 80 the second and 120 the third. The headline cost per share comes out at $97.30, while the plain average of the three prices is $100.00.

The share counts are worth working through, because they explain everything else on the page. At 100, $1,000 buys 10 shares. At 80 it buys 12.5. At 120 it buys about 8.33. Add them and you hold 30.83 shares for three payments of $1,000 each.

Divide the money spent by the shares held and you get $97.30 a share. That is the cost basis per share the calculator reports. It is lower than $100 because the cheapest purchase bought the most shares and the dearest purchase bought the fewest, so the low price carries more weight in the result.

The name for this kind of average is the harmonic mean. For three equal payments it is 3 divided by the sum of 1 over each price. The page's formula, 3D divided by total shares, is the same thing written with the payment D left in. Both give $97.30 on the default.

Why the 80 purchase pulls the average down

A fixed amount of money buys a variable number of shares. When the price is low the count goes up, and when it is high the count goes down. That is all the effect is.

On the default the 80 purchase contributes 12.5 of the 30.83 shares, about 41% of the holding, even though it is only one of three payments. The 120 purchase contributes about 27%. The share-weighted price therefore leans towards 80, and the cost lands below the simple average.

The gap is always in the same direction. For any set of positive prices, the harmonic mean is less than or equal to the arithmetic mean, and the two are equal only when every price is the same. The more the prices spread out, the wider the gap. Change the dip from 80 to 50 with the third price at 100 and the cost falls to $75.00 against an arithmetic average of $83.33, a much larger difference than the default shows.

If all three prices are 100 the two averages match exactly at $100.00, and the sentence under the result says so: the cost is equal to the arithmetic average because the prices did not vary. Thirty shares are bought, ten each time, and the ending value is $3,000.00, the same as the money put in. That flat run is the baseline every other path is measured against.

Flat, dip and fall: the three comparison paths

The page compares three price paths at the default $1,000 a period. The flat path of 100, 100, 100 costs $100.00 a share, equal to the simple average. The dip and recovery of 100, 80, 120 costs $97.30 against an average of $100.00. The steady fall of 100, 70, 50 costs $67.74 against an average of $73.33.

The gap between the two averages grows with how far the prices spread. On the flat path there is no gap at all. On the dip it is $2.70, about 2.7% of the average. On the fall it is $5.59, about 7.6%, because the last two purchases happened at much lower prices and bought many more shares: 44.29 in total against 30 on the flat path.

The payment amount does not change any of these costs. It cancels out of the formula, since doubling each payment doubles the shares bought at every price, so money spent divided by shares held stays the same. Only the prices decide the cost per share; the amount only scales the share count and the ending value in proportion.

So the comparison is built on prices rather than amounts on purpose. If you want to see the averaging effect change, change the prices.

What beating the $100.00 average is measured against

The comparison on the page is narrow and worth stating precisely. A cost of $97.30 against an arithmetic average of $100.00 means fixed-amount buying did better than buying a fixed number of shares each period. Ten shares at each of the three prices would cost $100.00 a share on average. That is the alternative the page has in mind.

It is not a comparison with putting all the money in at once. On the default, three payments of $1,000 invested in full at the first price of 100 would buy 30 shares, slightly fewer than the 30.83 from spreading them out, because the price dipped before it rose. Enter a steady rise from 100 to 120 in two equal steps instead and spreading the payments gives a cost just under the middle price and only 27.42 shares, fewer than the 30 an upfront purchase at 100 would have bought. Which one comes out ahead depends entirely on the price path, which nobody knows in advance.

The calculator also says nothing about whether the asset is worth buying at all, or about the right amount or timing. It describes the arithmetic of a fixed-amount schedule on prices you supply.

Ending value of $3,700 depends on the last price only

The Ending Value line multiplies the 30.83 shares by the third price, so on the default it is 30.83 times 120, or $3,700.00. Set against three payments of $1,000, that is a gain of about 23%.

The cost per share does not depend on the order of the prices, but the ending value does. Swap the second and third prices so the path is 100, 120, 80. The cost is still $97.30 and the share count still 30.83, because the same three purchases were made. The ending value, though, is now 30.83 times 80, and the holding is worth roughly 18% less than the money put in.

The steady fall shows the same point from another angle. With prices of 100, 70 and 50, the cost per share is $67.74, well below the $73.33 arithmetic average, exactly as the averaging predicts. Yet the 44.29 shares are worth $2,214.29 at the last price of 50, about 26% less than the three payments of $1,000 that bought them, because the final price is below the cost.

A below-average cost does not mean a profit. Whether the position is up or down is decided by where the price ends relative to $97.30, not by how far the cost sits below $100.

Fractional shares, fees and dividends

The share count on the default is 30.833, with three decimal places in the sentence under the result. The calculator assumes every dollar is invested and that fractions of a share can be bought. If your platform only sells whole shares, each purchase leaves some cash unspent and the real share count is lower. At 120, $1,000 buys 8 whole shares, not 8.33.

Transaction fees are not modelled. A fixed fee per purchase takes the same amount from every payment, and because it reduces the money that buys shares it raises the true cost per share. The effect is proportionally larger on small payments than on large ones, since the fee is a bigger slice of each.

Dividends, interest earned on cash waiting to be invested, taxes and currency conversion are outside the model too. Display Currency only changes the symbol on the result.

Including any of these would move the numbers. Leaving them out keeps the page focused on the one thing it is built to show, which is how the share count responds to price.

Inputs the formula needs to be positive

Every price has to be above zero for the formula to work, since it divides by each one. The calculator refuses a zero or negative price and asks for a value above zero in that period. A real asset priced at a fraction of a cent would still compute, but the share count would be enormous and the result would say more about that one purchase than about averaging.

The periodic investment must also be above zero. With nothing invested there are no shares and no cost to report, so the page asks for an amount instead of showing a result.

The page also assumes the same payment each time. If your actual purchases were different amounts, the three-price formula does not apply as written, and the true cost is total money spent divided by total shares bought, which you can work out from your records.

Checking your own purchase history against the formula

The page takes exactly three prices, but the method extends to any number of equal payments. Add up 1 divided by each purchase price, then divide the number of purchases by that sum. The answer is your cost per share under fixed-amount buying.

For a quick check on three of your own purchases, use the prices you actually paid after any spread, rather than a closing price from a chart. A small difference in each price can move the third decimal of the share count, and over many purchases those differences add up.

If the result you calculate by hand differs from the cost shown by your broker, the usual reasons are fees included in the broker's basis, whole-share rounding, reinvested dividends counted as purchases, or payments that were not all the same size. None of those are on this page, which is why the broker's figure is the one to use for records and tax purposes.