DCA Calculator

Model dollar-cost averaging into any stock or asset. Enter your periodic investment, number of periods, and the price range to see your average cost per share, total return, and how DCA compares to a lump sum approach.

$
$
$

Enter your investment amount, periods, and price range, then click Calculate to see your DCA results and lump sum comparison.

For educational purposes only. Not financial advice. Read full disclaimer

DCA Formulas

Price(i) = startPrice + (endPrice - startPrice) × (i / (n - 1))

Shares(i) = investmentAmount / Price(i)

Total Shares = Σ Shares(i)

Average Cost = Total Invested / Total Shares

DCA Return % = (endPrice - avgCost) / avgCost × 100

Lump Sum Return % = (endPrice - startPrice) / startPrice × 100

Price is interpolated linearly from start to end. Periods are indexed from 0 to n-1.

Worked Examples

Example 1: DCA into a rising stock

You invest $500/month over 6 months. The stock starts at $50 and rises to $80.

  • Prices: $50, $56, $62, $68, $74, $80
  • You buy fewer shares as price rises — protecting against overpaying
  • Total invested = $3,000
  • Average cost ≈ $63.35 (vs $50 lump sum)
  • DCA return at $80 ≈ +26.3%
  • Lump sum return = +60% — lump sum wins in a rising market

Example 2: DCA into a falling then recovering stock

You invest $1,000/month over 12 months. The stock starts at $100 and ends at $90.

  • Total invested = $12,000. Lump sum loses 10% = −$1,000
  • DCA average cost ≈ $95.15 (buying more shares as price falls)
  • DCA return at $90 ≈ −5.4%
  • DCA outperforms lump sum in a declining market by reducing average cost

How to Use This Calculator

  1. Enter your investment per period — the fixed dollar amount you invest each period (e.g., $500/month).
  2. Set the number of periods — how many times you invest (e.g., 12 for a full year of monthly investing).
  3. Enter starting and ending prices — the asset's price at your first purchase and its current or projected price.
  4. Click Calculate — see your average cost per share, total shares acquired, current value, and a comparison against lump sum investing.
  5. Compare DCA vs lump sum — understand when each approach wins (DCA outperforms in declining/volatile markets; lump sum wins in consistently rising markets).

Frequently Asked Questions

What is dollar-cost averaging (DCA)?
DCA is an investment strategy where you invest a fixed dollar amount at regular intervals regardless of the asset's price. When prices are low you buy more shares; when prices are high you buy fewer. Over time this averages out your cost basis and reduces the impact of market volatility.
Is DCA always better than lump sum investing?
No — research shows lump sum investing outperforms DCA about two-thirds of the time in rising markets, because capital is deployed earlier and benefits from more growth. DCA is most valuable in volatile or declining markets, or when you don't have a lump sum available to invest all at once.
Why does this model assume linear price change?
This calculator uses a simplified linear interpolation between your start and end prices to model DCA results. Real markets are non-linear and volatile — the actual average cost you achieve will differ based on the specific price path the asset takes.
How does DCA reduce my average cost?
When you invest the same dollar amount each period, your money buys more shares when prices are low and fewer when prices are high. This naturally skews your average cost lower than a simple average of the prices over that period — a mathematical effect called the harmonic mean.
Can I use this for crypto or ETF investments?
Yes — the math works for any asset with a price: stocks, ETFs, cryptocurrencies, or commodities. Just use the appropriate starting and ending prices for that asset. Fractional shares are supported, so even high-priced assets work correctly.