Beginner

Uniform Distribution Calculator

Compute interval probabilities, mean, and variance for a continuous uniform (rectangular) distribution on [a, b].
Lower bound of the distribution
Upper bound of the distribution
Left edge of P(c < X < d)
Right edge of P(c < X < d)
Probability P(c < X < d)
0.3000

Area of the shaded rectangle under the constant density

01.32.53.856.37.58.810Uniform support [a, b] — highlighted strip is P(c < X < d)
Mean
5
Variance
8.3333
Standard deviation
2.8868
Density (height)
0.1
Step by step
  1. 1

    Width (b − a)

    10 − 0 = 10
  2. 2

    Density (height)

    1 ÷ 10 = 0.1
    The probability density is constant across the entire support [a, b].
  3. 3

    Overlap of (c, d) with [a, b]

    5 − 2 = 3
  4. 4

    Probability P(c < X < d)

    3 ÷ 10 = 0.3000
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
P(c < X < d) = (min(d,b) − max(c,a)) / (b − a); Mean = (a+b)/2; Var = (b−a)²/12
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

uniform distribution
uniform probability
continuous uniform
rectangular distribution
equally likely outcomes
uniform pdf
uniform random probability

APA

TG we-Calculate Editorial Team. (2026). Uniform Distribution Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/uniform-distribution-calculator

Chicago

TG we-Calculate Editorial Team. "Uniform Distribution Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/uniform-distribution-calculator.

IEEE

TG we-Calculate Editorial Team, "Uniform Distribution Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/uniform-distribution-calculator

BibTeX

@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?