PERCENTILE.INC Function (LibreOffice Calc)

Math Intermediate LibreOffice Calc LibreOffice 3.0

The PERCENTILE.INC function in LibreOffice Calc returns the k-th percentile of a dataset using the inclusive method. This guide explains syntax, examples, edge cases, errors, and best practices.

The **PERCENTILE.INC** function returns the *k‑th percentile* of a dataset using the **inclusive** method, meaning both endpoints (0th and 100th percentiles) are allowed. It is widely used in statistics, grading systems, financial analysis, and distribution modeling.

This guide provides syntax, examples, advanced techniques, common errors, and best practices, making it one of the most complete PERCENTILE.INC references available for LibreOffice Calc.

What the PERCENTILE.INC Function Does

  • Returns the k‑th percentile of a dataset
  • Uses the inclusive method (k ranges from 0 to 1)
  • Works with numbers, ranges, and arrays
  • Useful for grading, thresholds, and distribution analysis
  • Works across sheets
  • Supports interpolation between values

PERCENTILE.INC is the standard percentile function in most spreadsheet systems.

Syntax

PERCENTILE.INC(range; k)
k must be between 0 and 1, inclusive.
Example: 0.25 = 25th percentile.

Basic Examples

90th percentile

=PERCENTILE.INC(A1:A100; 0.9)

25th percentile

=PERCENTILE.INC(A1:A100; 0.25)

Median using PERCENTILE.INC

=PERCENTILE.INC(A1:A100; 0.5)

Minimum and maximum via percentiles

=PERCENTILE.INC(A1:A100; 0)     → min  
=PERCENTILE.INC(A1:A100; 1)     → max

Advanced Examples

Percentile across sheets

=PERCENTILE.INC((Sheet1.A1:A100; Sheet2.A1:A100); 0.9)

Percentile ignoring errors (using AGGREGATE)

=AGGREGATE(16; 2; A1:A100; 0.9)

Percentile of visible cells only (filtered data)

=AGGREGATE(16; 1; A1:A100; 0.9)

Conditional percentile (indirect)

LibreOffice has no PERCENTILEIF, but you can simulate it:

=PERCENTILE.INC(IF(B1:B100="North"; A1:A100); 0.9)

(Confirm with Ctrl+Shift+Enter in older Calc versions.)

Percentile excluding zeros

=PERCENTILE.INC(IF(A1:A100<>0; A1:A100); 0.9)

Percentile using sorted helper column

=INDEX(SORT(A1:A100); ROUNDUP(COUNT(A1:A100)*0.9; 0))

Percentile for grading thresholds

=PERCENTILE.INC(Scores; 0.75)

How PERCENTILE.INC Calculates Values

  1. Sorts the dataset
  2. Computes position:
    position = (n - 1) * k + 1
  3. Interpolates if position is not an integer

Example:
Dataset size = 10
k = 0.9
Position = (10 - 1) * 0.9 + 1 = 9.1
Result = 90% between 9th and 10th values.

Common Errors and Fixes

Err:502 — Invalid argument

Occurs when:

  • k is outside 0–1
  • Range contains no numeric values
  • Non-numeric text is included

Err:504 — Parameter error

Occurs when:

  • Semicolons are incorrect
  • Range is malformed

Percentile returns unexpected result

Possible causes:

  • Dataset contains zeros
  • Dataset contains errors
  • Hidden rows included

Fix:
Use AGGREGATE for visibility‑aware percentiles.

Percentile differs from PERCENTILE.EXC

This is expected—PERCENTILE.EXC excludes endpoints and uses a different formula.

Best Practices

  • Use PERCENTILE.INC for standard percentile calculations
  • Use PERCENTILE.EXC for statistical analysis requiring strict exclusion of endpoints
  • Use AGGREGATE for error‑tolerant or visibility‑aware percentiles
  • Use array formulas for conditional percentiles
  • Clean imported data before analysis
  • Use named ranges for cleaner formulas
PERCENTILE.INC is ideal for grading curves, financial thresholds, and distribution modeling where inclusive endpoints are required.