Compatibility
PERCENTILE
Matches all 6 recorded answers
Recorded: 6 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | PERCENTILE |
| Bulgarian | PERCENTILE |
| Czech | PERCENTIL |
| Danish | FRAKTIL |
| German | PERCENTILE |
| Greek | PERCENTILE |
| English (Australia) | PERCENTILE |
| English (United Kingdom) | PERCENTILE |
| English (United States) | PERCENTILE |
| Spanish | PERCENTIL |
| Estonian | PERCENTILE |
| Finnish | PROSENTTIPISTE |
| French | CENTILE |
| Hebrew | PERCENTILE |
| Croatian | PERCENTILE |
| Hungarian | PERCENTILIS |
| Indonesian | PERCENTILE |
| Italian | PERCENTILE |
| Japanese | PERCENTILE |
| Korean | PERCENTILE |
| Lithuanian | PERCENTILE |
| Latvian | PERCENTILE |
| Norwegian | PERSENTIL |
| Dutch | PERCENTIEL |
| Polish | PERCENTYL |
| Portuguese (Brazil) | PERCENTILE |
| Portuguese (Portugal) | PERCENTIL |
| Romanian | PERCENTILE |
| Russian | ПЕРСЕНТИЛЬ |
| Slovak | PERCENTILE |
| Slovenian | PERCENTILE |
| Serbian (Latin) | PERCENTIL |
| Swedish | PERCENTIL |
| Thai | PERCENTILE |
| Turkish | YÜZDEBİRLİK işlevi |
| Ukrainian | PERCENTILE |
| Vietnamese | PERCENTILE |
| Chinese (Simplified) | PERCENTILE |
| Chinese (Hong Kong) | PERCENTILE |
| Chinese (Traditional) | PERCENTILE |
Names from Microsoft's support site.
What it does
PERCENTILE(array, k)
PERCENTILE(array,k) returns a value at a fractional position in sorted numeric observations. This compatibility function uses the inclusive convention: k=0 is the minimum, k=1 the maximum, and k=0.5 the median. Supply a fraction such as 0.25 or a numeric 25%, not the number 25.
Try it
=PERCENTILE({10,20,30,40},0.25) returns 17.5. Its position is 1.75, between the first and second sorted observations.
=PERCENTILE({40,10,30,20},0.25) has the same value: input order does not define the percentile. At k=0 and k=1, the same data returns 10 and 40. The exclusive convention applied at 0.25 returns 12.5, so the percentile convention is part of the question.
Quirks
An empty numeric set gives #NUM!. A fraction outside [0,1] gives #NUM!; nonnumeric k gives #VALUE!. Referenced text, logical values and blanks do not become extra numeric observations, while a numeric zero does. Duplicate numbers remain separate observations: do not deduplicate a data set before finding its percentile.
The current helper returns the sole observation for any admitted k when n=1. Interpolated answers need not occur in the source data. This is a different operation from returning the nearest observed value or taking a median of hand-selected halves.
How to implement
- Collect the numeric observations using the function’s admission rules and reject an empty set. Validate
0<=k<=1. - Sort ascending, retaining repeated observations. For one observation, return it.
- Form the one-based rank
h=1+k*(n-1)in the current binary64 operation order. - Let
j=floor(h). If the rank is integral, return sorted observationj, converting the one-based position to a zero-based index as needed. - Otherwise store
f=h-jand interpolatelower+f*(upper-lower)between observationsjandj+1.
For four observations and k=0.25, h=1.75, f=0.75 and the result is 10+0.75*(20-10)=17.5. These steps specify the indexing and interpolation. It does not identify every Excel rounding boundary: the current helper uses binary64 arithmetic, and algebraically rearranging the interpolation changes its numerical candidate.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
PERCENTILE · 1 lines · calc-func/src/catalogue/statistics.rs on GitHub14 percentile_legacy "PERCENTILE" (2, 2) [R "array", V "k"] |s, a, sv| { percentile(s, a, sv, false) }
Kernels shared with other functions
listcatalogue/statisticspercentilecatalogue/statisticspercentile_inc_kernelported/percentile_commonpercentile_exc_kernelported/percentile_commoninterpolate_sortedported/percentile_common
Argument and result plumbing
No implementation has been published with a Handbook test suite for this function.
Version differences
No same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.
Alternatives
PERCENTILE.INC names the inclusive convention explicitly; PERCENTILE.EXC uses the exclusive one. QUARTILE selects a multiple of one quarter.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents