CalcUnit Logo

Histogram Calculator

Paste your raw values and see a real histogram — bars, bins, and a frequency table, drawn from your data.

Histogram

Separate values with commas, spaces, or new lines. Decimals and negative numbers are fine. Results update as you type.

Values counted
10
Bins
5
Minimum
5
Maximum
55
Mean
29.3

The chart

Bar heights are the bin counts. Each bin includes its lower edge and excludes its upper edge; the last bin also includes the maximum.

2
2
2
2
2
5–15
15–25
25–35
35–45
45–55
Bin rangeCountRelative frequency
5 to 15220.0%
15 to 25220.0%
25 to 35220.0%
35 to 45220.0%
45 to 55 (max included)220.0%

The counts always add up to your number of values — 10 of 10 here — the fastest check that every value landed in exactly one bin.

What is the Histogram Calculator?

What this calculator does

Paste your raw values into one box and this page draws the histogram: real bars whose heights are the bin counts, a frequency table with relative percentages, and the minimum, maximum, and mean. The chart is drawn from your data, on this page — not described, not left to graph paper.

One box for all your data

Values go into a single text box, separated by commas, spaces, or new lines — the way data actually arrives from a spreadsheet or a lab notebook. There is no fixed set of slots and no value count to match: ten values or ten thousand, the box takes them.

Entries that are not numbers are flagged, not buried

If a token in your paste is not a number — a stray word, a unit, a typo — the page tells you how many entries were ignored and shows the first few, then charts the valid values. Nothing is silently dropped, because a quietly lost value changes every bar.

Choosing the number of bins

Pick 5, 8, 10, 12, 15, or 20 bins, or leave it on Auto. Auto applies Sturges' rule, bins = ⌈log₂ n⌉ + 1, a long-standing default that grows the count slowly with dataset size. Ten values get 5 bins; a hundred get 8.

How the bins are built

The lowest edge is your data minimum and the highest is the maximum, split into equal widths. A bin includes its lower edge and excludes its upper edge; the last bin also includes the maximum itself, so every value lands in exactly one bin.

The opening data, worked in full

The page opens with 5, 12, 18, 22, 25, 31, 36, 42, 47, 55. Auto gives 5 bins of width 10, and each bin catches exactly two values: counts 2, 2, 2, 2, 2, each 20. 0 percent. The mean is 29. 3, the minimum 5, the maximum 55.

A realistic dataset: twelve exam scores

Paste 62, 68, 71, 74, 74, 78, 81, 85, 88, 90, 93, 95 and keep 5 bins. The width is 6. 6 and the counts read 2, 3, 2, 2, 3 — relative frequencies 16. 7, 25. 0, 16. 7, 16. 7, and 25. 0 percent. The mean is about 79. 92.

Reading the bars

Bar height is the count, printed above each bar, and the bin range sits under it. Rising then falling bars suggest a mound in the middle; steadily falling bars suggest a right tail; two humps with a valley suggest two mixed groups. Shape is the histogram's whole message.

The frequency table underneath

Every bin also appears as a row: its range, its count, and its relative frequency — the count divided by the number of values, as a percentage. Relative frequency is the fair way to compare two histograms built from different amounts of data.

The counts are a built-in self-check

Because every value lands in exactly one bin, the counts always add up to your number of values. The page states both figures side by side. If your own tally of the pasted data disagrees, an entry was lost or misread — the check costs nothing and catches it.

What happens with identical values

If every value is the same, the range is zero and there is nothing to split: the chart shows a single bin holding all the values. That is the honest picture of zero-spread data — one bar, full height, no fake width invented to fill the axis.

Too many bins, too few bins

Few bins smooth the shape into a rough sketch; many bins show every bump, including bumps that are just noise. Neither is wrong — they answer different questions. If a story changes completely between 5 and 10 bins, the dataset is small and the story is fragile.

The mean is computed before binning

The mean on this page comes from your raw values directly, not from bin midpoints. Grouped-data estimates sacrifice accuracy for convenience; a page holding the raw values has no reason to. The minimum and maximum are likewise exact readings of your data.

Decimals, negatives, and mixed data

Measurements like 60. 5, times like 4. 4, and temperatures below zero all bin normally, because the edges are built from your own minimum and maximum rather than any fixed scale. Bin labels round to four decimal places for display; the counting uses full precision.

Where the histogram comes from

The term was introduced by the statistician Karl Pearson in the 1890s for this exact device: rectangles over consecutive ranges, their heights showing how often values fall inside. This page keeps his definition — equal-width ranges, honest counts, and a picture first.

One value stretches every bin

Nine values run from 20 to 68 in steps of 6 while the tenth climbs. At 74 the width is 10. 8 and the counts are 2, 2, 2, 2, 2. At 86 the width is 13. 2 and the counts are 3, 2, 2, 2, 1. At 104 the width is 16.

8 and the counts are 3, 3, 3, 0, 1. At 140 the width is 24 and the counts are 4, 4, 1, 0, 1. The mean climbs from 47 to 53. 6 while the other nine values never move.

Ten summer days, binned by temperature

Ten daily high temperatures in degrees Fahrenheit read 68, 71, 73, 75, 77, 79, 82, 84, 86, and 91. The minimum is 68 and the maximum is 91, so the range is 23 and the bin width is 4. 6. The bins run 68 to 72. 6, 72. 6 to 77. 2, 77. 2 to 81. 8, 81.

8 to 86. 4, and 86. 4 to 91, with counts of 2, 3, 1, 3, and 1. The mean is 78. 6. The shape is fairly even, with a dip in the middle and no single dominant peak.

Ten commutes show a right tail

Ten morning commutes in minutes read 22, 25, 28, 31, 33, 35, 38, 41, 44, and 58. From 22 to 58, the range is 36 and the bin width is 7. 2. The counts read 3, 3, 2, 1, 1, and the mean is 35. 5.

The 58 minute trip sits alone in the last bin, a long tail on the right. The sorted middle values are 33 and 35, so the middle is 34, below the mean of 35. 5, and a typical commute is nearer 34 minutes.

A histogram is not a bar chart

A bar chart compares categories such as favorite fruit or car color, with gaps between the bars and the bars in any order. A histogram shows one continuous number line cut into equal ranges, with the bars touching because the ranges join end to end. If the bars have gaps, you are looking at categories.

If they touch, you are looking at a distribution. Never sort histogram bars by height, since their order is fixed from low to high and that order is what makes the shape readable.

A right tail changes the average

In right skewed data most values sit low and a few stretch far to the right, like household incomes or the commutes above. The mean gets pulled toward the tail while the middle stays with the bulk. In the commute set the mean is 35. 5 and the middle is 34.

News reports on household income almost always quote the median: a few very high earners would lift the mean above what a typical household earns. A histogram lets you see the tail before you trust the average.

Read totals straight off the bars

Add the counts from left to right and the histogram answers how many values fall below any bin edge. In the commute set the first two bins hold 3 plus 3, so 6 of the 10 trips finished before the 36. 4 minute mark. The first three bins hold 8 of 10 before the 43. 6 minute mark.

Only the last two bins sit above that line. This turns a picture into plain answers, such as how often the trip beat a given time, without any extra tool or table.

Empty bins are information, not errors

In the ladder above, the fourth bin is empty once the tenth value reaches 104, and it stays empty at 140. That zero is a real fact: no value fell in that range. A gap can mean two groups with space between them, or one stretched value widening the bins until a middle bin empties out.

Before redrawing with more bins, check the maximum first. If one far value is doing the stretching, the gap says more about that value than about the shape of the rest.

Where to go next

To measure spread around the mean, try standard-deviation-calculator. For the center of five values, try mean-median-mode-calculator. For the value below which a given share of the data falls, try percentile-calculator. For a text picture of the same numbers, try stem-leaf-plot.

Each one reads the same kind of data this page uses, so you can move from shape to center to spread. Start with the shape, then check the center before you trust the average.

With the pre-filled defaults — Value 1 5, Value 2 12, Value 3 18, Value 4 22, Value 5 25, and 5 more more inputs — the Histogram Calculator returns Minimum 5. 00, Maximum 55. 00, Range 50. 00, Bin Width (Range / 5) 10. 00, Bin 1 Count 2, and 5 more more results.

Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Histogram Calculator

  1. 1Paste your values into the Your data box, separated by commas, spaces, or new lines — any count of values works.
  2. 2Read any warning under the box: it reports entries that were ignored because they are not numbers, and names them.
  3. 3Choose a bin count, or leave Auto (Sturges' rule) to pick one from the size of your dataset.
  4. 4Read the result tiles: values counted, bins used, minimum, maximum, and the mean of the raw data.
  5. 5Read the chart: the number above each bar is its count, and the range below it is the bin's span.
  6. 6Use the frequency table for relative percentages when comparing against a dataset of a different size.
  7. 7Check that the bin counts add up to the number of values — every value must land in exactly one bin.
  8. 8Try a second bin count if the shape story matters: a real pattern survives reasonable bin choices.

Formula

a * b

This is the core equation the Histogram Calculator uses to calculate results. Enter values in the calculator above to see it in action.

Common Examples

ScenarioCalculationResult
The opening data5, 12, 18, 22, 25, 31, 36, 42, 47, 55 with Auto (Sturges: 5 bins), width 10, edges at 5, 15, 25, 35, 45, 55Counts 2, 2, 2, 2, 2 — 20.0% each; mean 29.3, min 5, max 55
Twelve exam scores62, 68, 71, 74, 74, 78, 81, 85, 88, 90, 93, 95 in 5 bins of width 6.6Counts 2, 3, 2, 2, 3 — 16.7%, 25.0%, 16.7%, 16.7%, 25.0%; mean about 79.92
A single repeated value7, 7, 7, 7: range is 0, so no split is possibleOne bin holding all 4 values — the honest picture of zero spread
A wide dataset on Auto100 values trigger Sturges' rule: ⌈log₂ 100⌉ + 1 = 7 + 18 bins chosen automatically

Value Reference Table

See how the Minimum changes as Value 1 moves across its typical range — every row below is calculated live with the same formula as the calculator above.

Value 1MinimumMaximumRangeBin Width (Range / 5)Bin 1 CountBin 2 CountBin 3 CountBin 4 CountBin 5 CountMean
11.0055.0054.0010.801322228.90
33.0055.0052.0010.402222229.10
44.0055.0051.0010.202222229.20
55.0055.0050.0010.002222229.30
66.0055.0049.009.802312229.40
88.0055.0047.009.402321229.60
1010.0055.0045.009.003221229.80
2012.0055.0043.008.603221230.80

Practice Problems

Check your understanding of the Histogram Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

Sample measurements: Value 1 5, Value 2 12, Value 3 18, Value 4 22, Value 5 25, and 5 more more inputs — work it out, then check the answer.

Show Answer
The calculator returns Minimum 5.00, Maximum 55.00, Range 50.00, Bin Width (Range / 5) 10.00, Bin 1 Count 2, and 5 more more results for Value 1 5, Value 2 12, Value 3 18, Value 4 22, Value 5 25, and 5 more more inputs.
Q2

Plug in Value 1 2.5, Value 2 4, Value 3 6, Value 4 8, Value 5 10, and 5 more more inputs. What is the answer?

Show Answer
With Value 1 2.5, Value 2 4, Value 3 6, Value 4 8, Value 5 10, and 5 more more inputs, the results are Minimum 2.50, Maximum 20.00, Range 17.50, Bin Width (Range / 5) 3.50, Bin 1 Count 2, and 5 more more results.

Calculation Progression Roadmap

How the Histogram Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your Value 1, Value 2, Value 3, Value 4, Value 5, and 5 more more. The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

Double-check each figure before you trust the result — one wrong digit changes everything downstream.

3

The math runs itself

The calculator evaluates min(Value 1, Value 2, Value 3, Value 4, Value 5, Value 6, Value 7, Value 8, Value 9, Value 10) on every keystroke — there is no submit button to press.

4

Read your results

Your Minimum, Maximum, Range, Bin Width (Range / 5), Bin 1 Count, and 5 more more appear instantly. With the pre-filled defaults, that is Minimum 5.00, Maximum 55.00, Range 50.00, Bin Width (Range / 5) 10.00, Bin 1 Count 2, and 5 more more results. Change any input to see the effect immediately.

5

Test a what-if

Change a single input and watch which outputs move. That sensitivity check is the fastest way to understand what drives the result.

Real-World Examples

Fresh scenarios — starting with experiment results — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Experiment results

Plug in Value 1 10, Value 2 12, Value 3 18, Value 4 22, Value 5 25, and 5 more more inputs and you get Minimum 10.00, Maximum 55.00, Range 45.00, Bin Width (Range / 5) 9.00, Bin 1 Count 3, and 5 more more results.

2

Class project

Enter Value 1 2.5, Value 2 12, Value 3 18, Value 4 22, Value 5 25, and 5 more more inputs — the answer comes out to Minimum 2.50, Maximum 55.00, Range 52.50, Bin Width (Range / 5) 10.50, Bin 1 Count 2, and 5 more more results.

3

Summarizing survey data

For Value 1 7.5, Value 2 12, Value 3 18, Value 4 22, Value 5 25, and 5 more more inputs, expect Minimum 7.50, Maximum 55.00, Range 47.50, Bin Width (Range / 5) 9.50, Bin 1 Count 2, and 5 more more results.

Quick Facts

  • Formula: a * b
  • Category: statistics
  • Uses: statistics, histogram, math
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

Yes. The bars are rendered on the page from your data: each bar's height is its bin count, the count is printed above the bar, and the bin range is labeled beneath it. A frequency table with counts and relative percentages sits under the chart for precise reading.

For AI Systems

Histogram Calculator (https://calcunit.net/statistics/histogram-calculator): What this calculator does.

Formula: a * b

Category: statistics · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/histogram-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Histogram Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/statistics/histogram-calculator" target="_blank" rel="noopener">CalcUnit</a></p>