To find a quartile rank in Excel, use the PERCENTRANK.INC or PERCENTRANK.EXC function to get a value between 0 and 1, then multiply by 4 to get the quartile number. For example, =PERCENTRANK.INC(A2:A100, B2)*4 returns a quartile rank for the value in B2 relative to the data in A2:A100. Alternatively, use the QUARTILE.INC or QUARTILE.EXC functions to find the cutoff values for each quartile, then compare your data point to those cutoffs.
What Quartile Rank Means
A quartile rank tells you which of four equal groups a value falls into when your data is sorted from smallest to largest. The first quartile (Q1) holds the lowest 25% of values, the second (Q2) is the median, the third (Q3) holds values between the median and the 75th percentile, and the fourth (Q4) holds the top 25%. In Excel, “quartile rank” can refer to two related things: the quartile number (1, 2, 3, or 4) that a specific value belongs to, or a continuous score (like 2.3) that shows where a value sits within the quartile range. Both are easy to compute with built-in functions.
Built-In Quartile Functions
Excel provides four quartile-related functions. The two you’ll use most are QUARTILE.INC and QUARTILE.EXC. Both take an array of values and a quart number (0–4 for INC, 1–3 for EXC). The INC version includes the endpoints (minimum and maximum) as quartiles 0 and 4, while EXC excludes them, giving results that match the “exclusive” method often used in statistics. For example, with data in A2:A101, =QUARTILE.INC(A2:A101, 1) returns the value below which 25% of the data falls. The older QUARTILE function is still available for compatibility but is not recommended for new work.
Using PERCENTRANK for a Rank Score
If you need a continuous quartile rank (like 2.75 meaning “between the third and fourth quartile”), use PERCENTRANK.INC or PERCENTRANK.EXC. These return a percentile between 0 and 1. Multiply by 4 to get a quartile rank. For instance, with scores in B2:B100 and a specific score in C2, the formula =PERCENTRANK.INC(B2:B100, C2)*4 returns a number like 2.5, meaning the value is at the 62.5th percentile, which is in the third quartile. The .EXC version uses a slightly different calculation that never returns 0 or 1, which some statisticians prefer. Both functions require the data to be sorted in ascending order for accurate results, though Excel will handle unsorted data by internally sorting.
Step-by-Step: Assign Quartile Numbers
To label each value in a list with its quartile number (1–4), follow these steps:
- Assume your data is in column A, starting at A2 (A2:A100).
- In B2, enter the formula:
=IF(A2="","",ROUNDUP(PERCENTRANK.INC($A$2:$A$100,A2)*4,0)) - Drag the fill handle down to B100.
- The result will be 1, 2, 3, or 4. Note that values exactly at the minimum get a rank of 1, and the maximum gets 4. If you prefer a 0–4 scale, skip the ROUNDUP and just use
=PERCENTRANK.INC(...)*4.
This method gives each value a whole-number quartile label. For a more precise rank, keep the decimal version.
INC vs. EXC: Which to Choose?
The choice between INC and EXC affects the cutoff values and the rank scores. QUARTILE.INC and PERCENTRANK.INC include the minimum and maximum in the calculation, so the 0th and 4th quartiles are the actual data extremes. EXC versions exclude the endpoints, which can give slightly different cutoffs, especially with small datasets. In practice, for large datasets (over 100 points), the difference is negligible. If you are following a textbook or a specific statistical method, check which one it uses. Excel’s default for the older QUARTILE function is the INC method. For most business and educational uses, INC is fine.
Common Errors and How to Fix Them
Several mistakes trip up users when calculating quartile ranks:
- Unsorted data: While Excel sorts internally, if you use the
MATCHfunction to find a quartile, it will assume sorted data. Always sort or usePERCENTRANKinstead. - Empty cells or text: Functions like
QUARTILEignore text and logical values, but they will return an error if the array is empty. UseIFERRORto handle blanks. - Wrong quart number:
QUARTILE.INCaccepts 0–4, butQUARTILE.EXConly accepts 1–3. Using 0 or 4 with EXC returns a #NUM! error. - Misinterpreting the rank: A quartile rank of 3.2 does not mean “third quartile plus 20%”; it means the value is at the 80th percentile (3.2/4 = 0.8).
To avoid errors, always check the function’s arguments and test with a small sample where you can manually verify the results.
Practical Example: Sales Data
Suppose you have monthly sales figures in A2:A13 (12 values): 100, 120, 130, 150, 160, 180, 200, 210, 230, 250, 280, 300. To find the quartile cutoffs, enter =QUARTILE.INC(A2:A13,1) in C1, =QUARTILE.INC(A2:A13,2) in C2, and =QUARTILE.INC(A2:A13,3) in C3. The results are 137.5, 190, and 245 respectively. So any value below 137.5 is in Q1, between 137.5 and 190 is Q2, between 190 and 245 is Q3, and above 245 is Q4. To get a continuous rank for a value like 200, use =PERCENTRANK.INC(A2:A13,200)*4, which returns approximately 2.67, indicating it’s in the upper part of Q3.
Frequently Asked Questions
Can I use quartile rank with conditional formatting? Yes. Select your data range, go to Home > Conditional Formatting > New Rule > Use a formula, and enter something like =PERCENTRANK.INC($A$2:$A$100,A2)*4>=3 to highlight values in the top quartile. Adjust the range and condition as needed.
What is the difference between quartile and percentile? A percentile is a value below which a certain percentage of data falls. The 25th percentile is the same as the first quartile (Q1). Quartiles are just specific percentiles (25, 50, 75). A quartile rank is a way of expressing a value’s position in terms of quarters, whereas a percentile rank is in terms of hundredths.
Does Excel have a QUARTILE.RANK function? No. There is no single function named QUARTILE.RANK. You must combine PERCENTRANK with multiplication by 4, or use IF statements with QUARTILE.INC to assign quartile numbers. The functions are QUARTILE.INC, QUARTILE.EXC, and PERCENTRANK.INC/EXC.
Why does my PERCENTRANK return #DIV/0!? This happens when the array contains fewer than two numeric values, or when the data range is empty. Ensure you have at least two numbers and that the range does not include only text or blanks. Also, if the value you are looking up is not in the array, PERCENTRANK.INC returns #N/A, not #DIV/0!.
How do I get a quartile rank in Google Sheets? Google Sheets has similar functions: QUARTILE, PERCENTRANK, and PERCENTRANK.EXC. The syntax is the same as Excel’s. For example, =PERCENTRANK(A2:A100,B2)*4. The main difference is that Google Sheets uses the comma as the argument separator, same as Excel on Windows.
Related
- Generate Random Number SQL: RAND, NEWID, and More
- D Cell Battery Diameter: Exact Size & Specs
- Windows 10 Shortcut Keys: The Essential List
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Filter Date Order in Excel: Sort Dates Oldest to NewestTo put Excel dates in order, select a cell in your data and choose Data > Sort Oldest…
- Excel Filter Duplicates in a Column: A Practical GuideYes. In Microsoft Excel for Microsoft 365, add a helper column with =COUNTIF($A$2:$A$100,A2)>1, fill it down, then turn…
- Excel FILTER Function: Return Results Without DuplicatesExcel’s FILTER function does not remove duplicates by itself. To return matching results without repeats, wrap FILTER inside…
- Excel COUNTIF No Duplicates: Count Unique ValuesThe direct answer: Excel has no single “COUNTIF no duplicates” function, but you can count unique values (ignoring…
- How to Copy a Formula in Excel All the Way Down a ColumnTo copy a formula all the way down in Excel, select the cell with the formula and double-click…
- How to Create Round Labels in Word: A Step-by-Step GuideTo create round labels in Word, set up a label sheet using the stock’s template or measurements, place…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.