Returns the k-th percentile of values in a range. PERCENTILE finds the value below which a given percentage of observations fall. k must be between 0 and 1. PERCENTILE uses the inclusive method (same as PERCENTILE.INC). Essential for percentile analysis, quartile calculations, statistical analysis, and understanding data distribution.
Master the fundamentals of Excel PERCENTILE function
The PERCENTILE function returns the k-th percentile of values in a range. A percentile is the value below which a given percentage of observations fall. k must be between 0 and 1 (0.25 = 25th percentile, 0.5 = 50th percentile/median, 0.9 = 90th percentile). PERCENTILE uses the inclusive method and is equivalent to PERCENTILE.INC. It can return the minimum (k=0) and maximum (k=1) values. When k doesn't correspond to an exact data point, PERCENTILE interpolates between adjacent values. Essential for percentile analysis, quartile calculations (using 0.25, 0.5, 0.75), statistical analysis, and understanding data distribution.
k must be between 0 and 1
Includes endpoints
Interpolates between values
PERCENTILE = PERCENTILE.INC
Function-specific parameters
Function-specific return type
Find percentile values
Calculate quartiles (25th, 50th, 75th)
Percentiles in statistics
Understand data distribution
Exact matching required
Returns numeric position
Handles missing text gracefully
=PERCENTILE(array, k)Array or range of data values.
The percentile value between 0 and 1 (0 = 0th percentile, 0.5 = 50th percentile/median, 1 = 100th percentile).
The k-th percentile value
Description: Returns the k-th percentile of values in a range
Find 50th percentile (median)
Returns the median (50th percentile). PERCENTILE(range, 0.5) equals MEDIAN(range).
Use PERCENTILE function in VBA
' Basic PERCENTILE in VBA
Range("C1").Value = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.5)
' Returns: 50th percentile (median)
' Calculate percentile
Sub CalculatePercentile()
Dim percentileValue As Double
Dim k As Double
k = 0.75 ' 75th percentile
percentileValue = Application.WorksheetFunction.Percentile(Range("A1:A10"), k)
Range("B1").Value = percentileValue
End Sub
' Calculate multiple percentiles
Sub CalculateMultiplePercentiles()
Dim p25 As Double
Dim p50 As Double
Dim p75 As Double
Dim p90 As Double
p25 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.25)
p50 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.5)
p75 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.75)
p90 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.9)
Range("B1").Value = "25th: " & p25
Range("B2").Value = "50th: " & p50
Range("B3").Value = "75th: " & p75
Range("B4").Value = "90th: " & p90
End Sub
' Compare PERCENTILE with MEDIAN
Sub ComparePercentileMedian()
Dim percentileValue As Double
Dim medianValue As Double
percentileValue = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.5)
medianValue = Application.WorksheetFunction.Median(Range("A1:A10"))
Range("B1").Value = "PERCENTILE(0.5): " & percentileValue
Range("B2").Value = "MEDIAN: " & medianValue
' Should be equal
End Sub
' Calculate quartiles using PERCENTILE
Sub CalculateQuartiles()
Dim q1 As Double
Dim q2 As Double
Dim q3 As Double
q1 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.25)
q2 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.5)
q3 = Application.WorksheetFunction.Percentile(Range("A1:A10"), 0.75)
Range("B1").Value = "Q1 (25th): " & q1
Range("B2").Value = "Q2 (50th): " & q2
Range("B3").Value = "Q3 (75th): " & q3
End SubFind percentile values
Calculate quartiles (25th, 50th, 75th)
Percentiles in statistical analysis
Understand data distribution
PERCENTILE returns #NUM!
k must be 0 ≤ k ≤ 1 (decimal form)Solution: k must be between 0 and 1. If k < 0 or k > 1, PERCENTILE returns #NUM!. Use decimal: 0.9 for 90th percentile, not 90.
Getting unexpected value
Use decimal: 0.9 for 90th percentile, not 90Solution: Check k value. k=0.25 is 25th percentile, k=0.5 is 50th percentile (median), k=0.9 is 90th percentile. Remember k is decimal (0-1), not percentage (0-100).
Uncertainty about difference
PERCENTILE includes endpoints, PERCENTILE.EXC excludesSolution: PERCENTILE (and PERCENTILE.INC) uses inclusive method - can return min (k=0) and max (k=1). PERCENTILE.EXC uses exclusive method - cannot return min or max, requires 0 < k < 1.
PERCENTILE returns non-data value
PERCENTILE interpolates between valuesSolution: This is expected. When k doesn't correspond to exact data point, PERCENTILE interpolates between adjacent values. This provides smooth percentile estimates.