How to use the DCA calculator
- Enter the amount invested per period, for example 100, and choose weekly or monthly.
- Choose how prices are given: Enter prices or Expected return (both are explained below).
- Optionally enter a current price. If you leave it empty, your units are valued at the last purchase price.
- Press Calculate. The result shows total invested, total units, average cost per unit, current value and your gain or loss in money and percent. The purchase schedule below lists every period.
- Enter prices: type or paste the price at each purchase, oldest first. Put one price per line, or all prices on one line separated by commas. A column copied from a spreadsheet works too.
- Expected return: enter a starting price, an expected annual return and the number of purchases. The calculator builds a smoothly growing (or falling) price for each period.
How dollar-cost averaging works
With dollar-cost averaging you invest the same amount at regular intervals, whatever the price. When the price is low your fixed amount buys more units; when it is high it buys fewer. The method is:
- Units bought in a period = Amount ÷ Price in that period
- Average cost per unit = Total invested ÷ Total units
- Current value = Total units × Current price
- Gain or loss = Current value − Total invested
Because more units are bought at low prices, the average cost is the harmonic mean of the prices, which is never higher than their simple average.
In expected return mode the price of purchase number k is Starting price × (1 + annual return)^((k − 1) ÷ periods per year), with 12 periods per year for monthly and 52 for weekly.
Worked example
You invest 100 a month for five months at prices of 10, 8, 5, 8 and 10. You buy 10, 12.5, 20, 12.5 and 10 units, a total of 65 units for 500. Your average cost is 500 ÷ 65 ≈ 7.69 per unit, even though the simple average price was 8.20. At the final price of 10 the units are worth 650, a gain of 150 or 30%. Putting all 500 in at the first price of 10 would have bought only 50 units, worth 500 at the end.
Good to know
- Money amounts are rounded to cents; units are shown to six decimal places. Small prices below 1 are shown with more decimals.
- The calculator ignores fees, spreads, dividends and taxes, which all change real results.
- Up to 1,000 purchases can be entered, which covers about 19 years of weekly or 83 years of monthly investing.
- Results are estimates for planning and learning. They are not financial advice, and past or expected returns do not guarantee future results.