Uniform Distribution Calculator screenshot

Uniform Distribution Calculator

Density, both tails, mean, variance and standard deviation of a continuous uniform variable.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Runs in this tab
No signup

What this page computes

Type the lower bound a, the upper bound b and a value x. The density is 1/(b − a) inside the interval and zero outside; the lower tail is (x − a)/(b − a), clamped to 0 and 1; the upper tail is its complement. The page prints the mean (a + b)/2, the variance (b − a)²/12, the standard deviation and the width. Figures print to six significant figures.

The uniform model says every value in the interval is equally likely, which is a strong claim the page cannot check against data. It refuses an upper bound that is not above the lower one, since the width and the density would divide by zero.

All figures are computed in the tab; the same bounds and value always print the same answer.

The page evaluates the uniform distribution on an interval: the density 1/(b − a), the lower tail P(X ≤ x) = (x − a)/(b − a), the upper tail, and the mean (a + b)/2 with the variance (b − a)²/12. On 0 to 10 at x = 3 the density is 0.1, the lower tail 0.3 and the upper tail 0.7, with a mean of 5 and a standard deviation of 2.88675. An upper bound that is not above the lower bound is refused, since the interval would have no width.

Get uniform density and both tails from two bounds and a value, with the mean and variance printed.

How to use it

Type the lower bound a, the upper bound b and the value x. b must be above a; anything else is refused by name. The x value may sit outside the interval, in which case the tails correctly read 0 or 1 rather than being clamped to a plausible-looking middle value.

Both tails, and what happens outside the bounds

The two tails add to exactly 1 for an x inside the interval, because the uniform distribution is continuous. The mean is the midpoint and the variance is (b − a)²/12, both printed, which is why a wider interval has the same mean and a much larger variance. Outside the interval the density is zero and the cumulative function is flat at 0 or 1 — the page reports that rather than refusing the input.

What to Expect

Best for

  • Equally likely values between two bounds

What this tool keeps

  • Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.

Sample output

pdf f(3) = 0.1 P(X ≤ 3) = 0.3 (lower tail) P(X ≥ 3) = 0.7 (upper tail) mean = (a + b)/2 = 5, variance = (b − a)²/12 = 8.33333, sd = 2.88675 a = 0, b = 10, width = 10

Frequently asked questions

What if x is outside the interval?

The page answers honestly: the density is zero and the lower tail is 0 or 1 depending on which side x falls. It is not refused and not clamped into the middle of the interval.

Do the two tails add to 1?

Yes, for an x inside the interval, because the uniform distribution is continuous — 0.3 and 0.7 at 0 to 10 with x = 3.

Is anything uploaded?

No. The density and both tails are computed in this page from the three numbers you typed, and nothing is posted or stored.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.