AI Inference Performance Calculator
NEWTime one streamed request to a language model: time to first token, inter-token latency, decode duration and time to final token, drawn to scale, with the measurement boundary of every value stated.
Request latency
One streamed request
DeploymentSynthetic
Tokens
Measured performance
Stage estimate
Boundary: client, includes queue and network
Off: the measured TTFT already includes them, so nothing is added twice.
- Time to first token
- s
- Time to final token
- s
- Mean inter-token latency
- ms
- Decode duration
- s
Timing of the requestto scale
Derived valuesdefinition and measurement boundary for each
| Metric | Value | Calculation | Definition |
|---|
Assumptions.
Found a bug or missing something? Write to us
Scope and limits
Stated boundaries, exact arithmetic
Every value can be checked by hand
The timing is tested against reference cases: 501 output tokens with a first token at 800 ms and 50 tokens per second after it give a decode duration of exactly 10 s, a final token at 10.80 s and 20 ms between tokens. Each value states whether it was measured on the client or the server, so network and queue time are never counted twice.
Help
FAQ
What does time to first token measure?
The time from sending a request to receiving the first content token. Measured by the client it includes the network, the queue on the server and the processing of the input; measured on the server it leaves the network out. The calculator states which boundary the entered value has, so nothing is counted twice.
How is the time to final token calculated?
As the time to first token plus the decode duration: the tokens after the first chunk divided by the decode rate. In the example, 500 tokens at 50 tokens per second take 10 s, so with a first token at 0.80 s the final token arrives at 10.80 s.
What is the difference between inter-token latency and the interval between stream events?
Inter-token latency is the decode duration divided by the tokens after the first chunk: 10 s over 500 tokens is 20 ms. A server may send several tokens in one stream event, so the interval between events can be longer than the interval between tokens. The table shows both when they differ.
Why is the apparent input rate not the prefill speed of the engine?
Because it divides the input tokens by the whole time to first token, and that time also holds the network, the queue and the work on the first output token. 4,096 input tokens over 0.80 s give 5,120 tokens per second, which is a lower bound on the real prefill rate, not a measurement of it.
What does the memory bandwidth ceiling show?
An upper bound on the decode rate when each generated token has to read a fixed amount of data from memory: bandwidth divided by the bytes read per token. 800 GB/s and 16 GB per token give at most 50 tokens per second. A decode rate above the ceiling is flagged, because it points to a wrong measurement or a wrong assumption about the bytes read.
Are the entered values sent to a server?
No. Every figure is calculated in the browser. The page address holds the values that differ from the example so the request can be shared as a link; nothing else is stored or sent.
