DCA Calculator: Cost Averaging vs Lump Sum
Regular buying against a lump sum, replayed on prices you supply.
Try before you buy.
- Free preview: the average cost per unit in full, with the first rows of each table (up to 3) and a watermarked chart; every other figure is hidden.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
The account over time
Every buy
How this was calculated
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
For education only, not investment advice: no tool here tells you what to buy, sell or hold. Results use only the figures you enter, the files you load (read in your browser, never uploaded) and the published rules each page names. Check them against your broker's or exchange's own figures, and consider a licensed or registered adviser for advice on your situation.
About the DCA Calculator: Cost Averaging vs Lump Sum
Dollar-cost averaging (DCA) means buying the same amount at regular times, whatever the price. This calculator replays it on prices you supply — typed or pasted with their dates, or a price file you export from your own broker, exchange or charting app — and shows what the plan bought: the average cost per unit, the units, the money put in, the value and the gain, the XIRR of every buy, the deepest fall of the account below the money put in, and each buy in a table.
Beside it, the same money invested all at once at the first buy, and value averaging, which buys enough at each date to bring the holding up to a target that rises every time (and sells when the holding is above it). Buy at every price, once a week or once a month, with a fee in percent or a fixed amount per buy, in any currency and for any market: shares, funds, coins or gold.
The replay is a look at the past prices you gave it. It uses no market data, and nothing you type or load leaves your browser.
How to use it
- Type or paste your prices, one a line with its date (2025-01-31, 100), or load a price file — any CSV or Excel file with a date and a close column, or one of the files named on the page — and check the columns it found. No file? Try a sample.
- Enter the amount of each buy and its currency, and choose to buy at every price, every week or every month.
- Add your fee per buy, as a percentage or a fixed amount.
- Keep the lump-sum and value-averaging comparisons, or switch them off; value the holding at the last price or a price you type.
- Read the average cost per unit, the XIRR and the comparisons; copy the summary or download the buys as CSV — with a pass, or after unlocking this result.
Examples
100 a month at 100, 80, 50, 80 and 100, on the first day of five months; no fee
6.5 units for 500 · average cost 76.92 (the prices averaged 82) · worth 650 (+30%) · XIRR 349.97% a year, annualised from four months
500 at 100
5 units · worth 500 (0%)
Targets 100, 200, 300, 400 and 500 at the same five prices
Flows 100, 120, 175, −80 (a sale) and 0 · 315 put in, net · 5 units worth 500
Common uses
- Replay a monthly buying plan on the price history you exported, to see its average cost and XIRR.
- Compare regular buying with investing the same money at once, on the same prices.
- See how much cash value averaging calls for after a fall before you choose it.
- Check how deep below the money put in a regular plan went in a falling market.
The formulas
- Each buy: units = (amount − fee) ÷ price, at every price, at the first price of each week (Monday to Sunday) or at the first price of each calendar month.
- Average cost per unit = money put in ÷ units bought. It is lower than the plain average of the prices whenever they vary, because the same money buys more units when the price is low.
- Value = units × the last price (or the price you type), and the gain = value − money put in.
- XIRR: the yearly rate r at which Σ flow ÷ (1 + r)^(days ÷ 365) = 0, counting each buy as money out and the value as money back on the last date, as Microsoft’s XIRR function defines it.
- Lump sum: all the money of the plan at the first buy’s price (less one fee), valued the same way.
- Value averaging: the target after each buy is the target before × (1 + growth) + the amount, so with no growth it rises by the amount every time; each date buys enough to reach the target, or sells the part above it. The method is Michael E. Edleson’s; Hayley’s paper describes it and its returns.
- Deepest fall: the lowest point of the account’s value against the money put in so far, at every price from the first buy.
Reading the results
- Average cost below the average price is the arithmetic of buying a fixed amount, not a sign the plan will make money: it can still be worth less than you put in.
- XIRR counts when each amount went in; for less than a year it is annualised and can look far larger than the gain itself (it is not shown under 7 days, nor above 1,000,000% a year).
- Lump sum against DCA: with the same money, the lump sum is fully invested from the first day, so it gains more when prices rise and loses more when they fall.
- Value averaging puts in more after falls and takes money out after rises, so its money put in changes from buy to buy; the largest single buy shows how much cash it can call for. Hayley shows that its internal rate of return is biased upwards, so compare the values and the money put in rather than its rate.
- Deepest fall says how far below your money the account went on the way; the price’s own largest fall is what a lump sum went through.
What it leaves out
Taxes, the bid–ask spread and slippage, dividends and splits (use an adjusted close if your file has one), currency changes when you buy in another currency, and the cash you keep aside between buys. A replay on past prices is designed with hindsight: a different period gives a different answer, and none of it says what prices will do. For one-off buys, the stock average calculator works out an average price; the XIRR calculator takes any dated cash flows.
Limitations
- Up to 20,000 prices are replayed; a longer intraday file is first reduced to the last price of each day.
- Buys happen at the prices in your list or file: a weekly or monthly buy uses the first price of that week or month.
- Taxes, spreads, dividends and currency changes are left out.
- It replays the prices you supply and uses no market data: past results do not say what future prices will be.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, DCA Calculator: Cost Averaging vs Lump Sum shows the average cost per unit in full, with the first rows of each table (up to 3) and a watermarked chart; every other figure is hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
How do I work out the average cost of regular buys?
Divide the money you put in by the units you bought. Buying 100 at prices of 100, 80, 50, 80 and 100 buys 1, 1.25, 2, 1.25 and 1 units: 6.5 units for 500, an average cost of 76.92, while the prices themselves averaged 82.
Is regular buying better than a lump sum?
It depends on the prices along the way. A lump sum is invested in full from the first day, so it does better when prices rise and worse when they fall; regular buying spreads the entry over time. The calculator puts both side by side on your own prices, but past prices do not tell which will do better next.
What is value averaging?
Instead of buying a fixed amount, you buy whatever brings the holding up to a target that rises each period, and sell when the holding is above it. With a target rising 100 a buy at prices of 100, 80, 50, 80 and 100, the flows are 100, 120, 175, −80 and 0: 315 put in, net, for 5 units worth 500.
Why is the XIRR so high for a few months?
XIRR is a yearly rate: a 30% gain over four months, compounded over a year, is about 350% a year. It is shown with that warning under a year, not at all under 7 days, and called not meaningful above 1,000,000% a year.
Which files can I load?
Any CSV or Excel file with a header row and a date and a price column: you choose the columns, the decimal mark and the date order, and the first rows show as they will be read. MetaTrader 5 bars exports and MetaTrader 4 History Center exports are recognised by themselves. Nothing is uploaded: the file is read in your browser.
Does it work in my currency and market?
Yes. Choose the currency of your amounts; the prices in your file must be in the same currency. Numbers and dates are read the way your country writes them, and you can change the decimal mark and the date order for a file.