GlobeLatency
GlobeLatency › Learning Center › Measuring and statistics

Percentiles Explained: p50, p95 and p99 Latency

5 min read · Measuring and statistics

In short

A percentile tells you the value below which a given share of measurements fall. p50 is the median, p95 means 95% of requests were this fast or faster, and p99 means 99% were. Percentiles reveal the slow tail that averages hide, which is what users actually notice. They need many samples to be meaningful: with only three passes p95 and p99 simply equal the worst pass.

On this page
  1. Why averages are not enough
  2. What is a percentile?
  3. How to calculate a percentile: the nearest-rank method
  4. How many samples do you need?
  5. Percentiles in GlobeLatency
  6. How to interpret p50, p95 and p99 together
  7. Percentiles and user experience
  8. Service level objectives (SLOs)
  9. Why you cannot average percentiles
  10. Common mistakes and myths
  11. What to do next

Quick answer: a percentile answers the question "how bad is it for the slowest few percent of requests?". If your p95 latency is 120 ms, 95 out of every 100 requests took 120 ms or less, and 5 took longer. p50 is the median (the middle request), p95 is the slow end of normal, and p99 is the very slow end. Averages hide these slow requests; percentiles expose them.

Why averages are not enough

Imagine ten requests: nine take 40 ms and one takes 800 ms. The average is (9 × 40 + 800) / 10 = 116 ms. That number describes none of the requests. Nine were fast; one was awful. A user who loads a page making 50 requests will very likely hit several slow ones, and the page feels slow even though the average looked acceptable.

Latency distributions are almost never bell-shaped. They have a tight cluster of normal values and a long tail of occasional slow ones (queueing, retransmissions, congestion, garbage collection on the server, a Wi-Fi retry). Statisticians call this a skewed or heavy-tailed distribution. For such data, a single average is misleading, and percentiles are the standard tool.

What is a percentile?

The n-th percentile is the value below which n% of the observations fall. Sort all measurements from smallest to largest; the p95 is the value at the position that has 95% of measurements at or before it.

NameAlso calledMeaningTypical use
p0MinimumThe fastest observationThe floor of the path
p50MedianHalf of requests are faster, half slowerA typical request
p909 in 10 requests are at or belowGeneral quality
p9519 in 20 are at or belowCommon service-level target
p9999 in 100 are at or belowCritical paths, tail behaviour
p99.9Three nines999 in 1000 are at or belowVery large services
p100MaximumThe slowest observationWorst case

How to calculate a percentile: the nearest-rank method

There are several definitions of percentile. GlobeLatency uses the nearest-rank method, which is simple and always returns a value that was actually measured.

  1. Sort the N measurements from smallest to largest.
  2. Compute the rank: rank = ceil(P / 100 × N), where P is the percentile you want.
  3. The percentile is the value at that rank (counting from 1).

Worked example with 10 passes

Measured passes (ms): 38, 41, 40, 39, 44, 42, 40, 43, 41, 210. Sorted: 38, 39, 40, 40, 41, 41, 42, 43, 44, 210.

  • p50: rank = ceil(0.50 × 10) = 5, value = 41 ms.
  • p90: rank = ceil(0.90 × 10) = 9, value = 44 ms.
  • p95: rank = ceil(0.95 × 10) = 10, value = 210 ms.
  • p99: rank = ceil(0.99 × 10) = 10, value = 210 ms.
  • Average: 57.8 ms. Median 41 ms. The average is pulled up by one spike; the median shows what is typical.

Worked example with 20 passes

With 20 sorted passes, p95 rank is ceil(0.95 × 20) = 19, so p95 is the 19th lowest value and only the single slowest pass is above it. p99 rank is ceil(0.99 × 20) = 20, the maximum. You need about 100 samples before p99 can differ from the maximum.

How many samples do you need?

Samples (N)p95 rankp99 rankMeaning
333Both equal the worst pass
101010Both equal the worst pass
201920p95 is distinct, p99 is the max
605760p95 skips the three slowest; p99 is the max
1009599Both are distinct and meaningful

This is the honest limitation of short tests: with the default 3 passes the p95 and p99 you see equal the worst pass. They become informative with 20 passes, and p99 only really shines in long-running monitoring.

Percentiles in GlobeLatency

  • Test mode: p95 and p99 are computed over the passes of each destination (1 to 20). Choose 20 passes when you want a useful p95.
  • Map and Monitor: the "95th percentile" in the detail panel is computed over the last up to 60 readings of that destination (about 30 minutes at the default interval).
  • The nearest-rank method is used in both.

See Reading your results and the Monitor guide for where these values appear.

How to interpret p50, p95 and p99 together

PatternWhat it meansTypical cause
p50 ≈ p95 ≈ p99Very consistent connectionWired, uncongested path
p95 about 1.5 to 2 times p50Normal variationTypical home or office network
p95 more than 3 times p50Frequent spikesWi-Fi interference, congestion, bufferbloat
p99 far above p95Rare but severe stallsRetransmissions, route flaps, overloaded server
p50 high, spread smallConsistently slow, not unstableDistance, slow access link, VPN

The "Unstable" flag in Test (worst pass more than 3 times the average) is a quick, short-test cousin of the second-last pattern. For the related idea of variation between consecutive readings, read jitter explained.

Percentiles and user experience

A page that makes 40 requests experiences the maximum of those requests in practice. If each request has a 1% chance of being slow, the chance that at least one of 40 is slow is 1 - 0.99^40 ≈ 33%. So a p99 problem for a single request becomes a "one in three page loads feels slow" problem for a whole page. This is why large services track tail percentiles and not averages. For websites and APIs see latency for websites and APIs; for real-time use see latency for gaming and video calls and VoIP.

Service level objectives (SLOs)

Teams often write goals such as "p95 under 200 ms and p99 under 500 ms over 30 days". Such statements are meaningful because they bound the slow tail, which average-based goals cannot. If you operate a site or API, measure from users' locations, not just from the data centre, because network latency adds to server time. A test from a few regions with custom destinations is a good start.

Why you cannot average percentiles

A common mistake: computing the average of p95 values from several servers or days to get an overall p95. That is mathematically invalid. Percentiles must be computed from the pooled raw samples (or from properly merged histograms). Averaging p95s usually understates the true tail.

Common mistakes and myths

  • "p99 is the worst case." No, p100 (the maximum) is. p99 ignores the slowest 1%.
  • "p95 from a three-pass test is reliable." It equals the worst pass.
  • "The average is always fine to use." Not when the distribution has a tail, which is almost always the case with latency.
  • "Lower percentiles mean lower averages." Not necessarily; the relationship depends on the shape of the distribution.
  • Averaging percentiles across hosts or time periods.

What to do next

Compare central measures in mean, median, min and max, learn what causes spikes in jitter and bufferbloat, and then run a 20-pass test to see your own p95.

Frequently asked questions

What does p95 latency mean?

p95 latency is the value that 95 percent of measurements were at or below. If p95 is 120 ms, then 19 out of 20 requests finished in 120 ms or less and about 1 in 20 was slower. It describes the slow end of normal behaviour without being dominated by a single freak outlier.

What is the difference between p95 and p99?

p99 looks further into the tail. It is the value 99 percent of requests stay under, so only 1 in 100 is slower. p99 is more sensitive to rare spikes and needs more samples to be stable. Many teams watch p95 for general quality and p99 for critical paths.

Is p50 the same as the average?

No. p50 is the median, the middle value when sorted. The average adds everything and divides by the count, so one huge spike raises it while the median barely moves. When data is skewed, which latency usually is, the median is a better picture of a typical request.

Why are p95 and p99 equal to the worst value in a short test?

With nearest-rank calculation and few samples, the rank for 95 or 99 percent rounds up to the last value. For example with 3 passes both ranks are 3, which is the maximum. You need roughly 20 passes for p95 and 100 for p99 to say something distinct.

Which percentile should I care about for gaming or calls?

For real-time use the slow tail matters more than the average. A p95 close to the average means a steady connection. A p95 two or three times the average means regular stutters even when the average looks fine.

How does GlobeLatency calculate percentiles?

It uses the nearest-rank method over the passes of one destination in a Test, and over the last up to 60 readings of that destination in Map and Monitor.

See your own numbersFree, in your browser, no signup.
Run a latency testLive map

Related guides