DevTools Logo

Rate Limit Calculator

API Rate Limit Calculator

Convert quotas and compute pacing and token buckets.

Runs in your browser
Try an example

Input

1 line · 4 chars

Result

5 lines · 155 chars

Rate Limit Calculator turns a documented quota into integration-ready numbers. Enter requests per second, minute, hour or day and see all four units at once plus the minimum gap between calls. Add a safety factor for headroom, model a token bucket to get capacity, refill and first-second burst, reconcile two quotas to find the binding constraint, then copy a plain-language summary.

Examples

Input
5000/hour
Output
1.389 rps · 0.72 s delay

A 5000-request hourly quota allows about one call every 720 ms.

Input
10 rps, burst 20
Output
capacity 20 · refill 10/s · full in 2 s

The bucket starts full, supports a 20-request burst and refills continuously.

Input
60/min and 10000/day
Output
binding: 60/min

The per-minute quota is stricter, so it determines sustainable pacing.

About this tool

API quotas are usually published in one unit while your client needs another. This calculator normalizes the rate to requests per second and fills in per-minute, per-hour and per-day equivalents, with the minimum delay between calls.

The token-bucket model adds burst capacity and refill behavior: given a sustained rate and a burst allowance you get capacity, refill rate, time to refill a full bucket and how many requests can go out in the first second.

When two quotas apply at once — for example per-minute and per-day — the tool finds the binding constraint automatically. A configurable safety factor leaves headroom for retries and clock skew. The numbers are mathematical baselines, not a promise about any particular provider.

What this tool does not do

  • Provider quotas often include concurrency, weight or endpoint-specific rules that simple request counting cannot model.
  • Fixed-window and sliding-window quotas behave differently from a continuously refilling bucket.
  • Presets are illustrative patterns, not live provider data; always confirm against current documentation.

How to use this tool

  1. Enter a quota

    Type a request count and choose the unit: per second, minute, hour or day. All four conversions update at once.

  2. Apply headroom

    Move the safety slider to leave room for retries. The recommended delay grows as the safety percentage drops.

  3. Model a bucket

    Switch to the token-bucket tab and enter the sustained rate and burst to see capacity, refill and first-second allowance.

  4. Reconcile limits

    Enter two quotas to see which one binds, then copy the summary for your notes or ticket.

Use cases

Wire up a client throttle

Turn a documented quota into a concrete delay between requests before you write the scheduler.

Plan batch windows

See how many requests fit into a given window and what burst size is safe.

Diagnose 429s

Compare the provider quota with your actual pacing and add headroom to stop hitting rate limits.

Core formulas

QuantityFormula
Requests per secondquota / seconds in unit
Minimum delay1000 / rps ms
Safe delay1000 / (rps x safety) ms
Bucket refill timecapacity / refill seconds
Binding constraintmin of normalized rates

Rates are rounded for display only; internal math keeps full precision.

Common mistakes

Mistake:Pacing at exactly the published rate.

Fix:Leave headroom with the safety slider: clock skew, retries and concurrent clients all consume quota that the headline number does not account for.

Mistake:Treating burst capacity as sustained throughput.

Fix:A bucket can spend its burst once, then only refills at the sustained rate. Uniform pacing is safer over long runs.

Mistake:Ignoring reset windows.

Fix:Some APIs reset quotas on fixed windows rather than refilling continuously. Window-synchronized pacing can hit the limit right before a reset.

Frequently asked questions

How do I convert requests per hour to per second?

Divide by 3600: 5000 requests per hour is about 1.389 requests per second. The calculator does this for seconds, minutes, hours and days at once and also shows the inverse — the minimum delay between calls.

What is a token bucket?

A model where a bucket holds tokens up to a capacity. Each request consumes a token and tokens refill at a steady rate. It allows a short burst up to the capacity while bounding the long-term average to the refill rate.

How much headroom should I leave?

80 percent is a reasonable starting point: it leaves one fifth of the quota for retries, concurrent clients and timing jitter. Stricter APIs or bursty traffic may need more; the safety slider updates pacing immediately.

What is the difference between burst and sustained limits?

Burst is how many requests you may send back-to-back right now, bounded by bucket capacity. Sustained is the long-term rate the bucket refills at. Confusing the two is a common cause of 429 responses after an initially fast start.

How do I pace requests safely?

Space calls by at least the safe delay (1000 / rate x safety factor in milliseconds), keep a token bucket for occasional bursts, respect Retry-After when a 429 happens, and prefer window-aware pacing when the provider resets quotas on fixed boundaries.

References & standards