FireCADCalc

Median, Quartiles, IQR and Outlier Fences

Minimum, quartiles, median, maximum, interquartile range and Tukey outlier fences of up to 12 values, using the common linear-interpolation quartile method.

Inputs

Examples: Illustrative nine readings with a high valueTwelve valuesFour values

Accepted: 3 to 12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12
Accepted: -1E+12 to 1E+12

Results

The sorted values are interpolated at position (n − 1)p (Hyndman and Fan type 7, used by Excel's QUARTILE.INC and most software). Other methods give slightly different quartiles for small samples. Values beyond 1.5 IQR from the quartiles are flagged as possible outliers (Tukey's box plot rule); investigate them rather than deleting them automatically.

Minimum1.0000
First quartile3.7500
Median6.5000
Third quartile9.2500
Maximum12.000
Interquartile range5.5000
Lower fence Q₁ − 1.5 IQR-4.5000
Upper fence Q₃ + 1.5 IQR17.500
Values outside the fences0

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Illustrative nine readings with a high value. The inputs, in the units selected above:

InputValue
Number of values used (3–12)9.0000 -
Value 112.100 -
Value 214.500 -
Value 311.800 -
Value 413.200 -
Value 519.700 -
Value 612.900 -
Value 713.600 -
Value 812.400 -
Value 914.000 -
Value 100 -
Value 110 -
Value 120 -

Applying the formula below gives:

ResultValue
Minimum11.800
First quartile12.400
Median13.200
Third quartile14.000
Maximum19.700
Interquartile range1.6000
Lower fence Q₁ − 1.5 IQR10.000
Upper fence Q₃ + 1.5 IQR16.400
Values outside the fences1.0000

Open this example in the calculator and change any input.

Formula

\(Q(p) = x_{(\lfloor h\rfloor)} + (h - \lfloor h\rfloor)(x_{(\lfloor h\rfloor+1)} - x_{(\lfloor h\rfloor)}), \; h = (n-1)p, \quad F = Q_1 - 1.5\,IQR,\; Q_3 + 1.5\,IQR\)

Variables

Symbol Meaning SI unit
\(n\) Number of values used (3–12) -
\(x_{1}\) Value 1 -
\(x_{2}\) Value 2 -
\(x_{3}\) Value 3 -
\(x_{4}\) Value 4 -
\(x_{5}\) Value 5 -
\(x_{6}\) Value 6 -
\(x_{7}\) Value 7 -
\(x_{8}\) Value 8 -
\(x_{9}\) Value 9 -
\(x_{10}\) Value 10 -
\(x_{11}\) Value 11 -
\(x_{12}\) Value 12 -
\(x_{min}\) Minimum -
\(Q_1\) First quartile -
\(\tilde x\) Median -
\(Q_3\) Third quartile -
\(x_{max}\) Maximum -
\(IQR\) Interquartile range -
\(F_L\) Lower fence Q₁ − 1.5 IQR -
\(F_U\) Upper fence Q₃ + 1.5 IQR -
\(n_{out}\) Values outside the fences -

Method and standards

Quartiles.

Where it is used

  • Summarising test data robustly.
  • Screening readings for outliers.

Common mistakes

  • Comparing quartiles computed by different methods.
  • Deleting flagged values without investigation.

Assumptions and limits

  • Up to 12 values; quantile type 7.

References

  • Sample quantiles
  • type 7

Questions and answers

Why does my software give a different Q1?

There are nine common quantile definitions; this uses the linear interpolation one (type 7).

Is a value outside the fences an error?

Not necessarily: it is unusual for the rest of the data and worth checking.

What do the defaults represent?

Nine illustrative readings with one high value at 19.7.

Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Sources

Hyndman and Fan, Sample Quantiles in Statistical Packages, Am. Stat. 50 (1996)

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.