Home › Free tools › DCA Calculator

FREE TOOLFREENO ACCOUNTAUTOMATED TRADE BOTSDCA CalculatorFree calculator, runs in your browserEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on dca calculator. Education only, with example numbers labelled.
FREE TOOL

DCA Calculator

Short answer

Dollar cost averaging (DCA) means buying a fixed dollar amount again and again, whatever the price.

Enter the amount you buy each time and the price at each buy. See your average cost, what the units are worth at the last price, and how one big buy would have compared.

Type your own numbers and the answer updates as you go. The formula is written out below so you can check it by hand, and every example on the page is made up and labelled.

  • Free, no account, runs in your browser
  • A worked example with exact numbers
  • Shows where grid, martingale and DCA bots break the maths
  • Example numbers are made up and labelled

Last reviewed 28 October 2026. Education only, not advice.

Go to the calculator
Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Your numbers

What it says

Ready to go further

Next: how a DCA bot behaves when price keeps falling

The calculator treats the prices as given. A bot decides its buys from the price, which changes the risk.

Read the DCA bot guideFree, no account
Inputs2 numbers
ResultInstant, in your browser
CostFree, no account
Reviewed28 Oct 2026

What is included

  • The calculator, with your own numbers
  • The formula written out
  • A worked example you can reproduce
  • Where grid, martingale and DCA bots break the maths

Who it is for

  • People running or testing a trading bot
  • Anyone sizing a position or checking costs
  • Readers learning how the numbers work
  • Not advice, and not for placing trades

Key facts

  • Dollar cost averaging (DCA) means buying a fixed dollar amount again and again, whatever the price.
  • A fixed amount buys more units when price is low and fewer when it is high, so the average cost is the harmonic mean of the prices, never above the simple average.
  • DCA does not remove the risk of a falling asset. A fall means you bought more units on the way down.
  • DCA investing usually adds fresh money on a schedule. A DCA bot often adds only when price falls, which is a different rule with more exposure.
  • All price series on this page are made up. The calculator cannot tell you where price goes next.
Five equal $100 buys against the average cost (example)$80$100$120Buy 1Buy 2Buy 3Buy 4Buy 5Average cost $93.93$80$110$500 buys 5.3228 units. At $110 they are worth $585.51. A made-up price series.
The picture for this page. Example numbers are made up unless the page says they were calculated.

How the calculator works

Each buy spends the same dollar amount, so it buys amount / price units. Add the units up, divide the total spent by the total units, and you have the average cost.

Units at one buy = amount / price
Total units = sum of (amount / price) over all buys
Average cost = total spent / total units = n / (1/p1 + 1/p2 + ... + 1/pn)
Value = total units x last price

The last form is the harmonic mean of the prices. It is always at or below the simple average, because low prices get more units and so carry more weight. Order does not matter: the same five prices in reverse give the same average cost.

A worked example

Take five made-up buys of $100 at prices of $100, $90, $80, $95 and $110. They buy 1.0000, 1.1111, 1.2500, 1.0526 and 0.9091 units, a total of 5.3228 units for $500. The average cost is 500 / 5.3228 = $93.93, below the simple average of $95.00. At the last price of $110 the units are worth $585.51, a gain of $85.51 or 17.1 percent. One $500 buy at the first price of $100 would be 5 units, worth $550 at $110, a gain of 10.0 percent. In this series the repeated buys finished ahead.

The same maths in a falling market

Now take prices of $100, $90, $80, $70 and $60, still $100 a time. The average cost is $77.44, and at $60 the 6.4563 units are worth $387.38. That is a loss of $112.62 or 22.5 percent. One $500 buy at $100 would have lost 40.0 percent. The repeated buys lost less, but both lost. And the more it fell, the more units were bought and the more was spent on the way down.

The same five prices in rising order, $60 to $100, give the same average cost of $77.44. Here the repeated buys gain 29.1 percent, while one $500 buy at $60 would gain 66.7 percent. Which approach finishes ahead depends entirely on the path that happens.

The falling series: gain or loss on $500 (made-up prices)-22.5%Five equal buys$100 each, $100 to $60-40.0%One buy$500 at $100Price falls from $100 to $60. Average cost of the five buys is $77.44. A made-up series.
Repeated buying loses less than one buy at the top, and still loses. DCA changes the average cost, not the direction.

DCA investing is not the same as a DCA bot

The word DCA covers two quite different things, and the calculator above is neutral about both.

  • Scheduled buying. The same amount goes in on a calendar, whatever the price. The total spent is known in advance, and a falling asset does not make the plan buy more dollars.
  • A DCA bot. Many bots add to a position only after price falls by a set amount, often with larger orders at lower levels. The total spent depends on how far price falls, so the exposure grows exactly when the position is losing. That is the averaging down arithmetic, and with growing order sizes it becomes a martingale ladder.
  • Costs. Each buy pays a fee and spread, so many small buys pay more in total than a few large ones. Add them to the price you enter.

The DCA bot guide covers how the bot version works, what it needs to be safe, and how it fails.

A lower average cost does not mean a profit. If the last price is below the average cost, the position is at a loss however many buys were made.

FAQ

Frequently Asked Questions

Is average cost the simple average of the prices?

No. With equal dollar amounts it is the harmonic mean, which is always at or below the simple average. In the first example the simple average is $95.00 and the average cost is $93.93.

Does DCA beat one big buy?

Not as a rule. In a falling series it loses less, in a rising series it gains less. Either way the result depends on the path, which nobody knows in advance.

Why do prices at the first and last position matter?

The comparison uses the first price for the single buy and the last price to value everything. Change either end of the list and the answer can reverse.

Can I use buys of different sizes?

Not in this version: it assumes the same dollar amount each time. To model larger buys at lower prices, use the average down calculator.

What goes wrong with a DCA bot in a long fall?

It keeps buying and the total spent keeps rising, so exposure grows as the position loses. The question is whether the account and margin can hold the largest position the bot can reach.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is a calculator and general education. It does not consider your situation, and its output is only as good as the numbers you enter.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss