Histogram Calculator

Explore numerical distributions using customizable bins, statistical summaries, density overlays, transformations, outlier analysis, dataset comparisons, and downloadable machine learning visualizations instantly in your browser.

Histogram results

The result appears above the calculator form after analysis.
Ready
Distribution interpretation
Selected bin observations
Click a histogram bar to inspect its observations.

Statistical summary

Bin frequency table

DatasetBinLowerUpperMidpointWidth FrequencyRelativePercentCumulativeCumulative %Density

Dataset input

Paste values, upload CSV or TXT files, and compare up to five datasets.

Bins and frequency

Transformations and outliers

Use 1.5 for IQR or 3 for Z-scores.

Distribution overlays and references

Chart customization

Formula used

Frequency: fᵢ = number of observations in bin i
Relative frequency: rᵢ = fᵢ / n
Percentage frequency: pᵢ = 100 × fᵢ / n
Frequency density: dᵢ = fᵢ / (n × bin width)
Cumulative frequency: Fᵢ = Σ fⱼ for j ≤ i
Freedman–Diaconis width: h = 2 × IQR × n⁻¹ᐟ³
Scott width: h = 3.5 × s × n⁻¹ᐟ³

How to use the Histogram Calculator

  1. Paste numerical observations or upload a CSV or TXT file.
  2. Add datasets when comparing training, testing, actual, or predicted distributions.
  3. Select an automatic rule, manual count, width, or custom boundaries.
  4. Choose frequency, density, transformations, outlier handling, and overlays.
  5. Customize the chart, then calculate, inspect bins, and export results.

Example data

DatasetExample valuesSuggested use
Training feature12, 14, 15, 18, 21, 25, 32, 38Inspect feature shape and outliers.
Testing feature10, 13, 16, 19, 24, 30, 36, 44Compare distribution shift.
Prediction errors-4, -2, -1, 0, 0, 1, 2, 6Check bias, tails, and spread.

Frequently asked questions

What does a histogram show?

It groups numerical observations into adjacent intervals. Bar heights describe frequency, percentage, or density.

How is a histogram different from a bar chart?

Histogram bins represent continuous numerical intervals. Bar charts usually compare separate categories with visible gaps.

Which bin rule should I choose?

Freedman–Diaconis is robust for many datasets. Sturges works well for smaller, near-normal samples.

Why do different bin counts change the shape?

Wide bins hide local structure. Narrow bins may exaggerate random noise and small fluctuations.

What is frequency density?

Frequency density divides relative frequency by bin width. It is appropriate when custom intervals have unequal widths.

Can I compare training and testing data?

Yes. Add both datasets, use shared bins, and review mean, spread, KS statistic, and PSI.

What does a right-skewed histogram indicate?

Most values are concentrated lower down. A smaller number of high observations create a longer right tail.

Should outliers be removed automatically?

No. Review their source and meaning first. Removal may discard legitimate rare observations important to machine learning.

What does the KDE curve show?

It estimates a smooth probability density. Bandwidth controls whether the curve appears smoother or more detailed.

How can histograms reveal class imbalance?

Use separate datasets for classes or filtered subsets. Compare their counts, shapes, ranges, and concentrated bins.

Can I export the analysis?

Yes. Download PNG, SVG, CSV, print to PDF, or copy the statistical results.

Related Calculators

Density Plot (KDE)Box PlotViolin PlotBar ChartCount PlotPie ChartDot PlotStrip PlotSwarm PlotECDF Plot

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.