DCA Calculator

Backtest dollar-cost averaging into any of eight major coins with daily CoinGecko history, and compare it with a lump-sum purchase.

Your purchases are simulated locally in your browser. Price history is fetched from CoinGecko's public API, and that request includes only the coin id — no personal data.

Buy frequency
Lookback period
Total invested
—
Final value
—
DCA return
—
Average buy price
—
Last price
—
Number of buys
—
Lump-sum at start: —
DCA vs lump-sum: —
Price history and buy points

Historical simulations are not investment advice; past prices do not predict future results.

How It Works

Dollar-cost averaging means committing a fixed amount of money on a fixed schedule no matter what the price does. Each purchase buys amount ÷ price tokens, so a cheap day adds more units and an expensive day adds fewer, and your average cost per token ends up below the simple average of the prices you paid. This tool replays that strategy over real history and shows what it would have produced.

The DCA math
Every buy spends the same USD amount and receives units = amount ÷ that day's price. Total invested = amount × number of buys. Final value = total units × the last price in the series. Return % = final value ÷ invested − 1, and the average buy price is total invested ÷ total units (a harmonic-style mean of the sampled prices).
Where the prices come from
Pressing Compute fetches the daily UTC closing-price history for the selected coin from CoinGecko's public market_chart API. The simulator then samples that daily series at your frequency: daily uses every candle, weekly takes every seventh candle, and monthly jumps to the same day-of-month in each following month (or the first later candle when that day is missing). The first candle of the range is always your first buy.
DCA vs lump-sum
The comparison row shows the same total capital spent as a single purchase on the first day of the window. In a steadily trending-up market lump-sum usually wins, because all the money rides the entire climb while DCA's later buys miss the early gains. DCA tends to win in choppy or falling-then-recovering markets, where the cheap candles it keeps buying accumulate extra units. The difference is shown honestly in points.
What is not modeled
Trading fees, spread, slippage, partial fills and taxes are all ignored, and intraday timing is approximated by daily closes. All amounts are in USD. Real executions will always land a little away from these numbers.

Frequently Asked Questions

Where does the price data come from?

Every run pulls the daily UTC price history for your chosen coin from CoinGecko's public API (the /coins/{id}/market_chart endpoint). Your coin, amount and frequency choices are used only to build the request URL and to do the math in your browser — your inputs and results are never sent anywhere.

Why did I get a rate-limited message?

CoinGecko's free public API allows only a limited number of requests per minute per IP address. If several people on the same network press Compute at once, the ceiling can be hit. Just wait a minute and try again — nothing was stored or charged.

Can I run the simulation in another currency?

Not yet. Amounts and prices are in USD only for now, matching CoinGecko's US-dollar price feed. You can still switch between the eight supported coins in the dropdown.

Why do my numbers on an exchange differ from this simulation?

Real purchases happen intraday at whatever price the market prints, and every fill carries trading fees, spread and slippage. This simulator buys at the sampled daily closing price with zero fees, so small differences are expected — treat the simulated result as a pre-cost baseline, not a receipt.

Is this investment advice?

No. This is a historical backtest over past prices, and past behavior does not predict future results. DCA smooths your entry price but cannot protect you from an asset that keeps falling. Do your own research before investing.