Skip to content
Omnikalc

Dollar-cost averaging calculator: average cost per share

Invest the same amount at regular intervals and see your average cost per share, the number of shares bought and your gain or loss at the latest price.

Updated on
Your inputs
$

Value out of range

$

Value out of range

$

Value out of range

$

Value out of range

$

Value out of range

$

Value out of range

$

Value out of range

Results

Average cost per share

$79.56

Value at the latest price

$2,263

Simple average of the prices
$82.50
Shares bought
25.139
Total invested
$2,000
Gain or loss
13.1%
Gain

What dollar-cost averaging is

Dollar-cost averaging (DCA) means investing the same dollar amount at regular intervals, every month or every paycheck, whatever the market is doing. Because the amount is fixed, each purchase buys more shares when the price is low and fewer when it is high. Over time this pulls your average cost per share below the simple average of the prices you paid.

How the calculator works

Enter the amount invested each time and the share price at each purchase (up to six). The calculator adds up the shares bought, divides the total invested by that number to get your average cost per share, and compares it with the simple average of the prices. It then values your shares at the latest price and shows the gain or loss.

  • Shares bought at each step = amount ÷ price
  • Average cost = total invested ÷ total shares
  • Gain = shares × latest price ÷ total invested − 1

Worked example

You invest $500 four times, at prices of $100, $80, $60 and $90.

Purchase Price Shares
1 $100 5.000
2 $80 6.250
3 $60 8.333
4 $90 5.556
Total 25.139

You invested $2,000 for 25.139 shares, an average cost of $79.56, while the average price was $82.50. At the latest price of $90 the shares are worth about $2,263, a gain of 13.1%, even though the price is still 10% below where you started. Someone who had invested the full $2,000 at $100 would be down 10%.

Why the average cost is lower

Mathematically, the average cost under DCA is the harmonic mean of the prices, which is always less than or equal to the arithmetic mean. The more volatile the prices, the bigger the gap.

DCA versus a lump sum

If you already have a large sum, studies of US stocks show that investing it all at once has beaten spreading it out roughly two times out of three, simply because markets rise more often than they fall. DCA is mainly a way to invest regularly from income and to avoid the regret of putting everything in just before a drop. Contributions to a 401(k) or an IRA from every paycheck are DCA by design.

Things to watch

  • Fees: a fixed commission per trade eats into small, frequent purchases. Most brokers now charge none for stocks and ETFs.
  • Discipline: DCA only works if you keep buying when prices fall, which is exactly when it feels hardest.
  • Taxes: each purchase has its own cost basis, which matters when you sell in a taxable account.

This calculator gives estimates for education and planning. It is not investment, tax or legal advice; for decisions about your own situation, talk to a qualified financial professional.

Frequently asked questions

What is dollar-cost averaging?

Investing a fixed amount at regular intervals, such as $500 every month, whatever the price. You automatically buy more shares when prices are low and fewer when they are high.

Why is the average cost lower than the average price?

Because a fixed amount buys more shares at low prices. The average cost per share is the harmonic mean of the prices, which is always at or below the simple average.

Is dollar-cost averaging better than investing a lump sum?

Historically, investing a lump sum right away has beaten spreading it out about two-thirds of the time, because markets tend to rise. Dollar-cost averaging reduces the regret of investing just before a fall and suits people investing from each paycheck.

Is a 401(k) a form of dollar-cost averaging?

Yes. Contributions taken from every paycheck and invested automatically are a classic example.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.