portfolios.tools

DCA Price Averager

Compute your real average cost per share from periodic purchases — compare DCA against lump sum outcomes.

Current Price
Summary

Add at least two purchases to see DCA vs lump sum comparison.

Scenario
DateAmountPrice

How It Works

This calculator takes a history of periodic purchases — each with a date, dollar amount invested, and share price at the time — and computes your true average cost per share. Unlike a simple average of prices, this is the harmonic mean weighted by dollars invested, which gives you the real cost basis you need for tax reporting and performance tracking.

The tool also compares your DCA outcome against what a single lump sum investment of the same total amount at the first purchase price would have yielded. Enter a current price to see your total gain or loss and return percentage. Add purchases over time to watch your average cost evolve — all data stays in your browser.

The Formula

sharesᵢ = amountᵢ / priceᵢ

totalShares = Σ sharesᵢ

totalInvested = Σ amountᵢ

avgCostPerShare = totalInvested / totalShares

simpleAvgPrice = Σ priceᵢ / n

lumpsumShares = totalInvested / firstPrice

dcaVsLumpsum% = ((totalShares − lumpsumShares) / lumpsumShares) × 100

currentValue = totalShares × currentPrice

totalGain = currentValue − totalInvested

totalReturn% = (currentValue / totalInvested − 1) × 100

Purchases with zero or negative amounts/prices are excluded from computation.

FAQ

What is dollar-cost averaging?

Dollar-cost averaging (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, your fixed dollar amount buys more shares; when prices are high, it buys fewer. Over time, this often results in a lower average cost per share than the simple average price.

How is the average cost per share different from the simple average price?

The average cost per share is the total dollars invested divided by the total shares acquired. This is the harmonic mean of prices weighted by dollars invested, which is always lower than or equal to the simple average of prices when prices fluctuate — this is the mathematical advantage of DCA.

What does the lump sum comparison show?

The tool computes what would have happened if you invested the entire amount as a lump sum at the first purchase price. The DCA advantage percentage shows how many more (or fewer) shares you ended up with by spreading your buys out instead of going all-in at once.

When does DCA beat lump sum?

When prices are volatile or declining, DCA tends to outperform lump sum investing because you buy more shares when prices are cheap. When prices rise steadily, lump sum usually wins. History shows lump sum outperforms DCA roughly two-thirds of the time, but DCA reduces the risk of bad timing.

Is my data saved?

Your purchase history and the current price input are saved in your browser's localStorage. The computed averages, gains, and comparison figures are never stored — they are recalculated fresh each time.

Related Tools

More calculators available: compound interest comparator, lump sum vs periodic, portfolio rebalancer.

Ad Banner Slot