Files
freeCodeCamp/guide/english/mathematics/statistics/how-to-calculate-percentiles/index.md
GenevieveLS 8473337e8f Expanded article (#24271)
* Expanded article

Expanded article on how to Calculate Percentiles

* Remove 'this is a stub' text
2018-12-06 14:15:26 -06:00

794 B

title
title
How to Calculate Percentiles

How to Calculate Percentiles

We can calculate the kth percentile (where k is any number between zero and one hundred) by first ordering all values in the data set from smallest to largest. Then we can multiply k percent by the total number of values, n.

If n is not a whole number, round it up to the nearest whole number and go to A. If n is a whole number, go to B.

A) Count the values in your data set from left to right (from the smallest to the largest value) until you reach n. The corresponding value in your data set is the kth percentile.

B) Count the values in your data set from left to right until you reach n. The kth percentile is the average of that corresponding value in your data set and the value that directly follows it.