Statistics

Uniform Distribution Calculator

Probability, mean and variance for a continuous uniform.

Enter your values

Results update instantly as you type — no submit needed.

Results
P(x₁ ≤ X ≤ x₂)
30%
Density f(x)
0.1
Mean
5
Variance
8.3333
Standard deviation
2.8868

Quick answer

In a continuous uniform distribution every value between a and b is equally likely, so P(x₁ ≤ X ≤ x₂) = (x₂ − x₁) ÷ (b − a).

P = (x₂ − x₁) ÷ (b − a)

At a glance

What it doesProbability, mean and variance for a continuous uniform.
CategoryStatistics
Inputs neededLower bound a, Upper bound b, From x₁, To x₂
Main outputP(x₁ ≤ X ≤ x₂)
FormulaP = (x₂ − x₁) ÷ (b − a)
CostFree — no sign-up, no download

How to use the Uniform Distribution Calculator

  1. 1Enter the interval bounds a and b.
  2. 2Enter the sub-range you want the probability for.
  3. 3Read the probability plus the summary statistics.

Inputs explained

Lower bound a
Enter the lower bound a you are working with.
Upper bound b
Enter the upper bound b you are working with.
From x₁
Enter the from x₁ you are working with.
To x₂
Enter the to x₂ you are working with.

Worked example

Using the values the calculator loads with:

Inputs

  • Lower bound a0
  • Upper bound b10
  • From x₁2
  • To x₂5

Results

  • P(x₁ ≤ X ≤ x₂)30%
  • Density f(x)0.1
  • Mean5
  • Variance8.3333
  • Standard deviation2.8868

Frequently asked questions

What is the mean of a uniform distribution?

The midpoint (a + b) ÷ 2, because the density is flat across the whole interval.

Why is the variance (b − a)²/12?

It comes from integrating the squared deviation across a flat density between a and b.

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.