Learn AI Math

Latency

Also called: Inference Latency

What is Latency?

In one sentence: Latency is the delay between asking for something and getting a response.

In AI, latency includes network time, waiting in queues, prefill and generation. Low latency makes apps feel fast and responsive.

Σ Quick math / rule of thumb: Total Response Time = TTFT + (TPOT × Output Tokens). For a 200-token answer at 400 ms TTFT and 20 ms TPOT: 0.4 s + 4.0 s = 4.4 s total.

What does Latency look like?

If a voice assistant takes 2 seconds to start answering, its latency is 2 seconds.

Why does Latency matter?

Latency is one of the most noticeable parts of AI quality for users.

Latency vs. Throughput

Latency measures how fast one single user gets their answer (seconds), while throughput measures how many total tokens per second a server delivers across all concurrent users.

DimensionLatencyThroughput
UnitMilliseconds or seconds per requestTotal tokens/sec or requests/sec across server
Effect of bigger batchesUsually makes each user wait a bit longerGreatly increases total GPU throughput
Who cares mostIndividual user waiting on a replyInfrastructure team paying the GPU bill

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.