Rate Limit Calculator

Convert between API rate limit units. Calculate requests per second, minute, hour, and day with burst capacity and cost planning.

About This Tool

The Rate Limit Calculator is a free, browser-based tool that helps developers convert between different rate limit units and plan their API usage effectively. Whether you are working with an API that limits requests per second, per minute, per hour, or per day, this tool instantly converts between all time units so you can compare limits across different services.

Rate limiting is a fundamental concept in API design and consumption. APIs like GitHub, Stripe, OpenAI, and Twitter each enforce rate limits in different units and with different algorithms. This calculator supports multiple analysis modes: a unit converter for quick conversions, a token bucket simulator for understanding burst capacity, a concurrency calculator for connection planning, a cost estimator for budget forecasting, and a header decoder for interpreting X-RateLimit-* response headers.

The token bucket algorithm is one of the most common rate limiting strategies used by APIs. It allows short bursts of traffic while enforcing a sustained average rate. Our visual token bucket simulator lets you experiment with bucket size, refill rate, and burst patterns to understand exactly how your requests will be throttled. This is especially useful when integrating with APIs like Shopify (leaky bucket) or AWS API Gateway (token bucket).

If you are debugging HTTP responses, the header decoder parses standard rate limit headers including X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After. You can also explore our HTTP Header Analyzer for a complete header inspection tool, check HTTP Status Codes to understand 429 Too Many Requests responses, or use the cURL to Code converter to test API endpoints directly.

All calculations run entirely in your browser. No data is sent to any server — there are no API calls, no logging, and no third-party services involved. Your rate limit configurations and header data remain completely private on your machine.

How to Use

  1. Select the Unit Converter tab and enter the number of requests with the corresponding time unit to see conversions across all units simultaneously.
  2. Switch to the Token Bucket tab to simulate a token bucket rate limiter. Set the bucket size, refill rate (tokens/second), and burst request count to visualize remaining capacity.
  3. Use the Concurrency tab to calculate the maximum number of concurrent connections needed. Enter your average response time in milliseconds and the rate limit in requests per second.
  4. Open the Cost Estimator tab to forecast API expenses. Enter your expected monthly request volume and cost per request to see daily, monthly, and yearly breakdowns.
  5. Paste HTTP response headers into the Header Decoder tab to interpret rate limit headers like X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
  6. Browse the API Limits reference tab for a quick lookup of common API rate limits including GitHub, Stripe, OpenAI, Twitter, AWS, and more.
  7. Press Ctrl+Shift+C to copy the current results to your clipboard, or click the Copy button in the toolbar.

Popular Rate Limit Calculator Examples

View all rate limit calculator examples →

FAQ

What is a rate limit?

A rate limit is a restriction on the number of API requests a client can make within a given time period. APIs impose rate limits to prevent abuse, ensure fair usage, and protect server resources. Common formats include requests per second (RPS), requests per minute (RPM), and requests per hour. When you exceed a rate limit, the API typically returns a 429 Too Many Requests HTTP status code.

How does the token bucket algorithm work?

The token bucket algorithm maintains a bucket of tokens with a maximum capacity. Each request consumes one token. Tokens are added to the bucket at a fixed refill rate. If the bucket is full, new tokens are discarded. If the bucket is empty, requests are rejected. This allows short bursts up to the bucket size while enforcing an average rate equal to the refill rate.

What do X-RateLimit headers mean?

X-RateLimit-Limit indicates the maximum number of requests allowed in the current time window. X-RateLimit-Remaining shows how many requests you have left. X-RateLimit-Reset contains a Unix timestamp or seconds count indicating when the limit resets. Retry-After tells you how many seconds to wait before making another request after receiving a 429 response.

How do I calculate max concurrent connections?

Max concurrent connections equals the rate limit (requests per second) multiplied by the average response time (in seconds). For example, if your rate limit is 100 requests/second and the average response takes 200ms, you need ceil(100 * 0.2) = 20 concurrent connections to fully utilize the rate limit.

What is the difference between fixed window and sliding window rate limiting?

Fixed window rate limiting counts requests in fixed time intervals (e.g., every minute from :00 to :59). It can allow bursts at window boundaries. Sliding window rate limiting uses a rolling time window, providing smoother enforcement. Sliding log tracks every request timestamp, while sliding window counter approximates by weighting the previous and current windows.

Is my data safe?

Yes. All calculations and header parsing run entirely in your browser using JavaScript. No data is sent to any server. You can verify this by checking the Network tab in your browser's developer tools while using the tool.

How accurate are the API rate limit references?

The reference table provides approximate default limits as of the tool's last update. Rate limits vary by API plan, subscription tier, and specific endpoint. Always consult the official API documentation for the most current rate limit information for your specific use case.

Related Tools