Back to Blog
Guides
2026-04-02
11 min read

Why Averages Hide Slow APIs: A Practical Guide to Latency Percentiles

Learn what p50, p95, and p99 actually tell you, how to collect them, and how to avoid common charting mistakes.

By API Timing Editorial Team

If your API average looks healthy but support tickets describe painful slowness, you are probably looking at the wrong statistic. Latency distributions have a long tail. A few very slow requests can be invisible in a mean while being very visible to the people who experienced them.

What a percentile means

The p95 latency is the value below which 95 percent of requests fall. In a set of 100 requests, the fifth slowest request determines the p95. The p99 is the second slowest in that same set. The p50, or median, is the middle request.

Notice what a percentile does not say: it does not tell you the cause, and it does not describe the requests outside the threshold. It is a compact summary of a distribution. For debugging, pair it with a histogram or a trace sample.

A small worked set

Consider nine requests with these durations in milliseconds: 40, 45, 50, 52, 55, 60, 65, 75, 900.

The average is about 149 ms because the 900 ms request pulls it upward. The median is 55 ms. The p95, depending on the interpolation method, sits near the slow end of the ordinary requests rather than at 900 ms. If you alert only on the average, the outlier changes the number dramatically; if you alert only on p50, you may never see it. Looking at both reveals that most requests are fine and a rare path is broken.

With larger samples the outlier becomes easier to see in p99, which is why high-volume services often track p99 for critical endpoints.

Collect percentiles correctly

Do not average percentages from different servers. If one instance reports p95 of 100 ms and another reports p95 of 400 ms, the p95 of the combined traffic is not 250 ms. You need the underlying histogram or the raw durations to recompute it.

A practical approach is to store request durations in histogram buckets and aggregate buckets across instances. Many observability stacks support this directly. If you cannot store histograms, store raw durations for a short window and compute the percentile at query time.

Keep buckets fine enough around your target. Buckets of 0-100 ms, 100-500 ms, and 500 ms and above cannot tell you whether you missed a 200 ms objective by a little or a lot.

Charting mistakes to avoid

  • Plotting a single average line with no distribution context.
  • Mixing successful and failed requests in the same latency chart. A fast error can make latency look better.
  • Combining endpoints with very different workloads. A health check and a report export should not share a percentile.
  • Using a tiny time window. A one-minute p99 with only a handful of requests is unstable.
  • Forgetting cold starts and deploys. Annotate releases so spikes can be explained.

Choosing which percentile to watch

Use p50 to understand the common case. Use p95 for interactive endpoints where most users should see a consistent experience. Use p99 when a small number of slow requests still cause visible harm, such as checkout or authentication.

Set alerts on sustained deviations rather than a single spike. A short burst during a deploy is normal; ten minutes above the threshold deserves attention. Include the request count in the alert so a low-traffic artifact does not page anyone.

Connect the number back to a request

A percentile becomes useful when you can inspect the requests behind it. Log a correlation ID, the route, the status code, key downstream durations, and whether the request was cached. When p99 rises, filter traces from that tail and look for a shared attribute: one region, one customer, one query shape, one dependency.

You can use the bulk tester to compare several endpoints under similar conditions, then open an outlier in the single checker for a phase breakdown. External samples will not replace server-side histograms, but they are useful for reproducing what a user sees.

Summary

Averages are fine for capacity planning and rough trend lines. Percentiles are better for user experience. Collect distributions rather than averages of averages, separate different workloads, and always keep a way to inspect the slow requests themselves.

p95
p99
observability
api performance

Related Tools