Generate histograms from raw data with 5 bin methods (Sturges, Square Root, Rice, Freedman-Diaconis, custom). SVG visualization, density, skewness, and bin comparison.
The histogram calculator generates bar charts showing how your data distributes across equal-width bins. It supports five bin-count methods — Sturges', Square Root, Rice, Freedman-Diaconis, and Custom — and renders an interactive SVG histogram with frequency labels, mean line, and optional horizontal layout.
Histograms are the most common way to visualize continuous data distributions. They reveal central tendency, spread, skewness, modality, and outliers at a glance. This calculator goes beyond basic bar charts to include density values, cumulative frequencies, and a side-by-side comparison of bin methods.
Enter your data, choose a binning method, and get a complete histogram analysis with publication-quality visualization and detailed statistics. Check the example with realistic values before reporting. Use the steps shown to verify rounding and units. Cross-check this output using a known reference case. Use the example pattern when troubleshooting unexpected results. Validate that outputs match your chosen standards. Check the example with realistic values before reporting.
The histogram is the most fundamental tool for understanding data distributions. This calculator provides 5 binning methods, both vertical and horizontal orientations, density values for PDF overlay compatibility, and a complete comparison of bin methods — everything you need for exploratory data analysis and publication-quality visualizations. Keep these notes focused on your current workflow. Tie the context to real calculations your team runs.
Sturges': k = 1 + 3.322 log₁₀(n). Freedman-Diaconis: width = 2 × IQR × n^(-1/3). Density = (relative frequency) / bin width. Pearson skewness = 3(mean − median) / SD.
Result: 5 bins, width 6.0, modal bin [73, 79) with frequency 5, near-symmetric skewness
Sturges' rule gives 5 bins for 15 data points. The histogram shows data concentrated in the middle bins with a slight left skew (Pearson skewness = −0.07). The red mean line at 81.5 sits slightly left of the tallest bar.
Bin width is the single most important parameter in histogram construction. Too narrow and you see noise (every random fluctuation creates its own bar). Too wide and you see nothing (structure is smoothed away). The Freedman-Diaconis rule (width = 2 × IQR × n^{-1/3}) is the most principled automatic choice because it adapts to both sample size and data variability.
Statistical process control (SPC) uses histograms to verify that manufacturing measurements follow the expected distribution. A centered, bell-shaped histogram indicates a stable process. Skewness or bimodality signals problems. The histogram is compared against specification limits to estimate defect rates.
As bin width decreases and sample size increases, the histogram approaches the true probability density function. Kernel density estimation (KDE) achieves this smooth limit without binning artifacts. However, histograms remain preferred when exact bin counts matter or when explaining data to non-technical audiences.
Start with Sturges' rule for small/normal data or Freedman-Diaconis for larger or skewed data. Then adjust visually: too few bins create a flat, uninformative chart; too many make it spiky. The goal is to reveal the data's shape without noise. Most real datasets work well with 5–20 bins.
Histograms display continuous data grouped into bins — bars touch each other because the ranges are contiguous. Bar charts display categorical data — bars are separated because categories are distinct. Histograms show distributions; bar charts show comparisons.
A density histogram scales bar heights so that the total area of all bars equals 1. This makes it a probability distribution estimate and allows you to overlay theoretical PDFs (like the normal curve). The y-axis shows density (= relative frequency / bin width) instead of frequency.
Sturges' rule assumes normality and depends only on sample size n. Freedman-Diaconis uses the IQR (interquartile range) to adapt to the data's actual spread, making it more robust for skewed or heavy-tailed distributions. It typically produces narrower bins for tight data and wider bins for spread data.
Right-skewed: longer right tail, mean > median, more data clustered left. Left-skewed: longer left tail, mean < median, data clustered right. Symmetric: mirror image around center, mean ≈ median. The histogram's shape should match the numerical skewness measure.
Yes — outliers appear as isolated bars separated from the main body of the histogram by empty bins. However, histograms are less precise than box plots for outlier detection because the bin boundaries may obscure individual extreme values.