Latency Percentile Calculator
Paste latency samples in milliseconds for p50 to p99.9 by interpolation or nearest rank, plus mean, standard deviation and median-based outliers. How it works
Use the Latency Percentile Calculator
About the Latency Percentile Calculator
p95 latency is the response time that 95% of requests were at or below; p99 covers 99%, and p50 is the median. This latency percentile calculator sorts the samples you paste and reads each percentile by linear interpolation at rank (p / 100) × (n − 1), the same method as Excel PERCENTILE.INC, so the 20 example samples give p95 310.25 ms. A nearest-rank option returns an observed sample instead (305 ms), and it also flags slow outliers with a median-based rule.
Statistics for the 20 sample latencies on the page
| Statistic | Value |
|---|---|
| Count | 20 |
| Min | 95 ms |
| Max | 410 ms |
| Mean | 186.8 ms |
| Median (p50) | 170 ms |
| p95 | 310.25 ms |
| p99 | 390.05 ms |
| Standard deviation (population) | 69.328638 ms |
| MAD | 28.5 ms |
| Outlier threshold | 275.63525 ms |
| Outliers | 305 ms, 410 ms |
Samples: 120, 145, 132, 178, 210, 95, 188, 165, 142, 250, 305, 138, 156, 199, 230, 175, 410, 162, 148, 188 ms. Computed with the tool’s own functions.
When p95 and p99 stop being a blend of the two largest samples
| Samples | p95 is a blend of the top two | p99 is a blend of the top two |
|---|---|---|
| 5 | Yes | Yes |
| 10 | Yes | Yes |
| 20 | Yes | Yes |
| 21 | No | Yes |
| 50 | No | Yes |
| 100 | No | Yes |
| 101 | No | No |
| 1000 | No | No |
A percentile between the two largest samples says little more than the maximum. The page shows a note when this applies.
The 20 sample latencies by each percentile method
| Percentile | Linear interpolation | Nearest rank |
|---|---|---|
| p50 | 170 ms | 165 ms |
| p75 | 201.75 ms | 199 ms |
| p90 | 255.5 ms | 250 ms |
| p95 | 310.25 ms | 305 ms |
| p99 | 390.05 ms | 410 ms |
| p99.9 | 408.005 ms | 410 ms |
Nearest rank returns the sample at rank ceil(p / 100 × n), so every value is a latency in the list. Computed with the tool’s own functions.
How to use this tool
- Paste latency samples in milliseconds, separated by spaces, new lines, semicolons or commas. The 20-sample example is there when you first open the page.
- Pick a percentile method (linear interpolation or nearest rank) and, if you need one more, type a custom percentile such as 99.5.
- Read the p50, p75, p90, p95, p99 and p99.9 cards, your custom percentile, then the count, min, max, mean, median, standard deviation and MAD.
- Read the outlier threshold and the list of samples above it. If the MAD is 0 the page says the rule cannot be applied.
- Press Copy Results for a text report. Example loads the 20 sample latencies again; Clear Saved Values deletes the samples saved in this browser.
Frequently asked questions
- How do you calculate p95 and p99 latency?
- Sort the samples, then find the value at zero-based rank (p / 100) × (n − 1), interpolating between neighbors. For 1, 2, 3, 4, 5 the p95 rank is 0.95 × 4 = 3.8, so p95 is 4 + 0.8 × (5 − 4) = 4.8. Use the raw per-request times, not averages per minute: a percentile of averages hides the slow requests.
- How many samples do I need for a reliable p99?
- More than 100. With 100 samples or fewer, p99 is interpolated between the two largest and says little more than the maximum; the table shows the change at 101. p95 has the same problem up to 20 samples. The page shows a note while this applies.
- Why does my p95 differ from another calculator?
- Percentile methods differ. This tool uses linear interpolation at rank (p / 100) × (n − 1) by default. The NIST handbook sets p(N+1) = k + d and takes the maximum at or beyond the rank N/(N+1), so for 1, 2, 3, 4, 5 it gives p95 = 5, not 4.8. Switch the method to nearest rank to get an observed sample instead, the sample at rank ceil(p / 100 × n): for 1 to 10, p95 is 9.55 by interpolation and 10 by nearest rank.
- How does the tool decide which samples are outliers?
- A sample is an outlier when it is above the median + 2.5 × 1.4826 × MAD, where MAD is the median absolute deviation. Only slow samples are flagged. For 100, 100, 100, 100, 1000 the MAD is 0, so no rule applies and nothing is flagged, though the maximum and p99 still show the 1000.
- What input does it accept?
- Plain non-negative decimals such as 120, 12.5 or 1e3, separated by whitespace, semicolons or commas. A word, a negative number, +5 or 0x10 is counted as invalid and ignored. 12,5 with no space is not read as a decimal and is not used; write 12.5, or 12, 5 for two samples. Each sample can be up to 1,000,000,000 ms and up to 100,000 are used.
- Is the standard deviation for a sample or a population?
- Population: the sum of squared differences from the mean is divided by n, not n − 1. For the 20 samples on the page it is 69.328638 ms.
Related Tools
View all toolsAPI Rate Limit Calculator
Enter an API rate limit, its window in seconds, minutes, hours or days, and the requests used and queued to get percent used, requests left and pacing.
URL Encoder/Decoder
Percent-encode or decode text as you type: one value with encodeURIComponent or a whole URL with encodeURI, and an option to read + as a space.
HTTP Headers Viewer
See the request headers an echo service (httpbin.org) receives from one fetch by this page, or by your own URL. Copy as cURL, fetch(), Python or .env.
Z-Index Stacking Context Debugger
Check which CSS properties make an element a stacking context (position, z-index, opacity, transform, isolation) and where its z-index counts.
Number Base Converter
Convert a whole number between binary, octal, decimal and hexadecimal and see all four at once: 255 is 11111111, 377 and FF.
Subnet Mask Cheat Sheet
Subnet mask table for every IPv4 prefix from /0 to /32: dotted mask, wildcard, total and usable hosts, with /31 counted as 2 (RFC 3021) and /32 as 1.