Formula: LLM Throughput and Latency Estimator
- Inputs: All units, rates, and allowances are entered by the user.
Rounding: Displayed values are rounded for readability; package and item quantities round upward.
Estimate per-request time from prompt and response token throughput.
Rounding: Displayed values are rounded for readability; package and item quantities round upward.
Prefill reads every prompt token in one parallel pass, so hardware can process thousands of tokens at once. Decode must produce each output token after the previous one, because each new token depends on what came before. The defaults reflect that gap, with prefill at 20000 tokens per second and decode at 1000 tokens per second, a twentyfold difference. Your measured ratio may differ, but decode is almost always the slower phase per token.
Indirectly. The prefill share of the result, input tokens divided by prefill throughput, approximates time to first token on an idle system. With the defaults that is 0.2 seconds. Real time to first token also includes network travel, queueing behind other requests and any tokenisation overhead, none of which the calculator models. Add those from your own measurements if you need a user-facing figure.
The model assumes each request runs at the rates you entered regardless of how many others exist. Request count only feeds the capacity line underneath. That is why 6000, 10000 and 15000 requests all show 0.7 seconds. On real hardware, heavy load can slow individual requests, so measure rates at your expected traffic level to capture that effect.
Not directly, but you can approximate it. If part of each prompt is served from a cache and skips prefill, enter only the uncached tokens as input tokens. With the default rates, cutting the prompt in half saves 0.1 seconds per request. Check with your serving setup how much of the prompt is actually reused before relying on the saving.
Small workloads produce awkward fractions of an hour, so the page adds minutes alongside. The default 0.097 hours is shown as 5.8 minutes, and the higher scenario at 0.146 hours as 8.8 minutes. Hours are given to three decimal places. For a long batch job read the hours; for a short one the minutes are easier to plan around.
Parallel requests. The calculator divides total work by this number, so it should match how many requests are being processed at the same time across all your hardware. One server handling eight requests at once counts as eight. Make sure the throughput rates you enter are what each of those parallel requests sees, not the server total.
Only if you include them. Some models generate internal tokens before or alongside the visible answer, and those tokens take decode time just like visible ones. If your model does this, add the typical hidden token count to Output Tokens per Request. Leaving them out can make the estimate several times too optimistic for reasoning-heavy tasks.
Some serving systems use speculative decoding or similar methods that produce several tokens per step, which raises effective decode speed. If your measured rate already reflects those gains, enter it and the estimate will match. If you used a rate from a setup without them, the calculator will overstate time. Use rates taken from the same configuration you will run in production.
Yes, if you have measured rates for both. Enter the same token counts and workload, then switch the two throughput values. The difference in per-request time and capacity shows the speed cost of the larger model. Pair it with a separate cost comparison, because the faster model is not always the cheaper one per request. Keep token counts identical across both runs so that only speed differs.
The page lists queueing, batching, network latency, prefill and decode overlap, and provider throttling as excluded. In practice that also means no allowance for failed requests, retries, warm-up time or uneven request sizes. Treat the capacity line as a lower bound and add a safety margin based on what you see in real runs.
The default request has a 4000 token prompt and a 500 token response. Prefill runs at 20000 tokens per second and decode at 1000 tokens per second. The calculator divides each token count by its own rate and adds the two times together.
Reading the prompt takes 4000 divided by 20000, which is 0.2 seconds. Writing the answer takes 500 divided by 1000, which is 0.5 seconds. Together they make the 0.7 seconds shown as the estimated per-request generation time.
Notice the split. The prompt is eight times longer than the response, yet it accounts for less than a third of the time. That is the normal shape of language model inference. Prefill processes the whole prompt in parallel, so it moves through tokens quickly. Decode produces one token after another, each depending on the last, so it is far slower per token. For most chat and generation workloads, the length of the answer drives latency much more than the length of the question.
You can check any result by hand in the same way. Divide prompt tokens by the prefill rate, divide response tokens by the decode rate, and add. If your own sum differs from the page, one of the fields probably holds a value other than the one you meant, often a rate typed in thousands or a token count copied from a different model's tokenizer.
The formula adds the two phases instead of taking the larger of them. For a single request that is right: a model cannot start generating its answer until it has read the prompt, so prefill time is always paid before the first output token appears.
The prefill part, 0.2 seconds by default, is roughly what a user waits before anything shows on screen. The decode part is how long the text takes to stream out after that. If you stream responses, the perceived wait is closer to the prefill figure. If you only show the finished answer, the user waits the full 0.7 seconds.
Where the sum can mislead is under load. Serving systems often overlap one request's prefill with other requests' decode, and they batch many requests together. The page excludes that overlap, along with queueing, network delay and provider throttling. So the 0.7 seconds is a floor for one request on an idle system, not a promise of what users see at peak.
The help text asks for the prefill and decode speed of one request, not the total for the server. That distinction is the single most common way to get this page wrong. The calculator uses each rate as the speed one request sees, and then separately divides the workload by the number of concurrent workers. If you typed a server total of 1000 tokens per second of decode that is really shared across 20 parallel requests, each request would see only about 50 tokens per second, and the true per-request time would be much longer than 0.7 seconds.
To get a sensible answer, enter the rates that a single request experiences: the prompt processing speed and the token generation speed one stream gets while the system runs at your planned concurrency. If you only have a total throughput for the whole server, divide it by the number of concurrent requests before entering it, and then set Concurrent Workers to that same number. Concurrent Workers must be a whole number of one or more.
The difference is large. With decode set to 50 tokens per second and everything else at the default, the per-request time becomes 10.2 seconds and the default workload needs 1.417 hours of capacity, about 85 minutes, against 0.097 hours with the default rate. Getting this one input right matters more than every other choice on the page.
Below the main answer, the calculator multiplies per-request time by the number of requests and divides by the number of concurrent workers. With 10000 requests at 0.7 seconds each and 20 workers, the line reads about 0.097 hours, and the page converts that to 5.8 minutes of idealized processing.
The comparison scenarios show how this scales. At 6000 requests the capacity is 0.058 hours, or 3.5 minutes; at 15000 it is 0.146 hours, or 8.8 minutes. The per-request time stays at 0.7 seconds in all three, because request count has no effect on how long any single request takes in this model.
Concurrency works the other way. With one worker, the default workload needs 1.944 hours, close to two hours. With 40 workers it needs 0.049 hours, or 2.9 minutes. Doubling workers halves the time, which is the idealized assumption. In practice, adding concurrency to a single machine usually lowers the per-stream rate, so the real gain is smaller. If you change the worker count, measure the per-request rates again at the new level.
Doubling the prompt to twice the default size raises per-request time from 0.7 to 0.9 seconds. The extra prompt adds only 0.2 seconds at the default prefill rate. A prompt ten times the default length takes the result to 2.5 seconds, with prefill now the larger share.
Doubling the response to 1000 tokens has a much bigger effect: the time goes to 1.2 seconds, and the default workload needs 0.167 hours, or 10 minutes. Cutting the response to 50 tokens brings the time to 0.25 seconds, most of it prefill.
This is the practical lesson the calculator teaches quickly. If latency is the problem, shortening outputs usually helps more than trimming prompts. Asking for a concise format, setting a sensible maximum output length, or returning structured data instead of prose all cut the decode share. Long retrieval contexts mostly cost prefill time, which is cheaper per token, until the prompt becomes very large. Very long prompts can also slow decode itself on real systems, because each new token attends to everything before it; the calculator keeps decode speed fixed, so enter a rate measured at your actual prompt length.
Use real averages here. Token counts per request vary widely, and a mean taken from logs of actual traffic is far more useful than the size of one hand-picked example.
If either speed is zero or left empty, the calculator stops and asks for both prefill and decode speeds to be above zero. That is deliberate. A phase with no throughput would take forever, not no time at all, so there is no meaningful answer to give.
The message tends to appear when switching between scenarios and accidentally clearing a field, or when pasting a figure with a unit attached. It can also be a sign that you are modelling something odd: a workload with no prompt at all is fine, because input tokens may be zero, but the prefill speed itself must still be a positive number.
The concurrency field has its own check. It must be a whole number of one or more, so a value such as 2.5 is rejected. Parallel requests come in whole units, and a fractional worker count usually means a rate or a request count has been typed into the wrong box.
The quality of this estimate depends entirely on the two rates. Published benchmark numbers are usually taken under conditions that differ from yours: different hardware, batch size, precision, prompt length and output length. Measure instead.
A simple approach is to send a set of requests that look like your real traffic and record two timings for each: time to first token and total time. Time to first token, less network round trip, approximates prefill time; divide the prompt tokens by it to get a prefill rate. The remaining time, divided into the output tokens, gives the decode rate.
Run these tests at the concurrency you plan to use, because per-stream rates fall as more requests share the hardware. Repeat at two or three concurrency levels and enter each pair into the calculator. The setting with the best balance of per-request time and total capacity is usually somewhere in the middle, not at either extreme.
Treat the capacity line as the minimum busy time for a batch job. If you have 10000 documents to summarise overnight, the default inputs say about 5.8 minutes of processing in a perfect world. Plan for more, because real systems lose time to queueing, retries, failed requests and uneven request sizes.
For interactive services, the per-request time matters more than total capacity. Compare the prefill share with your target time to first token, and the total with your target for a complete answer. If the decode part alone already exceeds your target, no amount of extra concurrency will fix it; you need faster decode per stream or shorter outputs.
For cost estimates, pair this page with a budget calculator. This one gives you time and capacity; it says nothing about the price of tokens or hardware.
One more planning habit helps. Keep a short record of the inputs you used and the date you measured the rates. Serving software, model versions and hardware all change, and rates measured a few months ago may no longer hold. Re-measuring and re-running the page takes minutes and keeps capacity plans honest.