Histogram builder

Type a list of numbers and drag the class width and starting point to watch the frequency table, the histogram and the frequency polygon change. See the mean, median, mode and modal class, how far the mean from the table drifts from the true mean, and the combined mean of two groups.

Keep it one tap away for everyday use.

Bookmark Histogram builder?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Numbers
  2. Class width
  3. Histogram
  4. Mean
Nothing is uploadedWorks offline once open

Your data

The examples are made-up numbers. Type your own class's numbers to see your own picture.

Histogram and frequency polygon

w
a

w is the class width, a is where the first class starts.

Frequency table

A number equal to an upper limit goes into the next class: 40 goes in 40–50, not 30–40.

Mean, median and mode

The raw numbers give the exact mean. The table only knows the class marks, so its mean is an estimate. Wider classes usually move it further away.

Combine two groups

Two classes took the same test. What is the average of everyone together?

Try this

  • Drag the width slider down to 1. Every bar is now almost one number: the picture is spiky and hard to read.
  • Drag it up to 30. Now there are only two or three bars and the shape is lost. Somewhere between 5 and 10 tells the story best.
  • Keep the width at 10 and slide the start from 30 to 35. The same numbers, a different-looking histogram.
  • Watch the grouped mean move away from the true mean as the classes get wider.
  • In the combine card, give both groups the same average. Does the size of the groups still matter?

Check yourself

Fresh questions every time. Nothing is saved.

What it does

A long list of numbers is hard to read. Grouping them into classes of equal width (30–40, 40–50 and so on) and counting how many fall in each gives a frequency table, and drawing a bar for each class gives a histogram. Join the middle of the top of each bar and you get a frequency polygon. This page does all three from your own numbers and lets you change the grouping with two sliders:

  • Class width (w): how wide each class is. Too narrow and the picture is spiky; too wide and the shape disappears.
  • Start (a): where the first class begins. The same data can look quite different when the classes start somewhere else.

Under the picture you get the frequency table with class marks, the exact mean, median and mode of your numbers, the modal class, and the mean estimated from the table alone. A last card finds the combined mean of two groups, such as two sections of a class that took the same test.

It fits the Class 9 mathematics chapter on understanding data (frequency tables, histograms, frequency polygons and averages, and combining data sets). For the Class 10 formulas for the mean, median and mode of grouped data, go on to grouped data; for chance and outcomes, see sample space builder.

How to use it

  1. Type or paste numbers into the box, separated by commas, spaces or new lines, or tap one of the made-up examples.
  2. The page picks a tidy width that gives about six classes. Drag the w slider, or type any width in the box beside it.
  3. Drag the a slider to move where the first class starts. It always starts at or below your smallest number.
  4. Tick or untick Bars and Frequency polygon to see either on its own. The dashed green line marks the true mean.
  5. Read the table and the averages under the picture. The modal class (the tallest bar) is in bold.

A number exactly on a class boundary goes into the higher class, so 40 is counted in 40–50. This is the usual school rule for continuous classes.

A worked example

The page starts with 30 made-up test marks. With width 10 starting at 30 the classes and frequencies are 30–40: 2, 40–50: 4, 50–60: 7, 60–70: 9, 70–80: 5, 80–90: 2, 90–100: 1.

  • The class marks are 35, 45, 55, 65, 75, 85, 95, and Σ f × mark = 1 860, so the mean from the table is 1 860 ÷ 30 = 62.
  • The true mean of the 30 marks is 1 848 ÷ 30 = 61.6, so the table’s estimate is off by 0.4.
  • The median is 61.5 (halfway between the 15th and 16th marks, 61 and 62). No mark appears twice, so there is no mode, and the modal class is 60–70.
  • The frequency polygon starts at 25 and ends at 105 with a frequency of 0, the class marks of the empty classes on either side.

In the combine card, 30 pupils averaging 62 and 20 pupils averaging 70 give (30 × 62 + 20 × 70) ÷ 50 = 3 260 ÷ 50 = 65.2, not 66.

Check yourself

Four fresh questions each time: a class mark, counting numbers into a class, a mean from a small table and a combined mean. Type the answer, press Check, and open the worked answer if you need it. Nothing is saved.

FAQ

Why do the bars touch? The classes follow on with no gaps (40–50 ends where 50–60 begins), so the bars do too. In a bar graph of separate things, like favourite fruits, the bars have gaps.

Why is the mean from the table different from the true mean? The table only remembers how many numbers are in each class, so it pretends they all sit at the class mark. The narrower the classes, the closer the estimate.

Can I use classes of different widths? Not on this page. With unequal widths the bar heights must be scaled so that the bar areas match the frequencies; all classes here have the same width.

Is this from the NCERT book? It covers the same topic with fibub’s own pictures and made-up examples. fibub is not part of NCERT.

Where the numbers come from

  • Frequency tables, histograms, frequency polygons, mean, median, mode and the combined mean are standard school statistics. Wording, pictures and the made-up example data are fibub's own.
  • Checked against numpy.histogram, numpy.mean and Python's statistics.median and statistics.multimode on random data sets.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Change log for Histogram builder

  1. Add #1286 Histogram and frequency polygon builder Details on GitHub

Every change to fibub

Related tools

Grouped data #L80 Type class intervals and frequencies and get the mean by the direct, assumed-mean and step-deviation methods, the median and the mode with the formulas filled in, and a histogram with less-than and more-than ogives. Sample space builder #L82 See every outcome of two dice, a few coins or a deck of cards, shade an event and get its probability as a fraction. Then run the experiment thousands of times and watch the share of hits settle near it. Probability tree #L94 Set P(A), P(B | A) and P(B | A′) with sliders and see the tree, the four path probabilities, P(B) by total probability, P(A | B) by Bayes' theorem and an independence check. 1000 dots show the same numbers as people, which makes it clear why a positive result on a test for something rare is often a false alarm. Algorithm stepper #L168 Watch bubble sort put a list in order, binary search halve a sorted list to find a number, and Euclid's algorithm cut a rectangle into squares to find the HCF. Step forwards and back, count the comparisons, and see how the step counts grow from 8 items to a million. Quadratic explorer #L68 Slide a, b and c and watch the parabola move: vertex, roots and the discriminant update live, completing the square is drawn with tiles, and the middle term is split for you. With fresh practice questions. Pythagoras proof playground #L69 Drag a right triangle and watch the squares on its sides add up. Slide through four visual proofs (rearrangement, Bhaskara, similar triangles, Baudhayana) with your own side lengths, and list Pythagorean triples.