What the DCA calculator does
Dollar-cost averaging (DCA) means buying the same asset several times at different prices instead of all at once. After a few buys the questions are always the same: what is my average entry price, how much do I hold, and at what price do I break even once fees are counted? The calculator answers all three for crypto or stocks, and keeps the numbers right when you sell part of the position along the way.
How to use it
- Choose whether you type each trade's size as a quantity (coins, shares) or as an amount (price × quantity: the trade's value before fees).
- Enter each buy with its price and size. Use Add buy and Add sell for more lines; a sell line records a partial exit.
- Enter the fee per trade as a percentage of the trade's value — 0.1% is common on spot crypto exchanges, and many stock brokers charge nothing.
- Optionally enter the current price to see the position's value and what you would make or lose by selling everything now.
Lines are processed from top to bottom, so a sell only counts against what you held at that point. Switching between quantity and amount converts the existing lines for you.
The formula
buy: quantity += q
cost basis += price × q × (1 + fee)
sell: realized P&L += q × (price − average) − price × q × fee
cost basis −= average × q (the average is unchanged)
average entry = cost basis ÷ quantity
break-even price = cost basis ÷ (quantity × (1 − fee))
break-even incl. realized = (cost basis − realized P&L) ÷ (quantity × (1 − fee))
This is the average-cost method: a partial sell removes units at the average cost, so the average of what remains does not change. The break-even price includes the fee you will pay when you sell.
Worked example
Three Bitcoin buys with a 0.1% fee:
| Trade | Price | Quantity | Value | Fee |
|---|---|---|---|---|
| Buy | 100,000 | 0.05 | 5,000 | 5.00 |
| Buy | 90,000 | 0.05 | 4,500 | 4.50 |
| Buy | 80,000 | 0.10 | 8,000 | 8.00 |
You hold 0.2 BTC for a cost basis of 17,517.50. The average entry is 17,517.50 ÷ 0.2 = 87,587.50 (87,500 before fees), and the break-even price after the exit fee is 17,517.50 ÷ (0.2 × 0.999) = 87,675.18. At 88,000, selling everything would net +64.90.
Now sell 0.05 BTC at 95,000. The realized profit is 0.05 × (95,000 − 87,587.50) − 4.75 = +365.88. You keep 0.15 BTC at the same 87,587.50 average, but because that profit is banked, the price at which the whole series breaks even falls to 85,233.57.
Fixed amounts versus fixed quantities
Buying a fixed amount each time automatically buys more units when the price is low. $500 of a stock at 50, 40 and 25 buys 10, 12.5 and 20 shares: 42.5 shares for $1,500, an average of $35.29. Buying 10 shares each time costs $1,150 for 30 shares, an average of $38.33 — the simple mean of the three prices. That difference is the mechanical benefit of DCA; it does not make a falling asset rise.
What DCA does and does not do
Spreading buys over time reduces the risk of putting everything in at a single bad price, and it makes a plan easy to follow. It does not change the asset's expected return, and in a market that rises steadily a lump sum invested on day one ends up ahead. The average price is a record of what you paid, not a target: the market does not know it, and a break-even far above the current price is a reason to review the position, not a level the price owes you.
Common mistakes
- Averaging the prices instead of the trades. The average entry is weighted by size: a large buy moves it more than a small one.
- Leaving fees out. On frequent small buys, fees can add several tenths of a percent to the break-even price.
- Treating averaging down as risk management. Adding to a losing position increases exposure. Decide in advance how much the whole position may lose; the crypto position calculator helps size it.
- Expecting your platform to show the same average. Exchanges and brokers use different methods (average cost, FIFO), may take fees in another coin, and tax rules in your country may require a specific method.