Box Plot Generator

Create publication-ready horizontal or vertical box-and-whisker plots from up to 6 datasets with automatic five-number summary, IQR, and Tukey outlier detection.

Plot Configuration

Examples:

Use "Label: 12, 15, 18" or enter comma/space-separated numbers.

Orientation
Show Outliers (1.5×IQR)
Show Mean Diamond

Box Plot Preview

40 50 60 70 80 Control Treatment
Inspect Series

Five-Number Summary & Statistics

Q1 (25th)
47.25
Median (Q2)
51
Q3 (75th)
55.75
IQR
8.5
Whiskers
42 – 60
Outliers
0
0.0/ 5
0 ratings
Rate this tool
Click stars to rate

Comments

U

Why Box-and-Whisker Plots Reveal What Averages Hide

Relying solely on an arithmetic mean and standard deviation can mask severe skewness, bimodal clusters, and extreme anomalies in experimental or product telemetry data. A box-and-whisker plot—introduced by statistician John W. Tukey as part of exploratory data analysis—condenses any continuous distribution into a compact visual summary built around medians and quartiles rather than averages.

When you paste up to six datasets into the generator above, each series is immediately transformed into a publication-ready SVG chart alongside its exact five-number summary, interquartile range (IQR), whisker bounds, and isolated outliers. Whether you are comparing A/B test conversion times, grading exam scores across cohorts, or inspecting laboratory measurements, side-by-side box plots expose shifts in central tendency and spread at a single glance.

Anatomy of a Box Plot and Core Formulas

Every box-and-whisker plot encodes five foundational order statistics—known collectively as the five-number summary—plus an optional arithmetic mean marker and outlier fences.

1. Quartile Interpolation (R Type 7 / Excel Standard)

Given a sample sorted in ascending order x0≤x1≤⋯≤xn−1x_0 \le x_1 \le \dots \le x_{n-1}, the generator computes the 25th percentile (Q1Q_1), the 50th percentile (median Q2Q_2), and the 75th percentile (Q3Q_3) using continuous linear interpolation:

h=p⋅(n−1)h = p \cdot (n - 1) Q(p)=x⌊h⌋+(h−⌊h⌋)⋅(x⌈h⌉−x⌊h⌋)Q(p) = x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) \cdot (x_{\lceil h \rceil} - x_{\lfloor h \rfloor})

Here p∈{0.25,0.50,0.75}p \in \{0.25, 0.50, 0.75\}. This formulation matches R's default quantile(..., type = 7), Python NumPy's default percentile method, and Excel's PERCENTILE.INC, guaranteeing consistent results across statistical workflows.

2. Interquartile Range (IQR) and Tukey Fences

The central box spans from Q1Q_1 to Q3Q_3, capturing the middle 50% of observations. Its width or height is the interquartile range:

IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

To separate typical variation from extreme anomalies without being distorted by the extremes themselves, the generator applies Tukey's 1.5×IQR fence rule:

Flow=Q1−1.5×IQRF_{\text{low}} = Q_1 - 1.5 \times \text{IQR} Fhigh=Q3+1.5×IQRF_{\text{high}} = Q_3 + 1.5 \times \text{IQR}

Any observation falling below FlowF_{\text{low}} or above FhighF_{\text{high}} is flagged as an outlier and rendered as an individual circle. Crucially, the whiskers do not extend blindly to the theoretical fences; instead, each whisker stops at the actual minimum and maximum observations that remain inside [Flow,Fhigh][F_{\text{low}}, F_{\text{high}}].

Choosing the Right Orientation and Chart Type

Selecting between horizontal and vertical layouts—or deciding whether a box plot is the best fit over a histogram—depends on label length, series count, and audience context.

Visualization FormatBest Use CaseStrengthsKey Limitations
Horizontal Box PlotLong category names, 3–6 seriesLabels remain readable without rotation; easy left-to-right scale scanningLess traditional in academic print journals
Vertical Box PlotTime-ordered groups, 1–4 short labelsMatches standard scientific publication figures; intuitive "higher is more" axisLong group names can feel crowded
Histogram / DensitySingle-series shape inspectionReveals bimodal peaks and fine-grained bin frequenciesCluttered when overlaying 3+ groups
Mean ± SD Bar ChartStrictly symmetric normal dataFamiliar to general business stakeholdersHides skewness, sample size, and outliers

Step-by-Step Walkthrough: Analyzing API Latency Outliers

Suppose a backend team measures response times (in milliseconds) for an endpoint before and after caching optimization:

  • API v1 (Before): 112, 118, 121, 125, 128, 134, 139, 245
  • API v2 (After): 88, 92, 95, 97, 101, 104, 108, 185

Let us trace how the engine evaluates API v1 (n=8n = 8):

  1. Locate the quartiles: With n=8n = 8, h0.25=0.25×7=1.75h_{0.25} = 0.25 \times 7 = 1.75, interpolating 75% of the way between 118 and 121 to give Q1=120.25Q_1 = 120.25. Similarly, the median (h0.50=3.5h_{0.50} = 3.5) averages 125 and 128 to yield Q2=126.5Q_2 = 126.5, while Q3Q_3 (h0.75=5.25h_{0.75} = 5.25) interpolates between 134 and 139 to give Q3=135.25Q_3 = 135.25.
  2. Compute spread and fences: The interquartile range is IQR=135.25−120.25=15\text{IQR} = 135.25 - 120.25 = 15. Multiplying by 1.5 gives 22.5, placing the upper fence at Fhigh=135.25+22.5=157.75F_{\text{high}} = 135.25 + 22.5 = 157.75 and the lower fence at Flow=120.25−22.5=97.75F_{\text{low}} = 120.25 - 22.5 = 97.75.
  3. Isolate outliers and set whiskers: Because 245 exceeds 157.75, it is plotted as a standalone outlier circle. The upper whisker therefore terminates at 139 (the largest inlier), and the lower whisker terminates at 112.

Repeating the same steps for API v2 reveals a median drop from 126.5 ms to 99 ms, a tighter IQR of 10.5 ms, and a single cold-start spike at 185 ms—giving engineers immediate visual proof that typical latency improved even though cold-start tails still warrant attention.

Practical Tips for Publication-Ready Exports

To get the cleanest figures for papers, slide decks, or engineering postmortems:

  • Name every series explicitly: Prefix each line with a concise label followed by a colon (for example, Cohort A: 14, 18, 22) so the chart axis and summary selector stay self-documenting.
  • Prefer SVG for documents and 2x PNG for slides: Use Download SVG when embedding into LaTeX, Notion, or web reports where infinite vector sharpness matters, and Download PNG when pasting directly into PowerPoint, Google Slides, or Slack.
  • Inspect both with and without outliers: If one extreme measurement compresses the main boxes into thin slivers, toggle Show Outliers off temporarily to inspect the core IQR boxes clearly, while still reporting the outlier count from the summary cards below.

Frequently Asked Questions (FAQ)