How to Percentile Function in Excel

Learn multiple Excel methods to percentile function with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Percentile Function in Excel

Why This Task Matters in Excel

In every data-driven role—finance, marketing, sales, engineering, healthcare, education—there comes a moment when you need to understand how one value compares with all the others. Is a student’s score high enough to be in the top 10 percent? Which production batches fall in the lowest 5 percent and might need rework? Percentile analysis answers these questions quickly and objectively, allowing professionals to benchmark performance, identify outliers, and set defensible thresholds.

Percentiles are core to disciplines such as quality control, where engineers monitor whether a product metric stays within the 95th percentile; human resources, which uses the 50th or 75th percentile to establish salary bands; and customer analytics, where marketers segment “top-spending” customers by the 90th percentile of revenue per account. Because Excel remains the default analytics tool in many organizations, the ability to calculate percentiles rapidly within a spreadsheet keeps analysis close to the data source and reduces transfer errors between systems.

Beyond direct comparison, percentile calculations feed into dashboards, conditional formatting, and statistical models. Visualisations like box-and-whisker charts use percentiles to draw the whiskers. Conditional formatting rules often highlight values above the 95th percentile to flag exceptional performance. And advanced users may integrate percentiles into Monte Carlo simulations to model risk scenarios.

Failing to master percentile techniques can lead to misinterpreting distributions, basing decisions on averages that hide extreme values, or manually sorting data—an error-prone, time-consuming practice. Learning Excel-based percentile methods therefore extends your analytical toolkit, ensures decisions are data-driven, and connects seamlessly with other Excel functions such as PERCENTRANK, QUARTILE, MEDIAN, and FILTER.

Best Excel Approach

Excel offers two core worksheet functions to compute percentiles:

=PERCENTILE.INC(array,k)

and

=PERCENTILE.EXC(array,k)

PERCENTILE.INC (inclusive) includes the first and last data points when calculating interpolation, matching the statistical definition that the 0th percentile equals the minimum and the 100th equals the maximum. PERCENTILE.EXC (exclusive) excludes those end points and instead follows a slightly different algorithm favored in certain academic contexts. Most business users choose PERCENTILE.INC because it produces intuitive boundaries (minimum and maximum equal 0 percent and 100 percent).

When should you use which?

  • Choose PERCENTILE.INC when presenting percentiles to non-statisticians, creating dashboards, or ensuring boundaries include actual data extremes.
  • Choose PERCENTILE.EXC when replicating specific statistical software (for example, SAS) or following mandates in clinical research protocols.

Both functions require only two arguments:

=PERCENTILE.INC(array, k)
  • array – the data set, supplied as a range like [B2:B101] or an explicit array constant inside a formula.
  • k – the desired percentile expressed as a decimal from 0 to 1 (e.g., 0.9 for the 90th percentile).

Alternative approaches include the legacy PERCENTILE function (still available for compatibility), the newer dynamic array function PERCENTILE.EXC, and manual interpolation techniques with RANK and LINEST. In most cases, however, PERCENTILE.INC covers the practical requirements with minimal complexity.

Parameters and Inputs

The accuracy of percentile calculations relies on proper input handling:

  • Data Type: array must consist of numeric values. Text, logical TRUE/FALSE, or errors within the range trigger #NUM! or #VALUE! results. Clean your data with FILTER, VALUE, or LET before calling the percentile function.

  • k Parameter: Accepts a real number from 0 to 1. Users often type 90 thinking the function expects a percentage. In fact, 90 yields the 9000th percentile and triggers an error. Always divide whole-number percentages by 100 or reference a cell that already contains a decimal such as 0.9.

  • Sorting: The functions do not require sorted data—they handle sorting internally—yet supplying a sorted range simplifies manual checks and debugging.

  • Missing Data: Blank cells are ignored. However, zeros are treated as legitimate numeric values. VERIFY that zeros truly represent valid data and not missing entries; otherwise, replace them with blanks or use FILTER.

  • Edge Cases: For data sets under four points, PERCENTILE.EXC returns #NUM! for most k values because its algorithm cannot interpolate within such a small sample. Switch to PERCENTILE.INC or expand the data set.

  • Large Data Sets: Arrays beyond one million rows may approach memory limits. Use Excel Tables or Power Query to manage datasets efficiently, and consider aggregating data before the percentile calculation if possible.

Step-by-Step Examples

Example 1: Basic Scenario — Test Scores

Imagine a teacher with 30 exam results in [B2:B31] who wants to know the 90th percentile to reward top performers.

  1. Enter the scores in [B2:B31].
  2. In D2, type the desired percentile as a decimal: 0.9. Label C2 “Percentile”.
  3. In E2, enter:
=PERCENTILE.INC(B2:B31, D2)

Excel returns, for example, 88.4. Any student scoring above 88.4 is in the top 10 percent.
Why it works: PERCENTILE.INC sorts the array internally, computes the position with (n – 1) *k + 1, interpolates if the position is not an integer, and outputs the precise boundary.

Variations:

  • Swap 0.9 for 0.5 to compute the median (50th percentile).
  • Use a whole-number cell (90) in D2 and compute k as D2/100 inside the formula.
  • Use conditional formatting: Home → Conditional Formatting → Greater Than… and link to the result in E2 to highlight top scores instantly.

Troubleshooting: If the formula returns #NUM!, verify k is between 0 and 1. If #VALUE!, check for text in [B2:B31].

Example 2: Real-World Application — Sales Performance Dashboard

A regional sales manager tracks monthly revenue for 240 representatives in [C2:C241] and wants a dashboard gauge showing the 25th, 50th, and 75th percentiles.

Step-by-step:

  1. Convert the raw data into an Excel Table named tblSales for dynamic resize advantages.
  2. In the dashboard sheet, label cells A2:A4 as “25th”, “Median”, “75th”.
  3. In B2:
=PERCENTILE.INC(tblSales[Revenue], 0.25)
  1. In B3:
=PERCENTILE.INC(tblSales[Revenue], 0.5)
  1. In B4:
=PERCENTILE.INC(tblSales[Revenue], 0.75)

These values become the quartiles for a speedometer chart or other visualization. Because a Table reference is used, new sales rows automatically update the percentiles—no manual range adjustment necessary.

Integration tips:

  • Combine with SPARKLINE in C2:C4 to create tiny bar charts showing percentile thresholds.
  • Add a slicer connected to the Table for filters by territory; the percentile formulas will recalculate instantly.

Performance note: Excel recalculates three percentiles over 240 rows almost instantly. For hundreds of thousands of rows, switch calculation mode to Manual or summarize data in Power Pivot first.

Example 3: Advanced Technique — Rolling 95th Percentile with Dynamic Arrays

A network analyst monitors response times logged every second in column A. To trigger alerts, she needs the rolling 95th percentile over the last 1000 data points, recalculating each second.

Requirements: Office 365 or Excel 2021 for dynamic arrays.

  1. Range [A2:A2001] holds the most recent 2000 measurements; the newest value enters A2 and the list spills downward.
  2. In B2, enter the LET function:
=LET(
  data, A2:INDEX(A:A,COUNTA(A:A)+1),
  window, 1000,
  tail, DROP(data, -window),
  PERCENTILE.INC(tail, 0.95)
)

Explanation:

  • data identifies the used range.
  • window sets the rolling window size.
  • DROP keeps only the last 1000 rows.
  • Finally, PERCENTILE.INC computes the 95th percentile.

Edge handling: When fewer than 1000 points are logged, DROP would eliminate all data, generating an error. Wrap DROP with IF to check row count first:

=IF(COUNTA(A:A)<1000,"Insufficient data", previous_formula)

Professional tips: Use conditional formatting to color the percentile cell red when it exceeds a service-level threshold. Include this value in a Power BI dashboard via Excel’s underlying file or ODBC connection.

Tips and Best Practices

  1. Store your k values (0.1, 0.25, 0.5, 0.9) in clearly labeled cells and reference them in formulas. This makes updating percentile thresholds simple and transparent.
  2. Convert data ranges to Excel Tables so the percentile formula expands automatically with new entries, reducing maintenance.
  3. Combine percentiles with FILTER to analyze subsets—e.g., calculate the 95th percentile only for “High Priority” incidents.
  4. Use the LET function to name sub-ranges inside one complex formula; this improves readability and performance by avoiding repeated calculations.
  5. For presentation, round percentile results with ROUND, but keep an unrounded version hidden for precise comparisons.
  6. Document in a comment or adjacent cell whether you used the inclusive or exclusive version. Future analysts will thank you.

Common Mistakes to Avoid

  1. Supplying a whole number like 90 instead of 0.9 for k leads to #NUM! errors. Always divide by 100 or store decimals from the start.
  2. Attempting to use PERCENTILE.EXC with fewer than four data points returns #NUM!. Use PERCENTILE.INC or wait until more data accumulates.
  3. Leaving text such as “n/a” in numeric ranges causes #VALUE!. Clean with VALUE or remove non-numeric entries before running the calculation.
  4. Assuming PERCENTILE.INC and PERCENTILE.EXC yield identical results. The two functions can differ noticeably in small samples—choose intentionally.
  5. Forgetting to lock ranges (using absolute references) in copied formulas can cause silent miscalculations when references shift. Use F4 to anchor ranges like $B$2:$B$101.

Alternative Methods

Percentiles can be achieved through several Excel routes. The table below contrasts the main options:

MethodFormula ExampleProsCons
PERCENTILE.INC=PERCENTILE.INC([Range],0.9)Intuitive, includes extrema, compatible with most needsSlightly slower on very large arrays than manual methods
PERCENTILE.EXC=PERCENTILE.EXC([Range],0.9)Matches some statistical packagesFails on small datasets, confusing to casual users
Legacy PERCENTILE`=PERCENTILE(`[Range],0.9)Works in older Excel versionsObsolete, may disappear, no .INC/.EXC clarity
Manual RANK + INTERPOLATERequires LINEST or custom mathTransparent algorithm, educationalTedious, error-prone, slower development
Power Query PercentilesUse Group By → StatisticsHandles millions of rows, repeatable ETLOutputs static results to sheet, refresh required

When speed with millions of rows matters, Power Query or Power Pivot may outperform worksheet formulas. However, for interactive dashboards and moderate data sizes, PERCENTILE.INC remains the quickest route.

Migration strategy: Begin with worksheet formulas during prototyping. If the workbook slows down, rebuild the percentile step in Power Query and load the summarized results back to Excel.

FAQ

When should I use this approach?

Use worksheet percentile functions when you need immediate, interactive feedback and your data fits comfortably within Excel’s row limit. Dashboards, ad-hoc analysis, and quick what-if scenarios benefit the most.

Can this work across multiple sheets?

Yes. Supply a 3-D reference like = PERCENTILE.INC(‘Jan:Dec’!B2:B101,0.9) if sheets share identical layouts, or aggregate ranges with CHOOSE or INDIRECT. Be mindful that INDIRECT is volatile and can slow large workbooks.

What are the limitations?

Percentile functions ignore non-numeric cells but treat zeros as valid data, which can distort results. They also recalculate fully on every change, potentially slowing large files. PERCENTILE.EXC is unsuitable for very small datasets.

How do I handle errors?

Wrap formulas in IFERROR:

=IFERROR(PERCENTILE.INC([Range],k),"Check input")

Alternatively, pre-filter data with FILTER to remove blanks and errors before the percentile calculation.

Does this work in older Excel versions?

Excel 2007–2010 include the legacy PERCENTILE function. PERCENTILE.INC and PERCENTILE.EXC arrived in Excel 2010. If distributing to very old versions, stick with PERCENTILE or calculate in CSV-friendly code.

What about performance with large datasets?

For hundreds of thousands of rows, use the following tactics:

  • Store data in a Table and switch Calculation to Manual during massive updates.
  • Summarize or sample data in Power Query before loading to the sheet.
  • Avoid volatile functions (OFFSET, INDIRECT) near percentile formulas.

Conclusion

Mastering percentile calculations in Excel unlocks a deeper layer of insight than simple averages. Whether you are rewarding top students, benchmarking salaries, or monitoring system latency, percentiles let you set precise, data-driven thresholds. By learning the inclusive versus exclusive algorithms, understanding k inputs, and applying practical techniques like dynamic arrays and Tables, you elevate your analytical fluency. Continue experimenting: integrate percentiles with conditional formatting, incorporate them into charts, and explore Power Query for heavy data lifting. With these skills, you are well on your way to more robust, defensible data analysis in Excel.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.