Uniform Distribution Calculator
Compute mean, variance, density, and cumulative probability for a continuous uniform distribution on [a, b].
How it works
- 1Enter the lower bound a and upper bound b to define [a, b]. Every point is equally likely, giving a flat density of 1 ÷ (b − a).
- 2Enter a value x to evaluate the CDF. P(X ≤ x) is 0 for x ≤ a, 1 for x ≥ b, and (x − a) ÷ (b − a) in between.
- 3The calculator shows the mean (a + b) ÷ 2, variance (b − a)² ÷ 12, standard deviation, density f(x), and P(X ≤ x).
Use cases
- Modelling a random arrival time equally likely anywhere within a fixed window, like a bus between two scheduled times.
- Generating random numbers with a known range in simulations — the uniform is the basis of most pseudorandom generators.
- Quality control where a measurement error is bounded and equally likely across its range.
Frequently asked questions
What does the density f(x) = 1 ÷ (b − a) mean?
Because every outcome in [a, b] is equally likely, probability is spread evenly. The density is the same constant everywhere inside [a, b] and 0 outside. Multiply it by a sub-interval length to get that interval’s probability.
Why is the mean exactly halfway between a and b?
By symmetry the uniform distribution has no skew, so its expected value is the midpoint (a + b) ÷ 2. You can verify it by integrating x · f(x) from a to b.
What happens when x is outside [a, b]?
P(X ≤ x) is clamped to 0 when x ≤ a (impossible) and to 1 when x ≥ b (certain). The density describes the distribution shape, not a probability at a single point.
Related tools
See all →Calculate the area and perimeter of a rectangle from its width and height, with a labeled diagram.
Calculate the area and circumference of a circle from its radius, with a labeled diagram.
Calculate the area (Heron’s formula) and perimeter of a triangle from its three sides.
Calculate the area and perimeter of a trapezoid from its two parallel sides, height, and legs.