Returns the rank of a value in a data set as a percentage. PERCENTRANK finds the percentile rank of a value (0 to 1). PERCENTRANK uses the inclusive method (same as PERCENTILE.INC). Returns where a value stands relative to other values. Essential for percentile ranking, comparing values to a data set, and understanding relative position.
Master the fundamentals of Excel PERCENTRANK function
The PERCENTRANK function returns the rank of a value in a data set as a percentage (0 to 1). PERCENTRANK is the inverse of PERCENTILE - while PERCENTILE finds the value at a given percentile, PERCENTRANK finds the percentile rank of a given value. PERCENTRANK uses the inclusive method and is equivalent to PERCENTRANK.INC. It returns where a value stands relative to other values in the data set. If the value is not exactly in the array, PERCENTRANK interpolates the percentile rank. Essential for percentile ranking, comparing values to a data set, understanding relative position, and inverse percentile calculations.
Returns percentile rank
Uses inclusive method
Inverse function
Interpolates when needed
Function-specific parameters
Function-specific return type
Find percentile rank of values
Compare values to data set
Find rank instead of value
Understand value position
Exact matching required
Returns numeric position
Handles missing text gracefully
=PERCENTRANK(array, x, significance)Array or range of data values.
The value for which you want to find the percentile rank.
Number of significant digits (default 3).
The percentile rank (0 to 1)
Description: Returns the percentile rank of a value
Find percentile rank of a value
Returns the percentile rank of 50 in the data set. 0.5 means 50th percentile (median).
Use PERCENTRANK function in VBA
' Basic PERCENTRANK in VBA
Range("C1").Value = Application.WorksheetFunction.PercentRank(Range("A1:A10"), 50)
' Returns: Percentile rank (0 to 1)
' Calculate percentile rank
Sub CalculatePercentRank()
Dim percentRankValue As Double
Dim testValue As Double
testValue = 75 ' Value to find rank
percentRankValue = Application.WorksheetFunction.PercentRank(Range("A1:A10"), testValue)
Range("B1").Value = percentRankValue
End Sub
' Compare PERCENTRANK with PERCENTRANK.INC
Sub ComparePercentRankINC()
Dim percentRankValue As Double
Dim percentRankINCValue As Double
Dim testValue As Double
testValue = 75
percentRankValue = Application.WorksheetFunction.PercentRank(Range("A1:A10"), testValue)
percentRankINCValue = Application.WorksheetFunction.PercentRank_Inc(Range("A1:A10"), testValue)
Range("B1").Value = "PERCENTRANK: " & percentRankValue
Range("B2").Value = "PERCENTRANK.INC: " & percentRankINCValue
' Should be equal
End Sub
' Use significance parameter
Sub PercentRankWithSignificance()
Dim percentRankValue As Double
Dim testValue As Double
testValue = 75
percentRankValue = Application.WorksheetFunction.PercentRank(Range("A1:A10"), testValue, 2)
Range("B1").Value = percentRankValue ' Rounded to 2 decimals
End Sub
' Find ranks for multiple values
Sub FindMultipleRanks()
Dim values As Variant
Dim i As Integer
Dim rankValue As Double
values = Array(50, 60, 70, 80, 90)
For i = 0 To UBound(values)
rankValue = Application.WorksheetFunction.PercentRank(Range("A1:A10"), values(i))
Range("B" & (i + 1)).Value = values(i) & ": " & rankValue
Next i
End SubFind percentile rank of values
Compare values to data set
Find rank instead of value
Understand value position
PERCENTRANK returns #N/A
x must be numeric and comparable to array valuesSolution: x must be a numeric value that can be compared to array values. If x is text or cannot be compared, PERCENTRANK returns #N/A. Ensure x is numeric.
Uncertainty about difference
PERCENTRANK = PERCENTRANK.INC (identical functions)Solution: PERCENTRANK and PERCENTRANK.INC are equivalent - they have identical behavior. Both use inclusive method. Use either one.
Uncertainty about difference
PERCENTRANK: value → rank, PERCENTILE: rank → valueSolution: PERCENTRANK finds the percentile rank of a value (value → rank). PERCENTILE finds the value at a percentile (rank → value). They are inverse functions.
PERCENTRANK returns non-integer rank
PERCENTRANK interpolates when value not in arraySolution: This is expected. If value is not exactly in array, PERCENTRANK interpolates the percentile rank. This provides smooth ranking.