Skip to content
Koit Academy

LLM rate limit calculator

Your numbers

The numbers filled in are an example. Replace them with yours.

Time to run the job

2.7 hours

20,000 requests at 125 a minute, held back by the tokens per minute limit. Each request counts as 1,600 tokens, so the token limit allows 125 a minute against 500 by requests.

How it adds up

ItemRequests a minuteTime for the job
max_tokens 2001432.3 hours
max_tokens 4001252.7 hours
max_tokens 8001003.3 hours
max_tokens 1,600714.7 hours

The token limit counts max_tokens, not the length of the answer you actually get, so a max_tokens far above the real answers wastes the limit. Leave headroom too: retries after errors count against the same limits, and running right at the limit produces rate-limit errors.

Worked out from the numbers you enter. Calculated in this browser; nothing you enter is sent anywhere or stored.

How to use it · free, no signup

How to use the LLM Rate Limit Calculator

Enter the number of requests, their tokens and your requests-per-minute and tokens-per-minute limits to see how long the job takes and which limit binds. Calculated in your browser.

  1. 01

    Enter the job

    How many requests, and the input tokens of a typical one.

  2. 02

    Enter max_tokens

    The limit you set on each answer; it counts towards the token limit.

  3. 03

    Enter your limits

    Requests and tokens per minute, and a daily request cap if you have one.

Two limits, one bottleneck

AI APIs limit how much you can send per minute in two ways: requests per minute (RPM) and tokens per minute (TPM). Whichever is reached first applies, as OpenAI’s rate limit guide explains. The same guide says the token count for a request is based on the larger of max_tokens and the estimated tokens, so each request counts as its input plus max_tokens. The example uses the starting values.

FigureValue
Tokens counted per request (1,200 + 400)1,600
Requests a minute allowed by TPM (200,000 ÷ 1,600)125
Requests a minute allowed by RPM500
Effective rate125 a minute, set by TPM
Time for 20,000 requestsAbout 2.7 hours

max_tokens is part of the budget

Because the token limit counts max_tokens rather than the answer you actually get, a generous max_tokens slows a batch even when the answers are short. In the example, halving max_tokens to 200 raises the rate from 125 to about 143 requests a minute. Set it just above the longest answer you expect, which the token counter can estimate from a typical answer.

Planning a large job

  • Run below the limit. Retries after errors count too, and running at the edge produces rate-limit errors.
  • Mind daily caps. A requests-per-day limit spreads a big job over several days, whatever the per-minute limits.
  • Use batch services where your provider offers them, for work that can wait.
  • Ask for more. Limits usually rise with usage tier or on request.

Time and cost together

The same token counts set the bill: price the job with the AI API cost calculator. To see how long a single answer takes to arrive, use the tokens per second calculator, and to build the prompts for a batch from a spreadsheet, the bulk prompt generator.

Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.

Questions

What people ask about the LLM Rate Limit Calculator

What are RPM and TPM?
Requests per minute and tokens per minute, the two main API rate limits. Whichever you reach first holds you back.
Why does max_tokens count towards the limit?
OpenAI’s guide says the rate limit is calculated from the larger of max_tokens and the estimated tokens of the request, so a high max_tokens uses up the token limit even when answers are short.
How long will 20,000 requests take?
At 1,600 tokens a request and a 200,000 TPM limit, 125 requests a minute fit, so about 2.7 hours, even with a 500 RPM limit.
How do I process a large job faster?
Lower max_tokens to just above the real answers, shorten the prompt, ask for higher limits, or use a provider’s batch service where it has one.
What happens if I exceed the limit?
Requests are refused with a rate-limit error until the minute moves on. Plan to run a little below the limit and retry with a delay.