QUARTILE Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc Introduced in OpenOffice.org 3.0
quartile distribution statistics interpolation numeric-data

The QUARTILE function in OpenOffice Calc returns the value at a specified quartile of a dataset. Learn syntax, quartile definitions, interpolation rules, examples, and best practices.

Compatibility

What the QUARTILE Function Does

  • Returns the value at a specified quartile
  • Uses inclusive percentile calculation
  • Supports quartiles 0 through 4
  • Useful for distribution analysis, grading, and outlier detection
  • Works across sheets

QUARTILE is ideal when you need structured distribution breakdowns.

Syntax

QUARTILE(range; type)

Arguments:

  • range — The dataset
  • type — Which quartile to return:
Type Meaning Equivalent Percentile
0 Minimum 0
1 First quartile (Q1) 0.25
2 Median (Q2) 0.5
3 Third quartile (Q3) 0.75
4 Maximum 1
OpenOffice Calc uses inclusive quartile logic, equivalent to Excel’s QUARTILE.INC.

How Quartile Interpolation Works

QUARTILE internally uses the same interpolation method as PERCENTILE:

[ x = x_{\text{lower}} + (fraction \cdot (x_{\text{upper}} - x_{\text{lower}})) ]

This ensures smooth quartile values even with small datasets.

Basic Examples

First quartile (Q1)

=QUARTILE(A1:A100; 1)

Median (Q2)

=QUARTILE(A1:A100; 2)

Third quartile (Q3)

=QUARTILE(A1:A100; 3)

Minimum and maximum

=QUARTILE(A1:A100; 0)
=QUARTILE(A1:A100; 4)

Advanced Examples

Quartile across sheets

=QUARTILE(Sheet1.A1:A500; 3)

Dynamic quartile selection

=QUARTILE(A1:A100; B1)

Where B1 contains a value from 0 to 4.

Conditional quartile (workaround)

Quartile of B where region = “North”:

=QUARTILE(IF(A1:A100="North"; B1:B100); 1)

Confirm with Ctrl+Shift+Enter.

Quartile of filtered data

=QUARTILE(IF(SUBTOTAL(103; OFFSET(A1; ROW(A1:A100)-ROW(A1); 0)); A1:A100); 3)

Confirm with Ctrl+Shift+Enter.

Quartiles for box‑and‑whisker plots

  • Minimum → QUARTILE(range; 0)
  • Q1 → QUARTILE(range; 1)
  • Median → QUARTILE(range; 2)
  • Q3 → QUARTILE(range; 3)
  • Maximum → QUARTILE(range; 4)

Quartile‑based outlier detection

Upper bound:

=QUARTILE(A1:A100; 3) + 1.5 * (QUARTILE(A1:A100; 3) - QUARTILE(A1:A100; 1))

Lower bound:

=QUARTILE(A1:A100; 1) - 1.5 * (QUARTILE(A1:A100; 3) - QUARTILE(A1:A100; 1))

Common Errors and Fixes

QUARTILE returns Err:502 (Invalid argument)

Occurs when:

  • Type is outside 0–4
  • Range contains no numeric values
  • Type is text
  • Range is malformed

QUARTILE returns unexpected values

Possible causes:

  • Dataset not sorted (sorting not required but helps interpretation)
  • Text numbers not converted to numeric
  • Hidden blanks affecting interpolation

QUARTILE ignores values you expected it to include

QUARTILE ignores:

  • Text numbers ("123")
  • Empty cells
  • Logical values
  • Errors

QUARTILE includes values you expected it to ignore

QUARTILE includes:

  • Dates
  • Times
  • Numeric results of formulas

Err:508 — Missing parenthesis

Usually caused by:

  • Missing )
  • Using commas instead of semicolons

Best Practices

  • Use quartiles for distribution summaries and box plots
  • Use Q1 and Q3 for outlier detection
  • Use array formulas for conditional quartiles
  • Convert imported text numbers to real numbers
  • Use named ranges for cleaner formulas
  • Combine quartiles with PERCENTILE for deeper analysis
Quartiles are the backbone of box‑and‑whisker plots, outlier detection, and distribution modeling — mastering them unlocks powerful statistical insight.

Copyright 2026. All rights reserved.