← Measures

Latency (p50 / p95 / p99)

The average response time is comforting and useless. Tail latency is what one in a hundred users actually waits through.

At a glance

Full name Latency percentiles, commonly p50 (median), p95 and p99
What it measures How long requests take to get a response, across the whole distribution of requests, not just the typical one
Formula Sort all response times; p50 is the middle value, p95 is the value below which 95% of requests fall, p99 the value below which 99% fall
Typical range Milliseconds to seconds, task- and system-dependent
Used for Any user-facing or chained AI system where response time affects experience
Best used for Setting and monitoring service-level objectives, and catching the tail problems averages hide
Pair with Throughput, since the two trade off against each other, and separate first-token versus per-token timing for generative systems

The average response time of a system is one of the most misleading single numbers an engineering team can report, because it is dominated by the common case and blind to the bad case, and the bad case is exactly what makes users leave. Latency percentiles fix this by describing the whole distribution rather than collapsing it into one average.

What it is and how it’s computed

Collect the response time of every request over some window, then sort them. The p50, or median, is the value in the middle, half of requests are faster, half slower. The p95 is the value below which 95% of requests fall, meaning 1 in 20 requests is slower than this. The p99 is the value below which 99% of requests fall, meaning 1 in 100 is slower. Engineering teams at scale often track even further into the tail, p99.9 or beyond, because at enough volume, even a one-in-a-thousand bad outcome happens constantly. Dean and Barroso, in their widely cited 2013 paper “The Tail at Scale” from Google, laid out why this tail behaviour compounds badly in distributed systems: a single user request that fans out to a hundred backend calls will, as a whole, be as slow as its single slowest component, so even a small per-component tail latency problem can dominate the overall experience almost all the time.

A worked example

Imagine an AI-powered search feature with a median (p50) response time of 200 milliseconds, which sounds fast and would look fine on an average-only dashboard. But its p99 is 4,500 milliseconds, meaning 1 in every 100 searches takes over 4.5 seconds, more than twenty times longer than the typical case. At 100,000 searches a day, that is 1,000 searches a day taking several seconds each, a volume of bad experiences large enough to show up in complaints and churn, and entirely invisible if the team was only watching the average or even the median.

Where it matters

Latency percentiles matter for every user-facing AI product, chat interfaces, search, code completion, voice assistants, and especially for systems that chain multiple model calls together (agentic workflows, retrieval followed by generation, multi-step tool use), since each additional chained call multiplies the chance that at least one step lands in the slow tail. For large language model serving specifically, teams commonly split latency into time-to-first-token (how long before the response starts appearing) and time-per-output-token (how fast it streams after that), since the two feel very different to a user even at the same total latency.

Strengths

Percentiles describe the actual range of experience users have, not a single fictional “typical” request that may not represent anyone’s real wait. They directly support meaningful service-level objectives (“99% of requests complete within 2 seconds”) in a way an average cannot, since an average gives no guarantee about any individual request. And tracking multiple percentiles together, p50 through p99, reveals whether a system has a long, unhealthy tail or a tight, predictable distribution, a distinction that matters enormously for user trust even when the typical case is identical.

Limitations, and the things that go wrong

High percentiles are noisier and need more data to estimate reliably than the median does, so a p99 computed from a small sample of requests can be unstable and misleading. Percentiles computed over a whole day can also hide problems that only occur during specific traffic spikes, since the bad period gets averaged into otherwise-good hours; many teams track percentiles over short rolling windows for exactly this reason. And latency alone says nothing about correctness: a system can respond instantly with a wrong or unhelpful answer, so latency has to be read alongside quality metrics, never as a substitute for them.

When I would use it, and what to pair it with

I report latency distributions, never a single average, for any user-facing system, and I always include at least p50, p95 and p99 together, since the gap between them is the whole story. For generative AI specifically, I track time-to-first-token and time-per-output-token separately, since they drive very different parts of the user’s perceived experience. And I always look at latency next to throughput, since most systems can trade one for the other through batching, and a latency number without its throughput context is only half the picture.