Skip to content

LLM Throughput and Latency Converter

Pure frontend: enter a few metrics you already see in monitoring to derive in-flight concurrency, system throughput and queueing headroom. Data stays in your browser — no network call, nothing recorded.

How to use

Fill in request rate, average input and output length, time to first token (ms), time per token (ms) and the concurrency slots one instance can hold. The tool applies the end-to-end formula and Little's Law, and flags whether the steady-state assumption still holds.

Assumptions and where the formula comes from

Both relations are established results from performance engineering, not something invented here:

end-to-end latency (s)  = [TTFT(ms) + (output tokens − 1) × TPOT(ms)] ÷ 1000
system output throughput = requests per second × average output tokens
in-flight (Little's Law) = requests per second × end-to-end latency (s)
instances needed         = ceil(in-flight ÷ concurrency slots per instance)
output rate per slot     = concurrency slots per instance ÷ end-to-end seconds
  • The end-to-end expression follows from the timing definition of streaming generation: every token after the first adds one TPOT of wait.
  • Little's Law, L = λW, is a fundamental result of queueing theory; at steady state it imposes no extra requirement on the arrival or service-time distributions.
  • This tool has no queueing model, because queueing needs an arrival distribution, a service-time distribution and a scheduling policy — none of which follow from these inputs. If the TTFT you enter came from a measurement, it already contains the queueing at that moment; if it came from an idle test, the result is optimistic.

Steady state is a hard prerequisite. Little's Law requires that the long-run departure rate match the arrival rate and that averages exist. Once arrivals exceed service capacity, the queue grows without bound and residence time W grows with it; substituting it yields a number with no meaning — it only tells you the queue is growing, not what capacity you have. Use the tool for "how many slots at the target QPS" rather than "what is latency after the system breaks". Tail latency, bursts and preemption need measurement and monitoring.

Reading the output

TTFT contains queueing and prefill as separate lines — blaming the model for a slow first token points the tuning at the wrong knob. An idle first token of 200 ms that climbs to seconds at peak does not reflect a change in prefill computation; the queue changed. When first token is slow, split the question: look at waiting-request count, input-length distribution and whether the percentile curve has two humps. Two humps usually mean one oversized prompt monopolised a step, so the fix is chunked prefill and the batched-token budget, not a model swap.

Little's Law is only honest at steady state: once the queue starts growing, the residence time you plug in is growing with it. That determines its correct use: a lower bound for capacity and a target for load tests, not a post-mortem explanation. The load test must be open-loop — send at a given rate regardless of whether previous requests returned. In a closed-loop test requests never pile up, so tail latency is systematically understated.

Now the throughput-latency relationship. System tokens per second is request rate times average output length, a figure that can look impressive while every request waits a long time. A healthy service needs first-token latency, time per token and throughput read together, plus signals that move before users complain: waiting-request count and KV cache utilisation. GPU utilisation is the worst health signal of all: continuous batching is designed to pin it high, so busy and broken look the same.

An example you can check by hand

Ten requests per second with 500 average output tokens gives 5,000 output tokens/s. With TTFT of 400 ms and TPOT of 30 ms, one request takes about 400 + 499 × 30 ms, roughly 15.4 seconds. Little's Law then gives about 154 in-flight requests. If one instance stably holds 100 slots, you need at least two, with headroom; if output length rises from 500 to 2,000, residence time multiplies and the required slots rise nearly in proportion. That is how a product change quietly eats a compute budget: request rate never changed, but the time each request held resources did.

Three easily confused metrics

Tokens per second comes in at least two flavours, and mixing them makes comparisons meaningless. System output throughput sums tokens produced by all requests per unit time; it measures resource efficiency and is what platform and cost owners care about. Per-request generation speed is roughly 1 ÷ TPOT; it measures the typing effect a user sees. The same claim of "3,000 tokens/s" could mean one very fast request or a large batch averaged out — always ask which when evaluating a provider.

Request rate also has closed-loop and open-loop forms. A closed-loop test fixes concurrency and sends the next request only after the previous returns, so a queue never builds and tail latency is understated. An open-loop test sends at a given rate regardless of responses, which is what production traffic looks like. Capacity planning from closed-loop numbers almost certainly overstates what the system can do.

Then there are percentiles. Averages hide queueing, and queueing lives in the tail. A normal-looking P50 first-token latency with a P99 several times higher usually means head-of-line blocking: one oversized prompt's prefill owned a step and everything behind waited. Report P50 alongside P95/P99 and state the input and output length distribution at the time; a benchmark without the length distribution cannot be reproduced or compared.

Turning the conversion into a capacity decision

The suggested order is: measure real request rate, input-length distribution, output-length distribution and first-token latency percentiles from monitoring; feed them into the tool to get the order of magnitude of in-flight concurrency; compare that with measured per-instance capacity, compute the minimum instance count and add 20–30% headroom for bursts, long-tail requests and node jitter; finally verify with an open-loop load test.

Do not skip the headroom. Traffic spikes, long-context requests holding slots, and rescheduling after a node failure all need buffer. Deploying at the theoretical limit means the first traffic spike pushes the queue into unbounded growth, at which point substituting into Little's Law tells you nothing except that the system is unstable.

Official references