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
How to Use This Calculator
- Enter your Average Requests per Second and Peak Traffic Multiplier (e.g., 3x for traffic spikes).
- Set the Burst Window (seconds) and Safety Margin % to add headroom.
- Enter Max Concurrent Users and Average Requests per User per Minute.
- Review Peak RPS, Rate Limit per Window, and Per-User Rate Limit.
- Use the Throttle Threshold RPS to configure your API gateway or load balancer limits.
How the result changes with Average requests/sec
| Average requests/sec | Peak RPS | Rate limit / window |
|---|---|---|
| 50 | 150 | 10,800 |
| 75 | 225 | 16,200 |
| 150 | 450 | 32,400 |
| 250 | 750 | 54,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
- Identify Input Parameters4 parametersAverage requests/sec = 100, Peak traffic multiplier = 3, Burst window (seconds) = 60, Safety margin % = 20 = 6 input(s) provided
- Calculate Peak RPSPeak RPS = avgRps * peakMultiplier300 = 300
- Calculate Rate limit / windowRate limit / window = ceil(peakRps * burstWindowSec * (1 + safetyMarginPct / 100))21600 = 21600
- Calculate Per-user limit / windowPer-user limit / window = max(1108 = 108
- Calculate Throttle thresholdThrottle 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.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Server Sizing Calculator
Calculate CPU, RAM, storage, and instance count from workload requirements.
DevopsCloud Cost Calculator
Estimate monthly cloud infrastructure costs from compute, storage, and data transfer.
DevopsCI/CD Pipeline Cost Calculator
Calculate total CI/CD cost including platform fees and developer wait time.
More in Technology & Computing.