Skip to content

Menu

Rate Limit Calculator

Calculate rate limits and generate code

Runs entirely in your browserAPI & HTTPFree, no sign-up
Loading tool

01What is Rate Limit Calculator?

Rate Limit Calculator helps you pick a limit for an API and see what it really means. You enter a number of requests and a window in seconds, then choose an algorithm. The tool divides requests by window to get a rate per second. It then multiplies that by 60, 3,600 and 86,400 for the per minute, per hour and per day figures. A short TypeScript class with your numbers filled in appears next to it. Four algorithms are on offer, and they behave differently under bursts. Sliding Window keeps a log of request timestamps and rejects a call once the rolling window is full. That removes the boundary problem, though a client can still spend its whole allowance in one instant. Fixed Window counts requests and resets the counter when the window ends. The tool warns that a client can push up to twice the rate through around a boundary. Token Bucket and Leaky Bucket add a Burst Size field. The token bucket holds that many tokens and refills at requests divided by window per second. The leaky bucket here is the meter variant. It drains at a constant rate and rejects requests that would overflow it, rather than queueing them. Its class carries fractional drain time forward, so 100 per minute really drains about 1.67 requests a second. A quick example. Enter 100 requests over 60 seconds with Sliding Window. You get 1.67 per second, 100 per minute, 6000 per hour and 144000 per day. The Response Headers panel shows X-RateLimit-Limit: 100 and X-RateLimit-Remaining: 99. X-RateLimit-Reset is a Unix timestamp one window from now, and Retry-After shows 60 as a worst case. Those X-RateLimit headers are a widespread convention, not a standard. The IETF httpapi working group has a RateLimit header draft that may replace them. Retry-After itself is defined in RFC 9110, and status 429 comes from RFC 6585. A few honest limits. The per minute, per hour and per day cards round to whole numbers, so 1000 per hour shows 17 per minute instead of 16.67. The generated classes keep state in memory, so they only work inside one process. Zero, negative or blank inputs are clamped to 1. Everything runs in your browser.

Backend and platform engineers who need to choose API quotas, explain them in docs and drop a working limiter into a small service. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Rate Limit Calculator

  1. Enter a number in Requests and a number in Window (seconds), or pick one of the examples
  2. Choose an Algorithm. For Token Bucket or Leaky Bucket, set Burst Size too
  3. Read the description and the Per Second, Per Minute, Per Hour and Per Day cards
  4. Check the Response Headers panel and the Implementation code
  5. Click Copy Code to take the class, or the reset button to go back to 100 requests per 60 seconds

03Worked examples

Input: 100 requests / 60 s, Sliding Window
Result: Per Second 1.67 | Per Minute 100 | Per Hour 6000 | Per Day 144000; X-RateLimit-Limit: 100, X-RateLimit-Remaining: 99, Retry-After: 60 (worst case)
The sliding window log stops the 2x burst at window edges, but a client can still spend all 100 at once.
Input: 1000 requests / 3600 s, Fixed Window
Result: Per Second 0.28 | Per Minute 17 | Per Hour 1000 | Per Day 24000
The exact per minute rate is 16.67. The card rounds it to a whole number.
Input: 10000 requests / 1 s, Token Bucket, Burst Size 500
Result: Token Bucket: 500 tokens capacity, refills at 10000.00 tokens/sec. Allows bursts up to 500 requests instantly.
Burst Size sets the bucket capacity separately from the sustained refill rate.
Input: 5000 requests / 86400 s, Leaky Bucket, Burst Size 100
Result: Per Second 0.06 | Per Minute 3 | Per Hour 208 | Per Day 5000; bucket of 100 drains at 0.06 req/sec
A daily quota as a leaky bucket allows about one request every 17 seconds on average, after the first 100.
Input: 0 requests / -5 s
Result: Requests and Window both become 1: Per Second 1.00 | Per Minute 60 | Per Hour 3600 | Per Day 86400
Zero, negative and blank inputs are clamped to 1.

04Common use cases

  • Choosing limits for the free and paid plans of a public REST API and checking what each works out to per second
  • Turning a vendor's 1000 requests per hour quota into a per second figure for a client-side throttle
  • Sketching in-memory rate limiting for a small Express or Fastify service before moving it to Redis
  • Comparing how a fixed window and a token bucket treat the same 100 per minute limit under bursty traffic
  • Writing the rate limit section of API docs, including the headers a client should expect with a 429
  • Explaining token bucket versus sliding window while preparing for a system design interview

05Tips

  • The generated classes keep state in memory. With two or more server instances, each one keeps its own count, so you need a shared store such as Redis for the limit to hold.
  • Key limits by API key or user ID rather than IP address. Whole offices sit behind one NAT address and would share a single allowance.
  • A sliding window log stores every timestamp. At high limits, a sliding window counter uses far less memory for nearly the same accuracy.
  • Send Retry-After with every 429, using the real seconds until a slot frees up. The tool's value is the worst case of one full window.
  • Set Burst Size lower than Requests if you want a token bucket to smooth traffic. Leaving them equal still allows the full allowance in one burst.

06Related concepts

Rate limiting, Token bucket, Sliding window, HTTP 429, API throttling.

Frequently Asked Questions

What is Rate Limit Calculator?

Rate Limit Calculator is a free, browser-based developer tool on AIDToolStack. Calculate rate limits and generate code It requires no installation or sign-up and works entirely in your browser.

Is Rate Limit Calculator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Rate Limit Calculator store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe