# What is the percentile?

Computes the value at any percentile of a list of numbers, by the NIST, Excel inclusive, or nearest-rank method, and the percentile rank of a value.

- Page: https://www.acalculator.org/statistics/percentile-calculator
- JSON spec: https://www.acalculator.org/statistics/percentile-calculator.json
- Version: 6a3295255d1e

## Default answer

Example with the default inputs (Your numbers [12, 15, 18, 20, 22, 25, 28, 30, 35, 40], Find the value at percentile 90, Percentile method NIST (N + 1), Find the percentile of value 25): Percentile 90 of your 10 numbers is 39.5, and the value 25 is at percentile rank 55.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| data | Your numbers | The numbers, separated by commas, spaces, semicolons, or new lines. |
| p | Find the value at percentile | The percentile to find, from 0 to 100: 90 for the 90th percentile. Leave empty to skip. |
| method | Percentile method | How the position in the sorted list is found: (N + 1)p as in the NIST handbook, 1 + (N − 1)p as in Excel’s PERCENTILE.INC, or the nearest rank ⌈Np⌉. |
| x | Find the percentile of value | A value whose percentile rank in your numbers you want. Leave empty to skip. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| value | Value at the percentile | The value at the chosen percentile of your numbers, by the chosen method. |
| position | Position in the sorted list | Where the percentile falls in the sorted list, counting from 1; a fraction means between two numbers. |
| rank | Percentile rank of the value | The percent of your numbers below the value, counting numbers equal to it as half: (B + 0.5E) ÷ N × 100. |
| below | Percent below the value | The percent of your numbers that are less than the value. |
| atOrBelow | Percent at or below the value | The percent of your numbers that are less than or equal to the value. |
| count | Count (N) | How many numbers are in the list. |

## Method

Sort the N numbers. Position = (N + 1)p (NIST), 1 + (N − 1)p (Excel inclusive), or ⌈Np⌉ (nearest rank); value = x[k] + d × (x[k + 1] − x[k]) for position k + d. Percentile rank of x = (B + 0.5E) ÷ N × 100.

## Assumptions

- Positions below 1 give the smallest number, and positions at or above N give the largest (NIST §7.2.6.2).
- In the percentile rank, B counts the numbers below the value and E the numbers equal to it.
- The arithmetic is exact on the decimals you type, then rounded once for display.

## Worked examples

1. data = 95.1772 or 95.1567, p = 90, method = nist gives value = 95.19807, position = 11.7. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm (95.1981).
2. data = 95.1772 or 95.1567, p = 90, method = excel gives value = 95.19568, position = 10.9. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm (95.1957 for the Excel definition).
3. data = 18 or 21, p = 70, method = nist, x = 58 gives value = 64, position = 21, rank = 63.793103, below = 62.068966%, atOrBelow = 65.517241%. Source: OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data. https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data (70th percentile 64; 58 is at (18 + 0.5) ÷ 29 × 100 = 63.80).
4. data = 12 or 15, p = 90, method = nist, x = 25 gives value = 39.5, position = 9.9, rank = 55, below = 50%, atOrBelow = 60%. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm.
5. data = 12 or 15, p = 90, method = nearest gives value = 35, position = 9. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm.
6. data = 12 or 15, p = 95, method = nist gives value = 40, position = 10.45. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm (for k ≥ N, the largest value).

## FAQ

### What is a percentile?

The pth percentile is a value with about p percent of the data at or below it. The median is the 50th percentile, and the 90th percentile is a value that about 90% of the numbers do not exceed.

### How do I calculate a percentile?

Sort the numbers and find the position (N + 1) × p, where p is the percentile as a fraction. For the 90th percentile of 10 numbers the position is 11 × 0.9 = 9.9: 90% of the way from the 9th number to the 10th. If the 9th is 35 and the 10th is 40, the 90th percentile is 35 + 0.9 × 5 = 39.5.

### Why do different calculators give different percentiles?

There is no single definition. The NIST handbook uses the position (N + 1)p, Excel’s PERCENTILE.INC uses 1 + (N − 1)p, and the nearest-rank method takes the ⌈Np⌉th number with no interpolation. For large lists they agree closely; for short lists they can differ. Pick the method your course or software uses.

### What is a percentile rank?

The percentile rank of a value is the percent of the data below it, counting values equal to it as half: (B + 0.5E) ÷ N × 100, where B is the count below and E the count equal. With 29 ages, 18 of them below 58 and one equal to 58, the rank of 58 is (18 + 0.5) ÷ 29 × 100 = 63.8.

### What is the difference between a percentile and a percentage?

A percentage is a share of a whole, like 85% of the questions right. A percentile compares one result with everyone else’s: scoring at the 85th percentile means doing as well as or better than about 85% of the group, whatever your raw score.

### Is the 25th percentile the same as the first quartile?

They measure the same idea, but quartile methods and percentile methods do not always agree on short lists. The NIST percentile at 25 and the TI-84 first quartile can differ; for large lists they are close.

## Sources

- NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm
- OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data (percentile of a value). https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data
- Hyndman and Fan, Sample Quantiles in Statistical Packages, The American Statistician, 1996 (definitions 6 and 7). https://doi.org/10.1080/00031305.1996.10473566
