Skip to content
FiftyCalc Free calculators for all 50 states

Uniform Distribution Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter the lower and upper bounds of a continuous uniform distribution, a value x and an interval to get the density, P(X ≤ x), the probability of the interval and the mean and variance.

Result

Sample figures

P(X ≤ x)—

Density f(x) —

  • P(interval start ≤ X ≤ interval end)—
  • Mean (a + b) ÷ 2—
  • Variance (b − a)² ÷ 12—
  • Standard deviation—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Uniform Distribution Calculator

Lower bound (a): enter a number. Prefilled example: 0.

Upper bound (b): enter a number. Prefilled example: 10.

Value x: enter a number. Prefilled example: 3.

Interval start: enter a number. Prefilled example: 2.

Interval end: enter a number. Prefilled example: 5.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Lower bound (a): enter a number.
  2. Upper bound (b): enter a number.
  3. Value x: enter a number.
  4. Interval start: enter a number.
  5. Interval end: enter a number.
  6. Read the result: P(X ≤ x); the panel also shows Density f(x), P(interval start ≤ X ≤ interval end), Mean (a + b) ÷ 2, Variance (b − a)² ÷ 12 and Standard deviation.

How this calculator works

Continuous uniform distribution U(a, b): density f(x) = 1 ÷ (b − a) for a ≤ x ≤ b and 0 elsewhere; cumulative distribution F(x) = (x − a) ÷ (b − a) between a and b, 0 below a and 1 above b.

P(c ≤ X ≤ d) = (length of the part of [c, d] that lies inside [a, b]) ÷ (b − a). Mean = (a + b) ÷ 2, variance = (b − a)² ÷ 12, standard deviation = (b − a) ÷ √12.

The formula

  1. Cdf={0if x<a1if x>bx−ab−aotherwise
Symbols used in the formula
SymbolMeaning
aLower bound
bUpper bound
xValue x
CdfP(X ≤ x)

Worked example

Lower bound (a)0
Upper bound (b)10
Value x3
Interval start2
Interval end5
Density f(x)0.1
P(interval start ≤ X ≤ interval end)0.3
Mean (a + b) ÷ 25
Variance (b − a)² ÷ 128.3333
Standard deviation2.8868
  1. Cdf=3−010−0=0.3

P(X ≤ x) 0.3

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

For a uniform distribution from 0 to 10, what is P(X ≤ 3)?

(3 − 0) ÷ (10 − 0) = 0.3. The probability between 2 and 5 is 3 ÷ 10 = 0.3, the mean is 5 and the variance is 8.3333.

What is the variance of a uniform distribution?

(b − a)² ÷ 12; for a = 0 and b = 10 it is 100 ÷ 12 = 8.3333.

Questions answered

Related calculators