Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Freedman–Diaconis Histogram Width

Plan histogram bin width and count from sample size, range, and interquartile range.

Statistics workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaWidth = 2*iqr/n**(1/3); Bins = max(1,ceil((max-min)/(2*iqr/n**(1/3))))
Sources and model references

Made for real tasks

  • Plan histogram bin width and count from sample size, range, and interquartile range.
Explore step-by-step workflows →

Worked example

Inputs

Sample size
1000 count
Interquartile range
5 number
Observed minimum
0 number
Observed maximum
30 number

Expected results

Width
1 number
Bins
30 bins

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter sample size, interquartile range, observed minimum, observed maximum.
  2. Use the displayed units and confirm the model assumptions.
  3. Calculate and compare the outputs against your input scenario.

Try this example

{
  "n": 1000,
  "iqr": 5,
  "min": 0,
  "max": 30
}

Accuracy and scope

Suggested width only; does not count samples into bins. Zero-IQR datasets require a different binning rule.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.