How percentiles are calculated
This calculator uses linear interpolation — the same method as Excel's PERCENTILE.INC function and NumPy's default. For percentile P and a sorted dataset of n values, the index is L = (P/100) × (n − 1). If L is a whole number, the result is the value at that index. If L falls between two indices, the result is interpolated: value[floor(L)] + fractional_part × (value[ceil(L)] − value[floor(L)]).
For example, in the dataset [15, 20, 35, 40, 50] with n=5, the 25th percentile index is 0.25 × 4 = 1. The value at index 1 is 20, so P25 = 20. For the 30th percentile: index = 0.30 × 4 = 1.2, so P30 = 20 + 0.2 × (35 − 20) = 23.