Box Plot Calculator
Calculate five-number summary, IQR, outliers & generate interactive box plots from your data. Supports multiple datasets for comparison.
About
A box plot (box-and-whisker diagram) encodes five critical order statistics into a single glyph: the minimum, first quartile Q1, median Q2, third quartile Q3, and maximum. Points beyond Q1 โ 1.5 โ IQR or Q3 + 1.5 โ IQR are flagged as outliers. Misidentifying outliers corrupts regression models, inflates variance estimates, and produces misleading confidence intervals. This tool computes the full five-number summary, detects outliers using Tukey's fence method, and renders a scaled box plot on canvas. It approximates quartiles via linear interpolation (the inclusive method used by most statistics textbooks). Note: for datasets with fewer than 4 observations, quartile definitions become ambiguous.
Formulas
The interquartile range and outlier fences are computed as follows:
Quartiles are calculated using linear interpolation. For a sorted dataset of n values, the p-th percentile index is:
If i is not an integer, interpolate between xfloor(i) and xceil(i):
Sample standard deviation uses Bessel's correction:
Where Q1 = 25th percentile, Q3 = 75th percentile, LF = lower fence, UF = upper fence, n = sample size, = sample mean.
Reference Data
| Statistic | Symbol | Description | Sensitivity to Outliers |
|---|---|---|---|
| Minimum | xmin | Smallest observed value | Extremely sensitive |
| First Quartile | Q1 | 25th percentile; splits lowest 25% of data | Resistant |
| Median | Q2 | 50th percentile; central value | Resistant |
| Third Quartile | Q3 | 75th percentile; splits lowest 75% of data | Resistant |
| Maximum | xmax | Largest observed value | Extremely sensitive |
| Interquartile Range | IQR | Q3 โ Q1 | Resistant |
| Lower Fence | LF | Q1 โ 1.5 ร IQR | Resistant |
| Upper Fence | UF | Q3 + 1.5 ร IQR | Resistant |
| Mean | Arithmetic average of all values | Highly sensitive | |
| Standard Deviation | s | Square root of sample variance | Highly sensitive |
| Skewness | g1 | Measure of distribution asymmetry | Sensitive |
| Kurtosis | g2 | Measure of tail heaviness (excess) | Sensitive |
| Range | R | xmax โ xmin | Extremely sensitive |
| Lower Whisker | - | Smallest datum โฅ LF | Resistant |
| Upper Whisker | - | Largest datum โค UF | Resistant |
| Mild Outlier | - | Beyond 1.5 ร IQR from box | - |
| Extreme Outlier | - | Beyond 3.0 ร IQR from box | - |