Rate Limit Calculator
Calculate API rate limits, visualise backoff plans, and generate middleware code — live.
About this ToolHow it works, benefits & use casesTap to collapse
Translate a rate limit expressed as "N requests per period" into the numbers and code you actually need. Drag the three sliders — requests per period, the window in seconds, and an optional burst limit — and the tool computes the equivalent throughput per second, minute, hour, and day, plus how long to wait between requests to stay under the cap. It generates contextual recommendations (for example, batching advice when the per-second rate is below 1, or the minimum spacing between calls) and pre-loads the real limits of GitHub, Twitter, Stripe, and OpenAI with one click. A backoff table compares linear, exponential, and Fibonacci retry delays across five attempts against a 1-second base and 60-second cap. Finally it emits ready-to-use middleware: an express-rate-limit limiter and a token-bucket RateLimiterMemory from rate-limiter-flexible that honours your burst setting.
How to Use
- 1Drag the "Requests per period" and "Window" sliders to describe the limit, and set a "Burst limit" if your provider allows temporary spikes.
- 2Or click a provider preset — GitHub, Twitter, Stripe, or OpenAI — to load its real configuration.
- 3Read the per-second, per-minute, per-hour, and per-day stat cards to see the limit at different scales.
- 4Compare the linear, exponential, and Fibonacci columns in the backoff table to pick a retry strategy.
- 5Review the recommendations, then copy the generated express-rate-limit and token-bucket middleware from the output panel.
Key Benefits
- Instant per-second / minute / hour / day breakdown from any "N per period" limit
- One-click presets for GitHub, Twitter, Stripe, and OpenAI limits
- Backoff comparison across linear, exponential, and Fibonacci over five attempts
- Context-aware recommendations (batching, request spacing, sustained vs. burst)
- Generated express-rate-limit middleware with the correct windowMs and max
- Generated rate-limiter-flexible token-bucket config that respects your burst limit
- Everything recomputes live as you move the sliders; state is shareable via URL
Common Use Cases
- Planning client-side request pacing so you never trip a third-party API limit
- Choosing a retry/backoff strategy by comparing delay growth side by side
- Generating server-side rate-limiting middleware for an Express or Hono service
- Estimating how long a bulk job will take under a given quota
- Communicating an API's effective throughput to teammates with a shareable link
Configuration
Backoff plans
Delay before retry (ms) — 1 s base · 60 s cap · 5 attempts.
| Attempt | Linear | Exponential | Fibonacci |
|---|---|---|---|
| #1 | 1.0 s | 1.0 s | 1.0 s |
| #2 | 2.0 s | 2.0 s | 1.0 s |
| #3 | 3.0 s | 4.0 s | 2.0 s |
| #4 | 4.0 s | 8.0 s | 3.0 s |
| #5 | 5.0 s | 16.0 s | 5.0 s |
Live preview · express-rate-limit + rate-limiter-flexible
import rateLimit from 'express-rate-limit';
export const limiter = rateLimit({
windowMs: 3600000, // 3600s
max: 5000,
standardHeaders: true,
legacyHeaders: false,
});
// ─── token-bucket (burst-aware) ───
import { RateLimiterMemory } from 'rate-limiter-flexible';
const limiter = new RateLimiterMemory({
points: 5000,
duration: 3600,
});Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- Intersection Observer GeneratorGenerate IntersectionObserver code from a use-case picker (reveal, lazy-load, infinite scroll, scroll-spy, sticky, video autoplay) with a live trigger-zone diagram and vanilla/React/Vue output
- CORS Header GeneratorGenerate CORS headers for API endpoints
- cURL to Code ConverterConvert cURL commands to code in various languages
- GraphQL Schema ValidatorValidate GraphQL schema definitions
- OpenAPI Spec ViewerView and explore OpenAPI/Swagger specifications
- Postman to cURL ConverterConvert Postman requests to cURL commands
It divides your requests-per-period by the window in seconds to get the per-second rate, then scales that up by 60, 3600, and 86400 for minute, hour, and day. The time-per-request is the inverse — the window divided by the request count — which drives the spacing recommendation.
The table shows the delay before each retry for three strategies over five attempts, with a 1-second base delay and a 60-second cap. Linear grows as base × attempt, exponential as base × 2^(attempt-1), and Fibonacci as base × fib(attempt); all are clamped to the 60-second maximum.

