Skip to content

Free tool

Histogram maker

A histogram groups measurements into equal-width bins and shows how many fall in each, so you can see the centre, the spread and the shape of a process. Paste your numbers below and the tool draws it and gives the mean, median and standard deviation.

Number of bins (auto)equalsk = ⌈log₂ n + 1⌉ (Sturges)

Bin widthequals(largest − smallest) ÷ k, rounded up to 1, 2, 2.5 or 5 × a power of ten

Standard deviationequals√( Σ(x − mean)² ÷ (n − 1) )

Bins include their lower edge: a value exactly on an edge counts in the bin above it, and the largest value always lands in the last bin.

30 values read. Separate with spaces, commas or new lines; use a point for decimals. Paste a column from a spreadsheet.

Leave blank to let the tool choose

What the numbers are, with units

Pre-filled with the worked example. Your data stays in your browser.

Mean

25.009

30 values in 5 bins of width 0.02.

Median

25.01

Middle value

Standard deviation

0.0181

Sample (n − 1)

Smallest

24.97

Largest

25.05

Auto: Sturges' rule gives 6 bins for 30 values; the width is rounded up to 0.02. Bins include their lower edge.

Shaft diameterHistogram of 30 values in 5 bins. Mean 25.009, median 25.01, standard deviation 0.0181.Shaft diameter051015Count24.96 to under 24.98: 1124.98 to under 25: 5525 to under 25.02: 131325.02 to under 25.04: 9925.04 to under 25.06: 2224.9624.982525.0225.0425.06Diameter (mm)Mean 25.009n = 30, median 25.01, standard deviation 0.018

Counts per bin
BinCountShare
24.96 to under 24.9813.3%
24.98 to under 25516.7%
25 to under 25.021343.3%
25.02 to under 25.04930%
25.04 to under 25.0626.7%

Email me my results

Optional. Get these inputs and results in your inbox, with a link back to this calculator.

We may follow up about LeanSuite. See our Privacy Notice.

Next step

Want to keep problem solving in one place?

Bring this result to a 45-minute demo and we will show where it fits in LeanSuite's Quality Improvement.

How to use it

From a column of readings to a chart

Paste the readings. One measured characteristic, such as a diameter, a fill weight or a cycle time, with at least 20 or 30 values if you can. Separate them with spaces, commas or new lines, and use a point for decimals. Our histogram template has a sheet to collect them on.

Leave the bin width blank to start. Then set a width of your own, such as the resolution of your gauge, and see if the shape holds.

Read the shape. One hump near the target is what you hope for. Two humps suggest two sources mixed together; a cliff on one side often means sorting or a limit. If it is stable and bell-shaped, Cp and Cpk compare it with your specification limits.

Worked example

Illustrative numbers, not a benchmark

Thirty shaft diameters in millimetres, measured in order from one machine.

  1. 1n = 30, so Sturges gives k = ⌈log₂ 30 + 1⌉ = 6 bins.
  2. 2Range = 25.05 − 24.97 = 0.08, and 0.08 ÷ 6 = 0.013, rounded up to a width of 0.02.
  3. 3The first edge is 24.96, so the bins are 24.96 to 24.98, 24.98 to 25.00, and so on up to 25.04 to 25.06.
  4. 4Counts per bin: 1, 5, 13, 9 and 2, which add up to 30.
  5. 5Mean = 25.009 mm, median = 25.01 mm, sample standard deviation = 0.018 mm.
One hump, centred on 25.01 mm, with the tallest bin at 25.00 to 25.02. Nothing in the shape suggests two sources mixed together.

Embed this tool

Teaching this, or writing about it? Paste this code into your site, course page or intranet and the tool works right there. It is free, with no sign-up.

<iframe src="https://www.theleansuite.com/tools/histogram-maker/embed" title="Histogram maker by LeanSuite" width="100%" height="2300" style="border:0;max-width:1000px" loading="lazy" allow="clipboard-write"></iframe>
<p style="font:13px/1.4 sans-serif"><a href="https://www.theleansuite.com/tools/histogram-maker">Histogram maker</a> by LeanSuite</p>

FAQ

Histogram maker: common questions

  1. A histogram is a bar chart of measurements grouped into equal-width ranges called bins. The height of each bar is how many measurements fall in that range. It shows where a process is centred, how wide it spreads and whether the shape is skewed or has two peaks, which can mean two machines or lots are mixed together.

  2. There is no single right number. A common starting point is Sturges' rule, the number of bins k = log2(n) + 1 rounded up, which gives about 6 bins for 30 values and 8 for 100. Too few bins hide the shape and too many make it ragged. Try a few widths; if the story changes a lot between them, you have too little data.

  3. A bar chart compares separate categories, such as defect types, so the bars can be in any order and have gaps. A histogram shows one measured variable cut into consecutive ranges, so the bars follow the number line in order and touch. If your data are categories with counts, use a Pareto chart instead.

  4. Select the column of measurements, choose Insert, then the Histogram chart under the statistic charts (Excel 2016 and later), and set the bin width under Format Axis. This tool does the same from pasted numbers, chooses the bins for you if you leave the width blank, and reports the mean, median and standard deviation alongside.

  5. It shows the shape, not the verdict. To judge capability you compare the spread with the specification limits, which the process capability calculator does with Cp and Cpk. A histogram is still the first thing to draw, because the capability indexes assume a single, roughly bell-shaped, stable distribution and the histogram shows whether that is true.

More free lean tools

All tools

Pass it on

We want LeanSuite to be the best place on the internet for lean help. If this was useful, send it to someone on your team or in your network who needs it.