How Many Grids to Use:
The Optimal Formula
for Your Bot

The number of grids is the most critical technical decision in your setup. Too many, and fees eat your profits. Too few, and performance drags. This guide gives you the exact formula and calculator to find the perfect number.

What Determines the Number of Grids?

Each grid is a price level within your bot's range where a buy and sell order is placed. If you set 20 grids in a $55,000 to $65,000 range, the bot divides that range into 20 equal intervals and places an order at each one.

The grid count dictates three things simultaneously: your profit per trade, your trading frequency, and the capital required per level. These three factors are in direct tension with each other.

The Formula for the Optimal Grid Count

Base Formula — Number of Grids

Range Amplitude (%) ÷ Target Profit per Grid (%) = Number of Grids
Example: 20% range ÷ 1% target profit = 20 grids
The target profit per grid must be at least 3× the exchange fee (0.1% total) → minimum 0.3% per grid

The range amplitude is calculated as: ((max_price - min_price) / min_price) × 100

The minimum viable profit per grid must easily cover your trading fees. With Pionex's ultra-low 0.05% fee per trade (0.1% total for a full buy+sell cycle), your profit per grid should be at least 0.3% to be genuinely profitable after fees.

Optimal Grid Calculator

🧮 Optimal Grid Calculator

Range Amplitude
Recommended Grids
Capital per Grid
Profit per Grid

What Happens If You Use Too Many or Too Few Grids?

↑ Too Many Grids
  • More daily trades → higher trading fees
  • Profit per trade drops below the profitable threshold
  • Capital per grid gets too small → minimum order limits fail
  • The bot might operate at a net loss despite market swings
  • Market spread can consume the entire profit margin
↓ Too Few Grids
  • Very few trades → underutilized capital
  • Price oscillates without completing full cycles
  • Most of your capital sits idle in unexecuted orders
  • It can take weeks to see visible yield
  • Each trade is highly profitable, but they rarely trigger

Practical Examples & Configurations

Scenario Range Grids Capital Profit/Grid Capital/Grid Rating
Conservative BTC55K–65K (18%)18500 USDT~1.0%~27 USDT✓ Optimal
Aggressive BTC55K–65K (18%)60500 USDT~0.3%~8 USDT✗ Fees > Profit
Balanced ETH2.800–3.400 (21%)25300 USDT~0.85%~12 USDT✓ Optimal
Volatile Altcoin±30% amplitude30200 USDT~1.0%~6 USDT⚠ Min. Capital limit
Ultra-tight Range±5% amplitude20500 USDT~0.25%~25 USDT✗ Insufficient profit
The Golden Rule of Thumb

Always calculate your profit per grid first. If it's below 0.3%, the bot won't be profitable after Pionex fees. If it exceeds 0.3%, the grid count is acceptable. If it exceeds 0.5%, it's good. If it's over 1.0%, your configuration is excellent.

💡
Pionex AI Does This Math For You

If you prefer not to calculate manually, Pionex's "AI Strategy" mode analyzes the past 7 days of price action and automatically determines the optimal grid count for your selected pair. It's a fantastic starting point for your first bot — you can always tweak it manually later using this formula.

Test the calculator on your next bot

Once you have found your optimal grid number, launch it on Pionex for free.

Create Your Free Pionex Account * Affiliate link · Trade responsibly