API Rate Limit, Token Bucket & Backoff Calculator

Interactive API Rate Limit, Token Bucket & Backoff Calculator

RFC 6585 · HTTP 429
SCENARIO PRESETS:
?Requests per minute the provider allows for your key. Read it from the provider's rate-limit documentation or the rate-limit response headers. Range: 10 to 60,000 RPM, step 10.
?Largest number of requests the token bucket holds at once (the burst allowance). Read it from the provider's documentation, or use the size of your own client-side bucket. Range: 1 to 5,000.
?Requests that arrive together during a traffic spike. Read it from access logs or queue depth at the busiest minute. Range: 10 to 50,000, step 10.
?Delay T0 in milliseconds before the first retry; each later retry waits twice as long as the one before (T0, 2 T0, 4 T0 and so on). Read it from your client's retry settings. Range: 50 to 5,000 ms, step 50.
?Maximum number of retries k before the request is reported as failed. Read it from your client's retry settings. Range: 1 to 10.
TOKEN BUCKET REFILL & SAFE RATE
Refill = 10 req/s · Safe rate = 8.50 req/s (85 % planning margin) · Whole safe requests per second = 8
SPIKE QUEUE DRAIN DURATION
35 s to drain the spike
MAX WAIT (NO CAP; AWS full jitter uses min(cap, base × 2^attempt))
15.5 s cumulative max retry window
EXPECTED TOTAL WAIT OVER THE RETRIES (FULL JITTER)
7.75 s expected total wait over 5 retries · 1.55 s mean per retry
RETRY WINDOW VS DRAIN TIME
Retries run out before the queue drains: a 15.5 s window against a 35 s drain, so some requests fail (all requests above the bucket assumed to retry together)
CALC32 · API Rate Limit, Token Bucket…15.57.751035
Computed in your browser

Use the API Rate Limit, Token Bucket & Backoff Calculator to evaluate r_refill = RPM / 60 | T_drain = (N_spike − B_cap) / r_refill | t_k = T_0 · 2^(k−1) for Stripe/Shopify/OpenAI API client rate limiters, webhook ingestion gateways. With the defaults (Provider Quota Limit = 600, Token Bucket Burst Capacity = 100 Reqs, Incoming Traffic Spike = 450 Requests) it returns Token bucket refill & safe rate: Refill = 10 req/s · Safe rate = 8.50 req/s (85 % planning margin) · Whole safe requests per second = 8.

Governing equationr_refill = RPM / 60 | T_drain = (N_spike − B_cap) / r_refill | t_k = T_0 · 2^(k−1) (IETF RFC 6585 §4 (HTTP 429). Token bucket and full-jitter backoff are model assumptions.)

Model assumptions

The safe rate is a request rate; the requests in flight at that rate equal the rate times the upstream latency (Little's law, see the webhook queue calculator). Full jitter draws each wait uniformly between zero and T0 × 2^(j−1), so the expected total is half the cumulative maximum. The retry verdict assumes every request above the bucket starts retrying together; clients that honor Retry-After wait differently, and no delay cap is modeled.

Computed in your browser. The calculator, the tables and the worked examples run the same equations.

Why Synchronized Retries Turn a Short 429 Into a Retry Storm

An HTTP 429 response means the client has sent too many requests in a given amount of time (RFC 6585, section 4). A token bucket is a common way to enforce that limit: tokens arrive at a steady rate r per second, the bucket holds at most b tokens, and a request that finds no token is not sent (Wikipedia, token bucket). When every worker in a pool retries on the same fixed schedule, they all wake at the same moment and collide again.

The calculator sets the refill rate to r = RPM / 60. At the default 600 RPM that is 10 requests per second. The drain time for a spike is T_drain = (N_spike - B) / r: 450 requests against a 100-token bucket need (450 - 100) / 10 = 35.0 seconds to clear.

Token Bucket Refill Rate & Burst Drain Time Across API Rate Limit Tiers (450-Request Spike); the burst bucket sizes of 20 to 500 requests are model assumptions, not the limits of any provider — Computed via r_refill = RPM / 60 | T_drain = (N_spike − B_cap) / r_refill | t_k = T_0 · 2^(k−1) (IETF RFC 6585 §4 (HTTP 429). Token bucket and full-jitter backoff are model assumptions.) · Sources checked November 2026
Quota Tier (RPM)Refill Rate (req/s)Burst Bucket (B), model assumptionDrain Time (450 Reqs)Safe Steady Rate (85 % of refill)
60 RPM1.0 req/s20 reqs430.0 s0.85 req/s
300 RPM5.0 req/s50 reqs80.0 s4.25 req/s
600 RPM10.0 req/s100 reqs35.0 s8.50 req/s
1,200 RPM20.0 req/s200 reqs12.5 s17.00 req/s
3,000 RPM50.0 req/s400 reqs1.0 s42.50 req/s
6,000 RPM100.0 req/s500 reqs0.0 s85.00 req/s

How to Evaluate Exponential Backoff and Full Jitter Math?

The deterministic wait before retry k is T0 x 2^(k-1): T0 for the first retry, 2 T0 for the second, 4 T0 for the third. The calculator reports the cumulative maximum wait over k retries as the geometric sum T0 x (2^k - 1). With T0 = 500 ms and k = 5, the waits are 0.5, 1, 2, 4 and 8 seconds, and the total is 0.5 x 31 = 15.5 seconds.

Full jitter draws each wait uniformly between zero and the exponential ceiling, so the expected wait is half of that ceiling, and the expected total over all retries is half the cumulative maximum. The calculator reports that figure as 15.5 / 2 = 7.75 seconds at k = 5, or 1.55 seconds per retry. Against the 35-second drain of the default spike, a 15.5-second window runs out first. AWS's architecture article on exponential backoff and jitter is the reference for this approach. The model has no delay cap: AWS's full jitter draws each wait between zero and min(cap, base x 2^attempt), and this calculator leaves out the cap, so with T0 = 5 s and k = 10 the cumulative maximum is 5 x 1,023 = 5,115 seconds. Set a cap in the real client.

Exponential Backoff Cumulative Wait vs Full-Jitter Expected Total Wait (T₀ = 500 ms Base) — Computed via r_refill = RPM / 60 | T_drain = (N_spike − B_cap) / r_refill | t_k = T_0 · 2^(k−1) (IETF RFC 6585 §4 (HTTP 429). Token bucket and full-jitter backoff are model assumptions.) · Sources checked November 2026
Retry Attempt (k)Step Multiplier (2^(k−1))Cumulative Max WaitFull-Jitter Expected Total Wait
Attempt 11x0.50 s0.25 s
Attempt 22x1.50 s0.75 s
Attempt 34x3.50 s1.75 s
Attempt 48x7.50 s3.75 s
Attempt 516x15.50 s7.75 s
Attempt 632x31.50 s15.75 s
Attempt 764x63.50 s31.75 s

Worked Examples: Two Presets Calculated with r_refill = RPM / 60 | T_drain = (N_spike − B_cap) / r_refill | t_k = T_0 · 2^(k−1)

Worked Example 1 (Free-tier AI API at 60 RPM, 150-request burst): This preset sets Provider Quota Limit = 60, Token Bucket Burst Capacity = 20 Reqs, Incoming Traffic Spike = 150 Requests, Initial Retry Base Delay T₀ = 1000 ms, Maximum Retry Attempts = 4. Evaluating r_refill = RPM / 60 | T_drain = (N_spike − B_cap) / r_refill | t_k = T_0 · 2^(k−1) gives: refill rate = 1.0 req/s, spike drain time = 130.0 s, maximum cumulative wait = 15.0 s, expected total full-jitter wait = 7.5 s, safe request rate = 0.85 req/s. Related in the Cloud, API, LLM & Automation Hub: LLM API Token Cost & Prompt Caching Calculator and Webhook Queue & Worker Concurrency Calculator (Little's Law).

Worked Example 2 (Partner API at 120 RPM, 300-request spike, 1 s base): This preset sets Provider Quota Limit = 120, Token Bucket Burst Capacity = 30 Reqs, Incoming Traffic Spike = 300 Requests, Initial Retry Base Delay T₀ = 1000 ms, Maximum Retry Attempts = 6. The calculator returns: refill rate = 2.0 req/s, spike drain time = 135.0 s, maximum cumulative wait = 63.0 s, expected total full-jitter wait = 31.5 s, safe request rate = 1.7 req/s. You can compare these limits with other calculators in the Engineering Studio.

How to Evaluate Sizing the Client: Safe Rate and Retry Settings?

Set the bucket size and refill rate from the provider's documented limits, then pace outgoing requests below the refill rate. The tier table uses bucket sizes of 20 to 500 requests as model assumptions, not the published limits of any provider. The calculator's safe rate is 85 % of the refill rate, shown two ways: in requests per second as floor(0.85 x r x 100) / 100 (8.50 req/s at 600 RPM) and as whole requests per second as floor(0.85 x r) (8 at 600 RPM). This is a rate, not a worker count: the requests in flight at 8.50 req/s are the rate times the upstream latency, about 0.85 at 100 ms. Below one request per second there is no whole request per second: at 60 RPM the safe rate is 0.85 req/s and at 10 RPM it is 0.14 req/s, so the whole-request figure shows as none and the client has to space requests at least 1 / safe rate seconds apart. The 85 % margin is a planning assumption; RFC 6585 defines the 429 status but sets no percentage. Honor a Retry-After header when the provider sends one, because it overrides the calculated wait.

Sources

  1. IETF · RFC 6585, Additional HTTP Status Codes (429)Section 4 defines 429 Too Many Requests: the user has sent too many requests in a given amount of time (rate limiting). Basis of the 429 handling in the calculator.
  2. Wikipedia · Token bucket General definitionTokens are added at rate r per second; the bucket holds at most b tokens (burst); a request without enough tokens is non-conformant. Basis of refill = RPM / 60 and drain time = (N − B) / r.
  3. AWS Architecture Blog · Exponential Backoff and JitterReference for capped exponential backoff with jitter and for comparing full and equal jitter. Basis of the full-jitter note (expected wait is half the ceiling).

Method and test suite: Calculation Methodology.

Frequently Asked Questions: API Rate Limit, Token Bucket & Backoff Calculator

Why does a 450-request spike take 35 seconds to drain at 600 RPM?

The bucket holds 100 tokens, so 350 requests are excess. At 10 tokens per second, 350 excess requests take 35 seconds to clear.

What does the 85 % safe rate protect against?

The refill is shared by every client that uses the same key. Pacing at 85 % leaves headroom for other services and for timing variation, and at 60 RPM it gives 0.85 requests per second rather than a rounded-up 1. The 85 % value is a planning assumption, not a standard.

Why is full jitter better than a fixed delay plus a small random offset?

A fixed delay keeps workers synchronized. Full jitter draws the whole wait from zero to the ceiling, so retries arrive across the window instead of in one burst.

Does the backoff model have a maximum delay?

No. The waits keep doubling, so T0 = 5 s with k = 10 retries gives a cumulative maximum of 5 x 1,023 = 5,115 seconds. AWS's full-jitter formula uses min(cap, base x 2^attempt); fix a cap in the real client, because an uncapped schedule is rarely what a production worker should wait.

Is it safe to retry a POST after a 429?

Usually, because a 429 means the request was refused for rate reasons. A timeout is different: the server may already have processed the request, so retried mutations need an idempotency key that the server honors.