Edgoro
Crypto · Free tool

Grid Trading Calculator

Plan a spot grid bot: price lines, coin per grid, profit per completed grid after fees, and what you hold if price leaves the range.

Spacing

A grid is the gap between two lines, so 20 grids use 21 price lines. Each grid buys and sells the same amount of the coin.

Net profit per completed grid
0.52%–0.63%
Profit per completed grid$2.83 – $2.98
Gap between lines500.00
Smallest gap that covers fees0.200%
Coin per grid0.007859
Coin bought at the start0.078585 (10 sell orders)
Buy orders below the price10

If price leaves the range (no grid completed)

Ends at the lower price, 60,000.00-$579.74
Holding the coin instead-$769.23
Ends at the upper price, 70,000.00+$205.68
Holding the coin instead+$769.23
Completed grids to make up the drop199

A completed grid is one buy filled and the matching sell filled one line higher. Fees are charged on both fills. Slippage, funding and the spread are not included, and nothing here predicts how often price will cross your lines.

Price lines, from the top

LinePriceOrder at the startNet profit when the grid above completes
2170,000.00Sell—
2069,500.00Sell+$2.83
1969,000.00Sell+$2.84
1868,500.00Sell+$2.85
1768,000.00Sell+$2.86
1667,500.00Sell+$2.86
1567,000.00Sell+$2.87
1466,500.00Sell+$2.88
1366,000.00Sell+$2.89
1265,500.00Sell+$2.90
1165,000.00None+$2.90
1064,500.00Buy+$2.91
964,000.00Buy+$2.92
863,500.00Buy+$2.93
763,000.00Buy+$2.94
662,500.00Buy+$2.94
562,000.00Buy+$2.95
461,500.00Buy+$2.96
361,000.00Buy+$2.97
260,500.00Buy+$2.97
160,000.00Buy+$2.98

Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

What the grid trading calculator shows

A grid bot places buy orders on price lines below the market and sell orders on the lines above. Each time price falls to a line and rises back to the next one, a buy and a sell fill and the bot pockets the gap between them, minus two fees. That's a completed grid.

The calculator lays out the lines for your range, the amount of coin each grid trades, and the net profit of one completed grid after fees. It also shows the part grid bot screens tend to leave out: what you're left with if price walks out of the range, compared with simply holding the coin.

How to use it

  1. Enter the lower and upper price of the range, and the price now.
  2. Enter the number of grids. A grid is the gap between two lines, so 20 grids use 21 lines.
  3. Choose the spacing. Arithmetic keeps the same price gap between lines; geometric keeps the same percentage gap.
  4. Enter the investment in the quote currency and the fee per fill. 0.1% is the standard spot fee for a regular account on Binance, for example; check your own exchange and tier.

The model and the formulas

Every grid trades the same amount of coin, q. Grids above the price now start with the coin (bought at market when the bot starts) and a sell order one line up. Grids below start with cash and a buy order on their lower line. The grid that contains the price starts with a buy order.

arithmetic lines   p_k = lower + k × (upper − lower) ÷ grids
geometric lines    p_k = lower × (upper ÷ lower)^(k ÷ grids)

coin per grid      q = investment ÷ (sell grids × price now + sum of the buy lines)
completed grid     q × (p_k+1 − p_k) − fee × q × (p_k + p_k+1)
fee break-even     gap > (1 + fee) ÷ (1 − fee) − 1        (about 2 × fee)

In an arithmetic grid the gap in dollars is fixed, so the percentage profit is largest on the lowest grid. In a geometric grid the percentage is the same on every grid.

Worked example

A Bitcoin grid from 60,000 to 70,000 with 20 arithmetic grids, $10,000, a 0.1% fee per fill, started at 65,000:

  • Lines every $500: 10 sell orders above the price and 10 buy orders below.
  • Each grid trades 0.00786 BTC; the bot buys 0.0786 BTC at the start to stock the sell orders.
  • A completed grid nets $2.83 to $2.98, which is 0.52% to 0.63% of the money in that grid.
  • If price falls straight to 60,000, every buy fills and the position is worth $579.74 less than you put in. Holding BTC from 65,000 would be down $769.23.
  • If price rises straight to 70,000, every sell fills: +$205.68, against +$769.23 for holding.
  • Making up the loss at the lower bound takes about 199 completed grids.

So a grid loses less than holding on the way down and earns much less on the way up. It makes money from back-and-forth movement inside the range, and every completed grid is small.

More grids is not always better

Same range, investment and fee, with a different number of arithmetic grids:

GridsNet per completed gridResult at the lower boundCompleted grids to make it up
101.25% to 1.47%−$561.1841
200.52% to 0.63%−$579.74199
500.09% to 0.13%−$590.85about 2,690
100−0.06% to −0.03%−$594.54never

More lines fill more often, but each fill earns less. At 100 grids the $100 gap is 0.14% to 0.17% of the price, less than the 0.2% two fees cost, so every completed grid loses money. The calculator warns you when that happens.

What the calculator can't tell you

How often price crosses your lines decides whether a grid pays, and that depends on the market, not on the settings. We tested this on real data in a Bitcoin grid bot backtest, month by month. A grid in a falling market is a way of buying all the way down; if you'd be unhappy holding the coin at the lower price, the range is too wide or the coin is wrong.

To write your own grid bot in Python, start with a Python crypto trading bot with ccxt. For the cost side of frequent small trades, see the trading fee calculator.

Frequently asked questions

How is profit per grid calculated?

One completed grid buys a quantity q at one line and sells it at the next line up. It nets q × (upper line − lower line) minus the fee on both fills, fee × q × (lower line + upper line). As a percentage that is roughly the gap between lines minus two fees.

Arithmetic or geometric grid: which is better?

Neither earns more in general. An arithmetic grid keeps the same price gap, so its percentage profit is higher on the low grids and lower on the high ones. A geometric grid keeps the same percentage gap, which suits wide ranges where prices differ a lot from bottom to top.

How many grids should I use?

Enough for price to cross lines often, but with a gap well above two fees. With a 0.1% fee per fill, a gap under 0.2% loses money on every completed grid. The calculator shows the smallest gap that covers fees and warns when your grids are narrower.

What happens when price leaves the grid range?

Below the range every buy order has filled and the bot holds the coin, with an unrealized loss. Above the range every sell has filled and it holds cash, having missed the rest of the rise. Most bots stop trading until price comes back, unless you set a stop.

Is grid trading profitable?

A grid profits from price going back and forth inside the range and loses when price trends out of it. Whether it pays depends on the market more than on the settings, so backtest it on real data with fees before running it with money.

Related guides

All guides
All free tools

Let AI build the indicator behind your numbers.

Turn the rules you just calculated into a TradingView indicator, an MT5 bot or a crypto bot. Instant access, with a 7-day money-back guarantee.