Part of the Maths & Statistics suite · 235 calculators

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).

Results update as you type
Results
P(x₁ < X < x₂)
40%
Mean
Median
Variance
Standard deviation
Probability density
P(X < x₁)
P(X > x₂)
First quartile
Third quartile
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the Australian Curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About uniform distribution

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

InputsP(x₁ < X < x₂)Note
3 to 7 within 0 to 1040%40%
The whole range100%100%
Beyond the range0%0%

Frequently 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

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.