Performance Testing (PTS) reports use percentiles to summarize data distributions. Percentiles describe user experience more accurately than averages because they are not skewed by outliers.
Why percentiles matter more than averages
An average response time can be misleading. If 99 requests complete in 100 ms but one request takes 10,000 ms, the average is 199 ms -- a number that represents almost none of the actual requests. The average masks the fact that one user experienced a significantly degraded response.
Percentiles answer a different question: *What response time did a specific proportion of requests complete within?*
For example, a 95th percentile (p95) of 250 ms means 95% of requests completed in 250 ms or less. The remaining 5% took longer.
How to calculate percentiles
To calculate a percentile:
Sort all response time values in ascending order.
Find the value at the position that corresponds to the desired percentage.
Example: Given 100 response time samples sorted in ascending order:
| Percentile | Position in sorted list | Meaning |
|---|---|---|
| 50th (p50) | 50th value | Half of all requests completed faster than this value (the median) |
| 95th (p95) | 95th value | 95% of requests completed faster than this value |
| 99th (p99) | 99th value | 99% of requests completed faster than this value |
Which percentile to use
Different percentiles serve different purposes:
| Percentile | Best for | Typical use |
|---|---|---|
| p50 (median) | General performance baseline | Represents the typical request |
| p90 | Detecting slower requests | Catches issues that affect 1 in 10 users |
| p95 | SLO and SLA targets | The most common threshold for performance acceptance criteria |
| p99 | Tail latency analysis | Reveals worst-case latency in high-traffic services |
For most performance tests, p95 is the standard threshold.
When percentiles may not apply
Percentile-based analysis assumes that a small percentage of slow or failed requests is acceptable. This assumption does not hold in every context.
For example, financial payment processing may require a 100% success rate. In that scenario, percentile-based summaries that tolerate a small failure rate are insufficient. Evaluate every request individually instead.