Statistics + histogram, in one tool

Histogram Calculator

Paste a list of numbers or a frequency table and get the mean, median, mode, standard deviation, quartiles and class midpoints — with a matching histogram you can download. Free, no sign-up, works on any device.

Histogram generator
one class per line: 10-20, 5
8
BarsBorder

Recent charts (saved on this device)

Paste your data and press Make histogram. Your chart, summary statistics and a full frequency table appear here.

Generate a chart to see an automatic read of its shape, skewness and a recommended bin count.

Summary statistics

Frequency distribution table

The bin-by-bin frequency table will appear here after you generate a chart.

What this histogram calculator gives you

Every time you paste data into the calculator above, it computes the full set of descriptive statistics that a stats homework problem or a lab report normally asks for — the same numbers you would work out by hand on a frequency table, only in a hundredth of a second.

  • Sample size (n) — how many values were parsed. The calculator ignores blanks and non-numeric text, so pasting a whole spreadsheet column is fine.
  • Mean — the arithmetic average. For raw data, it is the sum divided by n. For a frequency table, it uses the class midpoints weighted by the frequencies (see below).
  • Median — the middle value, or the average of the two middle values for an even count. Robust to outliers.
  • Mode — the most common value in the raw data, or the modal class (the tallest bar) in a grouped-data histogram.
  • Range, minimum, maximum — the extremes and their difference.
  • Variance and standard deviation — how spread out the values are. The calculator reports the sample standard deviation (dividing by n−1), which is the default for most stats classes.
  • Quartiles Q1 and Q3, plus the IQR — the 25th and 75th percentiles and the middle-50% spread.
  • Skewness — a signed number that says whether the distribution has a long tail to the right (positive), to the left (negative) or is roughly symmetric (near zero). The tool also translates the number into plain English.
  • Full frequency distribution table — one row per class with lower and upper bound, midpoint, count, relative frequency and cumulative frequency. Exportable as CSV.
  • Suggested bin counts — three standard rules for how many bars a histogram of your size should have: the square-root rule, Sturges’ rule and the Rice rule.

The chart itself is drawn with your chosen bin count, colors and labels, and can be downloaded as a high-resolution PNG or a scalable SVG.

How to calculate class midpoints and class boundaries by hand

Most homework questions about a histogram calculator are really questions about grouped data — the numbers arrive already summarised into a frequency table, and the exam wants you to work out the summary statistics from those classes. Two ideas do most of the heavy lifting: class boundaries and class midpoints.

Class boundaries

A class boundary is the exact cut-off between one class and the next. For continuous data, boundaries are usually the same as the stated class limits: the class 10–20 has a lower boundary of 10 and an upper boundary of 20, and the next class picks up at 20. For discrete data with a gap (like 10–19, 20–29) boundaries fall between the classes at 9.5, 19.5, 29.5 and so on, so the bars still touch when you draw the histogram.

Class midpoint

A class midpoint (sometimes called the class mark) is simply the average of the two boundaries:

midpoint = (lower boundary + upper boundary) ÷ 2

For the class 10–20, the midpoint is 15. For 20–30, 25. The midpoint stands in for every value in the class when you compute grouped-data statistics — which is why picking sensible class widths matters. If the classes are too wide, the midpoints stop being representative; too narrow, and you might as well use the raw data.

Class width

The class width is the distance between one lower boundary and the next. For 10–20, 20–30, 30–40 the class width is 10. Keeping the width constant across classes is the standard assumption behind almost every grouped-data formula; if your table uses uneven widths, redraw the histogram with bar heights proportional to density (frequency ÷ width) rather than raw count, or the picture will be misleading.

From a frequency table to a full statistics readout

Here is the whole workflow, using an example table of 100 exam scores:

ClassFrequency (f)Midpoint (x)f × x
40–50545225
50–601255660
60–7018651170
70–8025751875
80–9020851700
90–10012951140
100–1106105630
110–1202115230
Total∑f = 100∑fx = 7630
  1. Paste the classes and frequencies into the calculator above in Frequency table mode, one class per line as range, count.
  2. Read the Mean from the summary panel. For grouped data it works out to ∑fx ÷ ∑f = 7630 ÷ 100 = 76.3.
  3. The modal class is the tallest bar — here, 70–80, with a frequency of 25. Its midpoint (75) is the natural single-number answer to "what is the mode?".
  4. The median class is the one that contains the 50th observation. Cumulative frequencies climb 5, 17, 35, 60, 80, 92, 98, 100, so the 50th value sits inside 70–80. Its midpoint again gives a defensible point estimate.
  5. The calculator does all of the above automatically the moment you press Make histogram. The frequency table it prints back to you already contains the midpoints and cumulative counts so you can check every step of the working.

Grouped-data mean and standard deviation formulas

If you need the by-hand formulas for a stats class, these are the ones that go with the calculator’s output.

Mean of grouped data

x̄ = ∑(f x) ÷ ∑f

where x is the class midpoint and f is the class frequency. Multiply each midpoint by its frequency, add up the results, divide by the total count. That is what the third and fourth columns of the table above are for.

Variance and standard deviation of grouped data

The sample variance for grouped data is:

s² = ∑f(x − x̄)² ÷ (n − 1)

and the sample standard deviation is its square root, s. Populations use n in the denominator instead of n−1; the calculator reports the sample version because that is the default in almost every intro-stats course.

Median and quartiles of grouped data

For grouped data the median and quartiles are estimated by linear interpolation inside the class that contains them. The general formula for a percentile P:

P = L + ((k − F) ÷ f) × w

where L is the lower boundary of the class containing the percentile, k is the target rank, F is the cumulative frequency before that class, f is the frequency of the class, and w is the class width. Set k = 0.25n, 0.5n or 0.75n for Q1, the median or Q3.

The calculator computes these on the fly and prints them to the summary panel; the formulas are here so you can show your working, not because you need to run them yourself.

Skewness: what the tool tells you and why it matters

Alongside the numeric summary, the calculator prints a plain-English shape read of your distribution: approximately symmetric, right-skewed or left-skewed, together with the numeric skewness. Symmetric distributions have mean and median close together and look bell-shaped. A right skew (positive skewness) has a long tail toward higher values — typical for income, response times or wait times, where a small number of very large values pull the mean above the median. A left skew (negative skewness) has a long tail toward smaller values, which shows up in exam scores near a ceiling or in age-at-retirement data.

The reason the shape read appears next to the numbers is that a mean is only really meaningful when you know the shape of what it is averaging. For a strongly skewed distribution, the median is often the number to report; for a symmetric distribution, the mean is fine. The calculator suggests which to lead with based on the skewness it measured.

FAQ

Histogram calculator questions

How do you find the mean from a histogram or frequency table?

Multiply each class midpoint by its frequency, sum the results, and divide by the total frequency. In symbols, x̄ = ∑fx ÷ ∑f. Paste your frequency table into the calculator above and it does this in one click; the f x column is shown in the printed frequency table so you can check the working.

How do you find the median class?

Add up the frequencies until you pass half of the total. The class where the cumulative frequency first exceeds n ÷ 2 is the median class. To turn that into a single number, use the interpolation formula in the grouped-data section, or read it straight from the calculator’s summary panel.

What is the modal class?

The modal class is the class with the highest frequency — the tallest bar on the histogram. When homework asks for "the mode" from grouped data, the modal class (or its midpoint) is the usual answer. If two classes tie, the distribution is bimodal.

Does the calculator use sample or population standard deviation?

Sample standard deviation, with n−1 in the denominator (Bessel’s correction). That is the default in almost every intro-stats course. If you need the population version, multiply the sample variance by (n−1) ÷ n before taking the square root.

Can I use this as a relative-frequency or cumulative-frequency calculator?

Yes. Every row of the printed frequency table shows raw count, relative frequency (as a percentage) and cumulative count. Tick Relative frequency (%) in the display options to switch the histogram’s Y-axis to percentages. For the ogive-style cumulative view, read down the cumulative column.

Is this an AI histogram calculator?

No. The calculator uses classical statistical formulas and standard bin-count rules (square-root, Sturges, Rice) to produce the chart and summary. There is no machine-learning model involved — every number is reproducible from the formulas in the grouped-data section.