Histogram Calculator

Histogram Calculator

Create frequency distributions from raw data. Visualize data distribution with customizable bin widths.

Last updated: March 2026

Histogram Configuration

Separate values with commas or spaces

1-50 bins recommended

Summary Stats

n
20
Mean
56.45
Median
55.00
Range
66.00
Min
23.00
Max
89.00

Histogram Visualization

23
34
45
56
67
78

Frequency Distribution

RangeFreqRel Freq
23.034.0210.0%
34.045.0420.0%
45.056.0420.0%
56.067.0315.0%
67.078.0420.0%
78.089.0315.0%

What is a Histogram?

A histogram is a graphical representation of the distribution of numerical data. It organizes data into "bins" (intervals) and displays how many observations fall into each bin using bars. The height of each bar represents the frequency (count) of observations in that interval.

Unlike bar charts which compare separate categories, histograms show continuous data distributions. They help identify patterns such as symmetry, skewness, multimodality, and outliers. Histograms are essential in exploratory data analysis and quality control.

The key parameter in histogram creation is the number of bins—too few bins hide detail, while too many bins create noise. A good rule of thumb is the square root rule: bins ≈ √n, where n is the number of observations.

How to Create a Histogram

The Process

1. Collect raw data (individual observations)
2. Find min and max values to determine data range
3. Divide range into k bins of equal width
4. Count how many observations fall in each bin
5. Draw bars with heights = frequencies

Choosing Number of Bins

Square Root Rule
bins ≈ √n
For n=100, use 10 bins
Sturges' Rule
bins = 1 + 3.322·log(n)
More conservative; works well for normally-distributed data

Example Calculation

Test Scores Distribution

Data:
20 test scores: 45, 52, 58, 61, 65, 68, 72, 75, 78, 82, 85, 88, 90, 92, 95, 98, 99, 100, 100, 100
Setup:
n = 20
Min = 45, Max = 100
Range = 55
Bins = √20 ≈ 4-5
Bin Width = 55 / 5 = 11
Bins:
45-56: 1 score
56-67: 3 scores
67-78: 4 scores
78-89: 6 scores
89-100: 6 scores

Frequently Asked Questions

How many bins should I use?

There's no perfect answer. Common rules: Square Root Rule (√n), Sturges' Rule (1 + 3.322·log n), Scott's Rule, or Freedman-Diaconis Rule. Experiment to find what best reveals your data's structure.

What's the difference between histogram and bar chart?

Bar charts display categorical data with gaps between bars. Histograms show continuous numerical data with no gaps, representing frequency distributions. Histograms emphasize data shape; bar charts compare categories.

What does a skewed histogram mean?

Skewness indicates asymmetry. Right-skewed (tail right) has high values pulled out; left-skewed (tail left) has low values pulled out. Symmetric histograms suggest normally-distributed data.

Can I have bins of different widths?

You can create unequal-bin histograms, but they require frequency density (frequency/width) on the y-axis for proper interpretation. Most standard histograms use equal bin widths.

What if I have outliers?

Outliers can distort histogram appearance by creating very wide ranges. Consider: removing outliers, using log scale, or creating separate analysis. Sometimes outliers reveal important data characteristics.

Is mode visible in a histogram?

Yes! The mode (most common value) corresponds to the tallest bar. Histograms can show unimodal (one peak), bimodal (two peaks), or multimodal (many peaks) distributions.

How does relative frequency differ from count?

Count (frequency) shows raw number of observations. Relative frequency is count divided by total (shown as proportion or percentage). Use relative frequency to compare datasets of different sizes.

Why start with a bin at the minimum value?

The first bin's lower edge equals the minimum value, ensuring all data fits within the bins. Bins are right-inclusive on the last bin (≤ upper) to capture the maximum value.

Related Tools