Dollar Cost Averaging Calculator
Calculate average cost basis for DCA investing from purchases at different prices.
Returns total invested, share count, average price, and gain vs lump sum.
Dollar-cost averaging (DCA) is an investment strategy where a fixed dollar amount is invested at regular intervals — regardless of the asset price. This eliminates the impossible task of timing the market and smooths the average purchase price over time.
Average cost per share/unit formula: Average Cost = Total Amount Invested ÷ Total Units Purchased
Total units purchased: Total Units = Σ (Investment Amount ÷ Price at Each Purchase)
Because you buy more units when price is low and fewer when price is high, DCA naturally produces an average cost lower than the arithmetic average price during the same period.
Mathematical relationship: The DCA average cost equals the harmonic mean of prices (not the arithmetic mean): Average Cost (DCA) = n ÷ Σ(1/Price_i) × Fixed Investment
This is always ≤ the arithmetic mean — the mathematical basis for DCA’s cost-reduction benefit.
Total portfolio value: Portfolio Value = Total Units × Current Price
Total return: Return % = ((Portfolio Value − Total Invested) ÷ Total Invested) × 100
DCA frequency comparison:
- Monthly DCA: Reduces timing risk with minimal transaction overhead — most practical for most investors
- Weekly DCA: Slightly better averaging, more transactions; worthwhile only if transaction fees are zero
- Annual lump sum: Research shows lump sum investing beats DCA ~66% of the time in rising markets — but DCA wins on psychological safety and risk management
DCA in volatile markets (crypto example): DCA excels in highly volatile assets — because price swings dramatically in both directions, the harmonic mean effect is magnified, producing a meaningfully lower average cost vs. lump-sum purchase at the wrong time.
Worked example: You invest $500/month in Bitcoin for 6 months:
| Month | BTC Price | Units Bought |
|---|---|---|
| 1 | $60,000 | 0.00833 |
| 2 | $45,000 | 0.01111 |
| 3 | $38,000 | 0.01316 |
| 4 | $52,000 | 0.00962 |
| 5 | $67,000 | 0.00746 |
| 6 | $55,000 | 0.00909 |
- Total invested: $3,000
- Total units: 0.00833 + 0.01111 + 0.01316 + 0.00962 + 0.00746 + 0.00909 = 0.05877 BTC
- Average cost per BTC: $3,000 ÷ 0.05877 = $51,043
- Arithmetic average price: ($60,000+$45,000+$38,000+$52,000+$67,000+$55,000) ÷ 6 = $52,833
- DCA saved: $52,833 − $51,043 = $1,790 per BTC in average cost — the DCA advantage demonstrated.