Grid bot profit calculator

Last updated September 24, 2026 · by Mustafa Bilgic

Enter a price range and a number of grids to see how much each completed grid trade keeps after fees. Then run the same grid on real Bybit spot candles to see grid profit, floating P&L, grid APR and drawdown next to buy and hold.

1. Profit per grid

-
Profit per grid after fees
-
Grid gap
-
Gap needed to beat fees

2. Backtest on real Bybit candles

-
Total P&L
-
Grid profit (realized)
-
Floating P&L
-
Grid APR
-
Buy and hold
-
Max drawdown

Close priceGrid levelsBuy fillSell fill
Grid bot equityBuy and hold

Profit per grid, after fees

A spot grid bot splits a price range into levels, buys at one level and sells one level higher. A geometric grid spaces the levels by an equal ratio, so every grid is the same percentage wide. An arithmetic grid uses an equal dollar step, so its lowest grids are the widest in percentage terms and earn the most per trade.

grid mathgeometric ratio  r = (upper ÷ lower) ^ (1 ÷ grids)
arithmetic step  d = (upper − lower) ÷ grids
profit per grid    = (1 − fee)² × sell price ÷ buy price − 1
fee break-even     = 1 ÷ (1 − fee)² − 1   # 0.2003% at 0.1% per side

The profit line follows Bybit's published grid formula, sell quantity × sell price × (1 − fee) − buy quantity × buy price, where the sell quantity is the buy quantity less the fee Bybit takes in coins. At a 0.1% fee on each side, a grid narrower than about 0.2% loses money on every completed trade. More grids mean more trades but a thinner cut each time, so judge a setting by total grid profit in the backtest, not by profit per grid alone.

How the backtest runs on real candles

At the first candle's open, the bot places a buy order at every level below the price. For each grid above the price it buys coins at market and lists them one level higher, the way Bybit's spot grid buys the base token it needs when a strategy starts. Each grid then alternates: a filled buy becomes a sell one level up, and a filled sell becomes a buy one level down.

A candle only has four prices, so the engine assumes a path: a green candle moves open, low, high, close and a red candle open, high, low, close. A limit order fills at its own price only when the candle trades through the level, because a touch is not a fill. Finer candles leave less to that assumption, so use 5-minute to 1-hour data for narrow grids.

The results use Bybit's definitions. Grid profit is realized profit from sell fills. Total P&L is the value of coins and USDT at the last close minus the investment, and floating P&L is the difference between the two. Grid APR is grid profit divided by the investment, divided by the days in the test, times 365. Max drawdown uses the equity at every candle close, and the Sharpe ratio uses end-of-day equity annualized with the square root of 365.

When grids work, and where this test stops

A grid earns while price swings back and forth inside the range. If price breaks out above the top, the bot sells everything on the way up and then sits in USDT while buy and hold keeps climbing. If price falls through the bottom, the bot has bought at every level, and the floating loss can erase months of grid profit. Run a sideways window and a trending one on the same pair to see both cases.

The test skips order minimums and rounding, partial fills, queue position, trailing grids, stop-loss or take-profit triggers and taxes. Each grid trades the same coin quantity, and the coins for the upper grids cost the start price plus slippage. Prices are real Bybit spot candles fetched with ccxt, and past performance does not predict future results. For background, read how a grid trading bot harvests a range and how grid bots actually work, then check the cost side in maker vs taker fees for trading bots.

Educational, not financial advice. This calculator replays real Bybit price history for learning only. Past performance does not predict future results, and crypto trading can lose money quickly. Never trade money you cannot afford to lose. Review the SEC investor.gov and CFTC resources before trading.

Frequently asked questions

What is a good profit per grid?

One that clears the round-trip fee with room to spare. At 0.1% per side the break-even gap is about 0.20%, and spreads and slippage come on top of that. Wider grids keep more per trade but fill less often, so compare total grid profit across a few settings in the backtest instead of chasing the highest profit per grid.

Should I use an arithmetic or a geometric grid?

Geometric grids keep every grid the same percentage wide, which suits wide ranges and volatile coins. Arithmetic grids use the same dollar step, so the grids near the bottom earn more per trade than the ones near the top. On a narrow range the two give almost the same levels.

Why is total P&L negative when grid profit is positive?

Grid profit counts only closed trades. If price falls below your buy levels, the bot holds coins bought on the way down, and their floating loss counts against total P&L. Bybit defines total profit the same way: the value of the base and quote tokens minus the total investment.

How accurate is a grid backtest on candles?

It is an approximation. Inside a candle the engine has to assume whether the high or the low came first, and it fills a limit order only when price trades through it. It does not model partial fills, order book depth or queue priority. Smaller candles reduce the guesswork, and live results will still differ from any backtest.

MB

Mustafa Bilgic

Algorithmic trading practitioner · Founder, AITradingBot.us

Mustafa builds and backtests automated trading systems and writes about them without the hype. Every tool on this site is free and runs entirely in your browser.