Uniform Distribution Calculator
The continuous distribution where every value in a range is equally likely — probabilities, mean, variance and percentiles.
On the interval [a, b], the density is a constant 1/(b − a).
How the uniform distribution calculator works
On the interval [a, b], the density is a constant 1/(b − a). The probability of landing in any sub-interval is just its share of the width, which makes every calculation a matter of ratios.
It is the maximum-entropy distribution when all you know is the range: assuming anything more structured would be claiming knowledge you do not have.
Formula: P(x₁ < X < x₂) = (x₂ − x₁)/(b − a); mean = (a+b)/2
Worked examples
| Inputs | P(x₁ < X < x₂) | Note |
|---|---|---|
| 3 to 7 within 0 to 10 | 40% | 40% |
| The whole range | 100% | 100% |
| Beyond the range | 0% | 0% |
FAQFrequently asked questions
What is a uniform distribution?
One where every value in a range is equally likely — a flat density.
Why is the variance (b−a)²/12?
It falls out of integrating (x − mean)² across the flat density. The 12 is a consequence of the geometry, not a convention.
Where does it come up?
Random number generators, rounding error, arrival times within a known window, and as an uninformative prior in Bayesian analysis.
Is the discrete version different?
Yes — for n equally likely integers the variance is (n² − 1)/12, which is why a fair die has variance 35/12.
Why is it the maximum-entropy choice?
Because among all distributions on a fixed range, it assumes the least. Any other shape asserts knowledge about where values cluster.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.