Uniform Distribution Calculator

Enter interval bounds a and b to evaluate uniform distribution probabilities and descriptive statistics at any point x.

PDF f(x): 0.1000

CDF F(x): 0.6000

Survival S(x): 0.4000

Mean: 5.0000

Variance: 8.3333

How to Use This Calculator

  1. Enter the lower and upper bounds of the uniform distribution.
  2. Provide an x value to evaluate the density and cumulative probability.
  3. Use the summary statistics to describe the distribution's center and spread.
  4. Apply results to modeling equal-likelihood intervals, random number generation, or simulation tasks.

Formula

f(x) = 1 / (b − a), for a ≤ x ≤ b

F(x) = (x − a) / (b − a), for a ≤ x ≤ b

Mean = (a + b) / 2 • Variance = (b − a)² / 12

The continuous uniform distribution assumes equal probability density over the interval [a, b].

Full Description

Uniform distributions model scenarios where outcomes are equally likely within a continuous range, such as random offsets, idle times, or simple Monte Carlo simulations. Because density is constant, probabilities correspond to interval widths relative to the total range. The distribution is fully characterized by its endpoints.

Frequently Asked Questions

What if x is outside [a, b]?

The PDF is 0 and the CDF is 0 (for x < a) or 1 (for x > b).

Can a equal b?

No. The distribution collapses to a point when a = b. Ensure a < b for continuous uniform models.

How do I sample from Uniform(a, b)?

Use random number generators (like Math.random()) scaled by (b − a) and shifted by a.