PERCENTILE Function
Returns the value at a given percentile (k from 0 to 1, inclusive).
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| array | The range or array of numeric values. | Required |
| k | The percentile value, a number between 0 and 1 inclusive (e.g. 0.5 for the median). | Required |
Basic Example
Median (50th percentile) of four values
=PERCENTILE({1,2,3,4}, 0.5)Using the inclusive method the rank is 1 + 0.5*(4-1) = 2.5, interpolated between 2 and 3 to give 2.5.
Advanced Examples
Example 1: 25th percentile with exact position
Five evenly spaced valuesWhen the computed rank lands on an integer, the value at that position is returned.
=PERCENTILE({1,2,3,4,5}, 0.25)Example 2: 75th percentile with interpolation
Fractional rank between two valuesA non-integer rank is linearly interpolated.
=PERCENTILE({1,2,3,4}, 0.75)How PERCENTILE Works
PERCENTILE uses the inclusive (INC) method. It calculates a rank position as 1 + k*(n-1), where n is the count of values, then interpolates linearly between the surrounding sorted values. k must be between 0 and 1 inclusive; k=0 returns the minimum and k=1 returns the maximum. This function is equivalent to PERCENTILE.INC. Text and logical values in the array are ignored.
Important Notes & Limitations
k must be between 0 and 1 inclusive; values outside this range cause #NUM!.
May linearly interpolate between data points, returning a value not present in the data.
Ignores text and logical values in the array.
Common Errors & Fixes
#NUM! errork is less than 0 or greater than 1, or the array is empty.Fix: Use a k value between 0 and 1 and ensure the range contains numbers.
Unexpected decimal resultInterpolation between two data points is by design.Fix: This is expected; the percentile need not be an actual data value.
Download Practice File
PERCENTILE
percentilePractice PERCENTILE with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the PERCENTILE function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps