The Excel PERCENTRANK Function

PERCENTRANK & PERCENTRANK.INC Functions

In Excel 2010, the Percentrank function has been replaced by the Percentrank.Inc function.

Although it has been replaced, the Percentrank function is still available in Excel 2010 (stored in the list of compatibility functions), to allow compatibility with earlier versions of Excel.

However, the Percentrank function may not be available in future versions of Excel, so it is advised that you use the Percentrank.Inc function if possible.

Related Functions:
PERCENTILE

Function Description

The Excel Percentrank function calculates the relative position of a specified value, within a set of values, as a percentage.

The syntax of the function is:

PERCENTRANK( array, x, [significance] )

Where the function arguments are listed in the table below:

array - The array of values within which you want to find the relative position of a specific value.
x -

The value that you want to calculate the relative position of.

(x must be within the range of the values in the supplied array, but it does not need to be exactly equal to one of the values. If x is not found in the array, the array values are interpolated to calculate the percentage rank).
[significance] -

An optional argument that specifies the number of significant digits that the returned percentage value is rounded to.

(By default the returned percentage value is accurate to 3 significant digits).


Percentrank Function Examples

In cells B1-B4 of the spreadsheet below, the Excel Percentrank Function is used to calculate the relative position of various values within the array of values in cells A1-A9.

 Formulas:
  A B
1 1 =PERCENTRANK( A1:A9, 6.5 )
2 2 =PERCENTRANK( A1:A9, 7, 5 )
3 4 =PERCENTRANK( A1:A9, 8 )
4 6.5 =PERCENTRANK( A1:A9, 14 )
5 8  
6 9  
7 10  
8 12  
9 14  
 Results:
  A B
1 1 37.5%
2 2 41.666%
3 4 50.0%
4 6.5 100.0%
5 8  
6 9  
7 10  
8 12  
9 14  

Note that, in cell B2 of the spreadsheet above, when calculating the percentrank for the value 7, the function interpolates one third of the way between the percentrank for 6.5 (=37.5%) and the percentrank for 8 (=50.0%). The resulting value, 41.6666666666667% is rounded down to 5 significant figures, as specified by the supplied [significance] argument.


For further examples of the Excel Percentrank function, see the Microsoft Office website


Percentrank Function Errors

If you get an error from the Excel Percentrank function this is likely to be one of the following:

Common Errors
#N/A - Occurs if the supplied value of x is smaller than the minimum, or greater than the maximum value in the supplied array.
#NUM! -

Occurs if either:

  • The supplied [significance] value is < 1
or
  • The supplied array is empty.

Also, the following formatting problem is encountered by some users:

Common Formatting Problem

If the result of your Percentrank function is presented as a decimal, or shows 0%, this is likely to be due to the formatting of the cell containing the function.

This can therefore be fixed by formatting the cell as a percentage, with decimal places, if required.

The easiest way to format a cell to display a percentage is to select the cell(s) to be formatted and then select the percentage button from the 'Number' group on the Home tab of the Excel ribbon (see below):

Excel Format Cells As Percentage Button and Dialog Box Launcher

This uses the default percentage formatting style for your computer system which might be exactly what you require.

However, if you want to change the number of decimal places that are displayed, this can be done within the 'Format Cells' Dialog Box, which is brought up by clicking on the dialog box launcher (shown in the above image).

Excel Format Cells Dialog Box Percentage Option

Within 'Format Cells' dialog box:

  • From within the 'Category' list on the left side of the dialog box, select the Percentage type.
  • The Decimal places: option will appear in the dialog box. Use this to specify the number of decimal places that you want to display.
  • Click OK.