Skip to main content
Calcimator

API Rate Limit Calculator

Calculate optimal rate limit settings from expected traffic, peak multipliers, and SLA requirements.

About this calculator

This calculator translates expected API traffic into concrete rate-limit settings for a gateway, load balancer, or application middleware. It starts by scaling your average requests-per-second by a peak multiplier to model traffic spikes (flash sales, cron jobs, retries), then sizes the rate-limit window itself: it multiplies peak RPS by the burst window length and layers on your safety-margin percentage, rounding up so the limit never falls short of what a legitimate burst actually needs. That per-window ceiling is then divided across your expected concurrent users (weighted by each user's typical request rate) to produce a fair per-user limit, guaranteeing no single user can consume the whole budget.

The throttle threshold is simply that window limit converted back to a steady RPS figure — the rate at which your gateway should start returning 429s. The estimated throttled percentage is a stress-test figure: it assumes traffic reaches 1.5x your calculated peak and reports how much of that overage would get rejected, which is useful for deciding whether your safety margin is generous enough. Two things to keep in mind: this model treats burst capacity as a simple token-bucket-style window, not a sliding log or leaky bucket, so real gateway behavior may differ slightly; and the per-user split assumes even distribution — a single abusive client can still exhaust the shared window faster than the fair-share math suggests, so pair this with per-IP or per-key limits in production.

Inputs

%

Results

Peak RPS

300

Rate limit / window

21,600

Per-user limit / window108
Throttle threshold (RPS)360
Daily requests (avg)8,640,000
Daily requests (peak)25,920,000
Est. throttled % at 1.5x peak20
How to Use This Calculator
  1. Enter your Average Requests per Second and Peak Traffic Multiplier (e.g., 3x for traffic spikes).
  2. Set the Burst Window (seconds) and Safety Margin % to add headroom.
  3. Enter Max Concurrent Users and Average Requests per User per Minute.
  4. Review Peak RPS, Rate Limit per Window, and Per-User Rate Limit.
  5. Use the Throttle Threshold RPS to configure your API gateway or load balancer limits.

How the result changes with Average requests/sec

Average requests/secPeak RPSRate limit / window
5015010,800
7522516,200
15045032,400
25075054,000

What each input means

Average requests/sec
Average sustained requests per second during normal traffic.
Peak traffic multiplier
How many times average traffic your peaks reach (e.g., 3x = flash sale).
Burst window (seconds)
Time window for rate limit counting (token bucket refill period).
Safety margin %
Extra headroom above peak to avoid false throttling.
Max concurrent users
Expected maximum simultaneous users hitting the API.
Avg requests per user/min
Typical number of API calls a single user makes per minute.

What each result means

Peak RPS
Expected peak requests per second.
Rate limit / window
Maximum requests allowed in each burst window.
Per-user limit / window
Fair-share rate limit per individual user in each window.
Throttle threshold (RPS)
Requests per second at which 429 responses begin.
Daily requests (avg)
Total requests per day at average load.
Daily requests (peak)
Total requests per day if peak load were sustained all day.
Est. throttled % at 1.5x peak
Percentage of requests that would be rejected at 150% of peak traffic.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Average requests/sec = 100, Peak traffic multiplier = 3, Burst window (seconds) = 60, Safety margin % = 20 = 6 input(s) provided
  2. Calculate Peak RPS
    Peak RPS = avgRps * peakMultiplier
    300 = 300
  3. Calculate Rate limit / window
    Rate limit / window = ceil(peakRps * burstWindowSec * (1 + safetyMarginPct / 100))
    21600 = 21600
  4. Calculate Per-user limit / window
    Per-user limit / window = max(1
    108 = 108
  5. Calculate Throttle threshold
    Throttle threshold = round(rateLimitPerWindow / burstWindowSec)
    360 = 360

Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why does the per-user rate limit divide the window limit by max concurrent users instead of by total registered users?

The calculator assumes the rate-limit window only needs to absorb the users who are actually active at once, not your whole user base, so it divides the per-window ceiling by Max Concurrent Users and then scales that fair share by each user's typical requests-per-minute. If you set Max Concurrent Users lower than what actually shows up, the resulting per-user limit will be looser than intended, since the shared budget gets split among fewer imagined users.

What's the difference between the Rate limit / window and the Throttle threshold (RPS) outputs?

Rate limit / window is the raw count of requests allowed inside one burst window — for example, a limit of 18,000 requests in a 60-second window. Throttle threshold (RPS) just converts that same number back into a steady per-second rate (300 RPS in this example) so it's easier to compare against your average and peak RPS figures or plug into gateway configs that expect a rate rather than a window count.

Why would my safety margin percentage need to be higher than 20%?

The safety margin is applied multiplicatively to peak RPS before the window limit is computed, so it exists purely to absorb burstiness the peak multiplier doesn't capture — short spikes above your modeled peak, clock-skew between distributed rate-limit counters, or retries piling up during a partial outage. If your traffic pattern is spiky rather than smoothly distributed across the burst window, a 20% margin is often too thin and pushes real users into 429s even though average and peak RPS look fine.

Does the estimated throttled percentage mean my API will actually reject that share of requests?

No — it's a stress-test figure, not a live measurement. It assumes traffic hits exactly 1.5x your calculated peak RPS and reports what fraction of that hypothetical overage would exceed the throttle threshold; it says nothing about how often real traffic actually reaches 1.5x peak. Use it to judge whether your safety margin gives you comfortable headroom, not as a forecast of actual 429 volume.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Technology & Computing.