Spot grid bot profit calculator: profit per grid, fees, price below the range
How the profit of a spot grid is calculated
A spot grid splits the range into n steps and puts a buy order at every level except the top one and a sell order one level higher. When a buy fills and the price rises to the next level, the sell fills and that grid has earned the step. This page counts one such cycle per grid with an equal amount of money in each grid.
price_i = L + i × (U − L) ÷ nLevel i of an arithmetic grid between the lower price L and the upper price U (i = 0 … n). A geometric grid: price_i = L × (U ÷ L)^(i ÷ n), the same step in % everywhere.m = I ÷ nMoney in one grid: the investment I divided by the number of grids n.gross = m × (price_(i+1) ÷ price_i − 1)Profit of one cycle in grid i: the coins bought at price_i, sold at the next level.fees = f × m + f × m × price_(i+1) ÷ price_iThe fee rate f (fee ÷ 100) on the buy and on the sell. Net profit = gross − fees. A cycle is in profit when the step is above 2f ÷ (1 − f).passes = 2 × f × I ÷ net profit of a full passOpening and later closing the whole position costs about 2 × f × I; a full pass is one cycle in every grid.
Worked example
Lower price 80, upper price 120, 4 arithmetic grids (a step of 10), investment $1 000, fee 0.1 % per trade: $250 in each grid.
| Grid | Buy at | Sell at | Step | Gross profit | Fees | Net profit | Net, % of grid money |
|---|---|---|---|---|---|---|---|
| 1 | 80 | 90 | 12.500% | $31.25 | $0.53 | $30.72 | 12.287% |
| 2 | 90 | 100 | 11.111% | $27.78 | $0.53 | $27.25 | 10.900% |
| 3 | 100 | 110 | 10.000% | $25.00 | $0.53 | $24.48 | 9.790% |
| 4 | 110 | 120 | 9.091% | $22.73 | $0.52 | $22.20 | 8.882% |
| Net profit of a full pass | 30.72 + 27.25 + 24.48 + 22.20 = $104.65 (10.46%) |
| Opening and closing the position | 2 × 0.001 × 1 000 = $2.00 |
| Passes to cover them | 2.00 ÷ 104.65 = 0.019 (less than 1 pass) |
| Coins when all grids have bought | 250 × (1 ÷ 80 + 1 ÷ 90 + 1 ÷ 100 + 1 ÷ 110) = 10.6755 |
| Average buy price | 1 000 ÷ 10.6755 = 93.67 |
A full pass earns about a tenth of the investment, but only if the price travels through the whole range. Open the example in the calculator and change the settings.
What happens when the price leaves the range
Below the lower price every buy order has filled and no sell order is reached: the bot holds the coins bought at the levels of the grid. Above the upper price every coin is sold and the bot holds money only.
Q = Σ (m ÷ price_i), i = 0 … n−1; average buy = I ÷ QCoins held and their average price when all grids have bought.value = Q × P; result = Q × P − IThe position at the price P below the range, before fees and before the profit of earlier cycles.
Example (the grid above): Q = 250 × (1 ÷ 80 + 1 ÷ 90 + 1 ÷ 100 + 1 ÷ 110) = 10.6755 coins, average buy 1 000 ÷ 10.6755 = 93.67; at 80 the position is worth 854.04, a result of −14.60 %.
| Below the lower price | Price | Value of the coins | Result vs investment | Rise back to the average buy price |
|---|---|---|---|---|
| at the lower price | 80.00 | $854.04 | −$145.96 | 17.1% |
| −10% | 72.00 | $768.64 | −$231.36 | 30.1% |
| −20% | 64.00 | $683.23 | −$316.77 | 46.4% |
| −30% | 56.00 | $597.83 | −$402.17 | 67.3% |
| −50% | 40.00 | $427.02 | −$572.98 | 134.2% |
The deeper the price falls, the more the position loses, and a coin that goes to zero takes the whole investment. The profit of a few cycles does not offset a long fall.
For a bot that keeps adding to a falling position see the DCA bot calculator, for an averaging grid with leverage the grid bot risk calculator; the names of the settings on exchanges are on the platforms page.
Formulas and worked example
An arithmetic spot grid from 80 to 120 with 20 grids, $1,000 and a 0.1% fee per trade nets $1.15 (2.30%) per buy-and-sell cycle on the lowest grid and $0.75 (1.49%) on the top one, $18.46 (1.85%) for a full pass through the range; if price falls to 80 with every grid bought, the position is worth $819.32 (−18.07%).
Reviewed
Frequently asked questions
How is the profit of a spot grid bot calculated?
Each grid earns the gap between its buy level and the next sell level on the money it holds, minus the fee on both trades. With 20 grids, a $1 000 investment and a step of 1 % the gross profit of one grid is about $0.50 per cycle, before fees.
What is the difference between arithmetic and geometric grids?
An arithmetic grid has the same step in price units, so the step in % is larger at the bottom and smaller at the top. A geometric grid has the same step in %, so every grid earns the same percentage per cycle.
Do the fees matter for a grid?
Yes: a fee is paid on every buy and every sell, so a cycle earns something only if the step is above 2f ÷ (1 − f). With a 0.1 % fee the step must be above about 0.2 %; with many grids in a narrow range it is easy to go below.
What happens if the price falls below the lower limit?
All buy orders have filled, so the bot holds the coins at an average price between the limits, and the position loses value as the price keeps falling. The bot makes no new trades until the price comes back into the range.
Is a spot grid bot safe?
It has no liquidation like a futures bot, but it does not protect the money: in a long fall you hold coins worth less than you invested, and a coin that goes to zero loses the whole investment. Use only money you can afford to lose.
About this calculator
Enter the price range, the number of grids, the grid type, the investment and the fee as a spot grid bot asks for them. The page shows the net profit of one buy-and-sell between neighbouring levels, of a full pass through the range, how many passes cover the fees, and what the position is worth if the price falls below the lower limit.
Share this scenario
Midas runs the same calculation in its panel on the MT5 chart.The Grid tab shows the room to stop-out for your account and settings.