Tokens per Second Calculator: LLM Speed, Latency and Throughput
By FindMySum · Last reviewed
A tokens per second calculator connects the speed figures quoted for language models to the wait a user actually experiences. A reply arrives in two phases: a pause before the first token while the model reads the prompt, then a steady stream of tokens. This page adds the two, shows the speed both ways it is commonly quoted, and works backwards from a reply you have timed. The worked example uses the defaults: a 500-token reply at 50 tokens per second, with half a second before the first token.
The formula
total time = time to first token + output tokens ÷ generation speed
- Time to first token (TTFT) covers the network, any queue on the server, and prefill: processing every prompt token before the first output token can be written.
- Generation (decode) speed is how fast tokens arrive after that, one model pass per token.
Two meanings of "tokens per second"
The same phrase is used for two different numbers, so the calculator shows both, labelled:
| Convention | Formula | Used by |
|---|---|---|
| Generation speed | output tokens ÷ (total time − TTFT) | Model and hardware benchmarks |
| End-to-end throughput | output tokens ÷ total time | What a user waits for |
End-to-end is always the lower of the two, and the gap is widest for short replies, where the first-token wait is a large share of the total.
Worked example
- Generation time: 500 ÷ 50 = 10 seconds.
- Total: 0.5 + 10 = 10.5 seconds.
- End-to-end: 500 ÷ 10.5 = 47.62 tokens per second.
- Time per token: 1,000 ÷ 50 = 20 milliseconds.
- One stream, back to back: 60 ÷ 10.5 = 5.71 replies a minute.
For a 2,000-token reply at 120 tokens per second with 0.3 seconds to the first token, the total is 16.967 seconds and the end-to-end rate 117.88 tokens per second: the first-token wait barely matters on a long answer.
Measuring your own speed
Choose "speed from a measured time" and enter three numbers from a streamed response: the output token count (from the API's usage report), the total time from sending the request to the last token, and the time the first token appeared. The calculator divides the tokens by the generation time. Measure several replies of similar length and average them, because speed varies with load.
Concurrency
A server can generate for many requests at once. Enter the number of concurrent streams under advanced options and the calculator multiplies: eight streams at 25 tokens per second produce 200 tokens per second in total, and with a 42-second response each, about 11.4 replies a minute. In practice adding streams slows each one somewhat, so enter the per-stream speed you observe at that load rather than the speed of a lone request.
Reading the latency curve
Because generation time grows in a straight line with the number of output tokens, the curve under the calculator has two features worth reading. Where it starts on the left is the time to first token: the fixed cost every reply pays, however short. Its slope is the time per token, 20 milliseconds in the example. A model with a quick first token but a slow stream wins on short answers such as classifications or one-line replies; one with a slower start but a fast stream wins on long documents and code. Comparing two setups with scenario compare shows where their curves cross.
What moves the numbers
- Model size and memory bandwidth. Each token needs the weights read from memory, so bigger models and slower memory mean fewer tokens per second. Quantised weights read faster.
- Prompt length. Longer prompts raise the time to first token.
- Batching and load. Busy servers queue requests and share the GPU among streams.
- Output length. Generation time grows in a straight line with the reply length; the chart under the calculator shows that line.
To see what those tokens cost, use the LLM cost calculator; to check that a model fits your GPU before measuring it, use the VRAM calculator.
More questions
Why is my local model slower than the published benchmark?
Benchmarks are measured on specific hardware, batch sizes, prompt lengths and quantisation. On your machine, memory bandwidth usually sets the generation speed: a model whose weights barely fit in GPU memory, or spill into system RAM, runs much slower. Measure your own speed with a timed reply.
Does a longer prompt slow down generation?
It mainly slows the first token, because the whole prompt is processed before writing starts. Generation itself also slows a little as the context grows, since each new token attends to more cached tokens.
How do I convert tokens per second into words per minute?
Multiply by 60 for tokens per minute, then by about 0.75 for English words. 50 tokens a second is roughly 2,250 words a minute, many times faster than anyone reads.
What is a good time to first token for a chat app?
Under about a second feels responsive for most chat interfaces; voice assistants need much less so speech starts promptly. Long prompts, busy servers and network distance all add to it.
Is throughput the same as speed?
Not quite. Speed usually means tokens per second for one stream. Throughput is the total across all requests a server handles at once, which can be far higher even when each user sees a modest speed.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.