Charts

Histogram and box plot generator

Paste a column of numbers and see the shape of your distribution. Useful for checking normality assumptions before you pick a test.

⚠️ The histogram uses Sturges' formula to pick the number of bins automatically; the box plot uses the standard 1.5×IQR rule to flag outliers. These are descriptive visualizations only, not hypothesis tests.

Histogram

Box Plot

Common uses
  • Getting a quick look at the shape of your data (skew, central tendency)
  • Spotting anomalies or outliers
  • Descriptive-statistics charts for homework or a report

Why plot the data first

Summary statistics hide shape. Anscombe's quartet is the classic demonstration: four datasets with identical means, variances, correlations and regression lines that look nothing alike when plotted — one is linear, one curved, one has a single extreme outlier, one is a vertical cluster plus one distant point. The Datasaurus Dozen makes the same point more vividly with a dinosaur.

This matters directly for test selection. t-tests, ANOVA and Pearson correlation all assume things about distribution shape that a histogram will confirm or refute in seconds. Plotting before testing is not a presentation step; it is part of choosing the right analysis.

Reading a histogram

The histogram shows how often values fall into each range. What to look for:

  • Symmetry — a roughly symmetric single peak supports the normality assumptions behind the parametric tests.
  • Skew — a long tail to one side. Right-skewed data (income, reaction times, counts) will have a mean well above its median, and percentile conversions based on the normal distribution will be wrong.
  • Multiple peaks — usually a sign that two distinct populations are mixed together. Analysing them as one group is rarely the right move.
  • Gaps and edges — a hard wall at zero, or a spike at the maximum, often signals floor or ceiling effects in the measurement instrument.

The bins here are chosen by Sturges' rule: ⌈log₂(n) + 1⌉ bins. It is the most widely taught rule and is fine for moderate, roughly normal samples. It is known to under-bin large datasets (above roughly n = 200) and skewed ones, smoothing away structure you would want to see. If your histogram looks suspiciously featureless on a large dataset, that is the rule's limitation, not necessarily your data's.

Reading a box plot

The box plot compresses the distribution into five numbers plus outliers:

  • The box spans the first to third quartile — the middle 50% of the data. Its width is the interquartile range.
  • The line inside the box is the median, not the mean. Where it sits within the box indicates skew.
  • The whiskers extend to the furthest point still within 1.5 × IQR of the box.
  • Points beyond the whiskers are flagged as outliers by Tukey's 1.5 × IQR convention.

Worked example

For the data 2, 4, 4, 5, 6, 7, 8, 9, 22: Q1 = 4, median = 6, Q3 = 8.5, so IQR = 4.5.

The upper fence is 8.5 + 1.5 × 4.5 = 15.25. The value 22 exceeds it and is plotted as an outlier; the upper whisker stops at 9, the largest value inside the fence.

Note what this does to the summary statistics: the mean is 7.4 but the median is 6. That single point of separation is the outlier's entire influence, and it is exactly why the median is the more honest centre for data shaped like this.

Outliers are a flag, not a verdict

Being beyond 1.5 × IQR is a purely mechanical criterion. In a perfectly normal distribution, roughly 0.7% of points will be flagged as outliers by chance alone — so a large clean dataset is expected to show some.

A flagged point warrants investigation, not deletion. Ask whether it is a data entry error (a decimal in the wrong place), a measurement failure, a genuinely unusual case, or simply the tail of a heavy-tailed distribution. Only the first two justify removal, and removing a point should always be reported. Deleting inconvenient observations because a rule flagged them is one of the more common quiet forms of data manipulation.

Common mistakes

  • Reading the box plot's centre line as the mean. It is the median. On skewed data they can differ substantially.
  • Comparing box plots without noting sample size. A box plot of 8 points and one of 800 look equally authoritative and are not equally reliable.
  • Concluding normality from a histogram alone. With small n, histograms of normal data often look lumpy. Use it to spot gross departures, not to certify normality.
  • Comparing histograms with different bin widths. Bin choice changes apparent shape; two histograms are only comparable on the same binning.

Your data stays in your browser

Both charts are computed and drawn client-side. Nothing you paste into this page is transmitted anywhere — there is no upload step and no server involved in producing the plot. The same is true of every calculator on this site except the clearly-labelled optional AI analysis on the admission pages, which is described in the privacy policy.

Sources

  • Anscombe, F. J. (1973). Graphs in statistical analysis. The American Statistician, 27(1), 17–21.
  • Tukey, J. W. (1977). Exploratory Data Analysis. Addison-Wesley. (Origin of the box plot and the 1.5 × IQR rule.)
  • Sturges, H. A. (1926). The choice of a class interval. Journal of the American Statistical Association, 21(153), 65–66.
  • Matejka, J. & Fitzmaurice, G. (2017). Same stats, different graphs. CHI '17 Proceedings. (The Datasaurus Dozen.)