Uniform Distribution Calculator
Compute interval probabilities, mean, and variance for a continuous uniform (rectangular) distribution on [a, b].
Area of the shaded rectangle under the constant density
- 1
Width (b − a)
10 − 0 = 10 - 2
Density (height)
1 ÷ 10 = 0.1The probability density is constant across the entire support [a, b]. - 3
Overlap of (c, d) with [a, b]
5 − 2 = 3 - 4
Probability P(c < X < d)
3 ÷ 10 = 0.3000
How does this calculator work?
For a continuous uniform distribution on [a, b], the density is constant at 1/(b−a). The probability P(c<X<d) is the overlap of (c,d) with [a,b] divided by (b−a). The mean is (a+b)/2 and the variance is (b−a)²/12, giving an evenly spread, equally likely set of outcomes.
Formula
How this is calculated
A continuous uniform distribution spreads probability evenly across the interval [a, b], so every outcome is equally likely. Its probability density is constant at 1/(b − a) between a and b and zero everywhere else. Enter a (the minimum) and b (the maximum); the calculator requires b > a so the width is positive and the density is defined.
The probability that X falls between c and d equals the area of the rectangle over the overlap of (c, d) with [a, b]: P(c < X < d) = (min(d, b) − max(c, a)) / (b − a). The overlap is clamped to be at least zero, so requesting an interval partly or fully outside [a, b] simply ignores the out-of-range portion, and an interval with no overlap returns probability 0.
The distribution summary statistics follow directly from the bounds: the mean sits at the midpoint (a + b)/2, the variance is (b − a)²/12, and the standard deviation is (b − a)/√12. All quantities share the same units as your inputs, and the shaded region in the chart shows exactly which slice of the constant-height density is being measured.
Frequently asked questions
Only the part of (c, d) that lies inside [a, b] counts. The formula clamps the overlap to zero or more, so any portion outside the support contributes no probability.
The density is 1/(b − a). If b ≤ a the width is zero or negative, leaving the distribution undefined, so the calculator asks for valid bounds before computing.
This is the continuous (rectangular) uniform distribution, where X can take any real value in [a, b]. The probability of any single exact point is zero; only intervals carry probability.
Also known as
TG we-Calculate Editorial Team. (2026). Uniform Distribution Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/uniform-distribution-calculator
TG we-Calculate Editorial Team. "Uniform Distribution Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/uniform-distribution-calculator.
TG we-Calculate Editorial Team, "Uniform Distribution Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/uniform-distribution-calculator
@misc{wecalculate_uniform_distribution_calculator, title = {Uniform Distribution Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/uniform-distribution-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
