PERCENTILE.INC Function (LibreOffice Calc)
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.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
Availability and version history
- Introduced: LibreOffice 4.3.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
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
- Sorts the dataset
- Computes position:
position = (n - 1) * k + 1 - 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:
kis 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