6 C
London
Tuesday, March 11, 2025
HomeExcelDescriptive Statistics in ExcelHow to Perform a Percentile IF Function in Excel

How to Perform a Percentile IF Function in Excel

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formula to perform a Percentile IF function in Excel:

=PERCENTILE(IF(GROUP_RANGE=GROUP, VALUES_RANGE), k)

This formula finds the kth percentile of all values that belong to a certain group.

When you type this formula into a cell in Excel, you need to press Ctrl + Shift + Enter since this is an array formula.

The following example shows how to use this function in practice.

Example: Percentile IF Function in Excel

Suppose we have the following dataset that shows the exam score received by 20 students who belong to either class A or class B:

Now suppose we’d like to find the 90th percentile of the exam scores for each class.

To do so, we can use the =UNIQUE() function to first create a list of the unique class names. We’ll type the following formula into cell F2:

=UNIQUE(B2:B21)

Once we press enter, a list of unique class names will be displayed:

Next, we can use the =PERCENTILE() function to find the 90th percentile of exam scores in each class.

We’ll type the following formula into cell G2 and press Ctrl + Shift + Enter so Excel knows this is an array formula:

=PERCENTILE(IF(B2:B21=F2, C2:C21), 0.9)

Percentile IF in Excel

We’ll then copy and paste this formula into the remaining cells in column G:

From the output we can see:

  • The value at the 90th percentile of exam scores in class A was 93.2.
  • The value at the 90th percentile of exam scores in class B was 89.8.

Note: We chose to calculate the 90th percentile, but you can calculate any percentile you’d like. For example, to calculate the 75th percentile of exam scores for each class you can replace 0.9 with 0.75 in the formula.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

How to Calculate a Five Number Summary in Excel
How to Calculate the Mean and Standard Deviation in Excel
How to Calculate the Interquartile Range (IQR) in Excel

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories