Continuous Uniform Distribution Calculator

Continuous Uniform Distribution Calculator

Connect via MCP →

Enter Calculation

Formula

Show calculation steps (2)
  1. Lower Cumulative Probability P(X < x)

    Lower Cumulative Probability P(X < x): Continuous Uniform Distribution Calculator

    Lower CDF: 0 below a, linear ramp on [a,b], 1 above b.

  2. Upper Cumulative Probability P(X > x)

    Upper Cumulative Probability P(X > x): Continuous Uniform Distribution Calculator

    Upper CDF is the complement of the lower CDF.

Advertisement

Results

A
Probability density f(x)
0.3333333333
continuous uniform distribution U(a, b)
Lower cumulative probability P(X ≤ x) 0.3333333333
Upper cumulative probability P(X > x) = Q 0.6666666667

What is the continuous uniform distribution?

The continuous uniform distribution U(a, b) describes a random variable that is equally likely to take any value across an interval from a to b. Because the probability is spread evenly, its probability density is a flat constant over the support and zero everywhere else. This calculator is pure mathematics and applies identically everywhere — there is no regional or jurisdictional content.

Rectangular PDF of a continuous uniform distribution between a and b
The PDF of U(a,b) is a flat horizontal line of height \(1/(b-a)\) between a and b, and zero elsewhere.

How to use this calculator

Enter the evaluation point x, the lower boundary a, and the upper boundary b (with a ≤ b). The tool returns three values: the probability density \(f(x)\), the lower cumulative probability \(P(X \le x)\), and the upper (complementary) cumulative probability \(P(X > x) = Q\). The two cumulative probabilities always sum to 1.

The formula explained

Let the width be \(w = b - a\). Inside the interval the density is constant: \(f(x) = 1/w\) for \(a \le x \le b\), and \(f(x) = 0\) outside. The cumulative distribution grows linearly:

$$f(x) = \begin{cases} \dfrac{1}{b - a} & a \le x \le b \\[0.6em] 0 & \text{otherwise} \end{cases}$$

$$F(x) = \begin{cases} 0 & x < a \\[0.6em] \dfrac{x - a}{b - a} & a \le x \le b \\[0.6em] 1 & x > b \end{cases}$$ for \(a \le x \le b\), equals 0 below a, and equals 1 above b. The upper tail is simply $$P(X > x) = 1 - \dfrac{x - a}{b - a}.$$ The width must be positive (\(b > a\)); when \(a = b\) the density is undefined because of division by zero, and the distribution degenerates to a single point.

Advertisement
Shaded area under the uniform PDF representing the cumulative probability up to x
The CDF value \(F(x)\) equals the shaded rectangular area from a up to x, equal to \((x-a)/(b-a)\).

Worked example

Take \(x = 2\), \(a = 1\), \(b = 4\). The width is \(w = 4 - 1 = 3\). Since \(1 \le 2 \le 4\), x is inside the support. The density is \(f(2) = 1/3 \approx 0.3333\). The lower cumulative probability is \(F(2) = (2 - 1)/3 = 1/3 \approx 0.3333\), and the upper is \(Q(2) = (4 - 2)/3 = 2/3 \approx 0.6667\). As a check, \(F + Q = 1/3 + 2/3 = 1\).

FAQ

What happens when x is outside [a, b]? The density is exactly 0. If \(x < a\) then \(F(x) = 0\) and \(Q(x) = 1\); if \(x > b\) then \(F(x) = 1\) and \(Q(x) = 0\).

Why must b be greater than a? The density is \(1/(b - a)\). If \(a = b\) the denominator is zero, so the continuous density is undefined; that case is a degenerate point mass rather than a continuous distribution.

Is the result a percentage? No. All outputs are dimensionless. The cumulative probabilities lie between 0 and 1; multiply by 100 if you want a percentage.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators →