Statistics

Uniform Distribution Calculator

Every value between a and b equally likely: interval probabilities by pure geometry, the density 1/(b − a), mean and variance from the endpoints — with x outside [a, b] answered exactly 0 or 1, named.

Uniform Distribution Calculator

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

The interval
P(X ≤ x)
—
Density and interval arithmetic—
Mean and variance from the endpoints—
Outside the support, exactly—
Geometry, not calculus—

What this result does not account for

  • Flat within [a, b], zero outside — no bell, no tail
  • One interval only; the discrete dice-face uniform is a different object
● Zero-Server Execution Updated 11 Aug 2026 Reviewed by Sana Khalid IEEE-754 Double Precision

In short: A bus comes sometime in the next 10 minutes, all times equally likely (a = 0, b = 10): the chance it arrives within 2.5 minutes is (2.5 − 0)/10 = 0.25, the density is 1/10 = 0.1 everywhere, the mean is 5 and the variance (b − a)²/12 = 8.333333. Outside the support there is no smoothing to do: x below a gets exactly 0, x above b exactly 1, and the page says which wall it hit rather than returning a clipped number in disguise. And b ≤ a is refused — an interval needs two ends in order.

Formula

P(X ≤ x) = (x − a)/(b − a) · f(x) = 1/(b − a) · Var = (b − a)²/12

Every probability is a ratio of lengths on one line segment — the only distribution whose answers you can draw to scale and check with a ruler.

Worked Example

  1. Give the two endpoints a < b and the point x.
  2. Read P(X ≤ x) as a length ratio; the density card shows the same thing as 1/(b − a).
  3. The moments come from the endpoints alone: mean (a+b)/2, variance (b − a)²/12.
  4. If x lies outside [a, b], the answer is exactly 0 or exactly 1 — the card names the wall.

a = 0, b = 10, x = 2.5: P = 0.25, density 0.1, mean 5, variance 8.333333. x = −3 → exactly 0; x = 14 → exactly 1, both named. b ≤ a refused.

Strengths & Limits Of This Model

Where this engine is strong

  • Every answer is checkable geometry — length ratios on a line
  • Outside-support values answered exactly and named, never clipped silently

Where it stops

  • No inverse quantile mode (percentile → x is trivial algebra: x = a + p(b − a))
  • No discrete uniform (dice, lottery balls) mode

Risk & accuracy notice. The uniform is the distribution of assumed ignorance, and the assumption is the risk: real arrival times bunch, real errors centre, and “equally likely anywhere in the window” is a claim about the world, not a default. It is also the model inside every simulator — when the generator’s uniform is subtly unfair, every distribution built on it inherits the bias.

Practical Use Cases

Scheduling

equally-likely arrival windows

Simulation

the engine behind every random draw

Teaching

probability as literal geometry

Methodology & Editorial Standards

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Sana Khalid Principal Front-End Engineer · ApexConverter

Statistical inference, experiment design and numerical stability. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Uniform Distribution Calculator — 8 Expert FAQs

8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

Why is the uniform the “equally likely” distribution?

Because its density is one flat height over the whole interval — no point or region is favoured. That makes every probability a ratio of lengths: the chance of landing in a sub-interval is just its length over the whole. You can check this page with a ruler.

What does variance (b − a)²/12 measure here?

Spread scales with the SQUARE of the window width — double the interval and the variance quadruples (8.333333 for width 10, 33.333333 for width 20). The 12 is the flat shape’s signature: all mass spread evenly, none bunched at a centre.

Why exactly 0 or exactly 1 outside the support?

Because the model SAYS so: no density lives below a or above b, so there is no tail to approximate. P(X ≤ −3) = 0 and P(X ≤ 14) = 1 are exact statements of the model, and the card names which wall was hit instead of handing you a rounded 0.9999999 as if it were computed.

Is the bus example realistic?

Only if the schedule really is memoryless-flat in the window — a bus on a 10-minute headway that you arrive to at a random moment is roughly uniform; a bus with rush-hour bunching is not. The uniform is the model of maximum ignorance WITHIN a known range, and the range must be honest.

How is this different from the exponential wait?

Different ignorance. Uniform: you know the event lands in a bounded window, equally likely anywhere in it. Exponential: you know only a rate, and the wait can stretch arbitrarily. Bounded-flat vs unbounded-decaying — the two pages cross-link because choosing between them is the modelling decision.

Where does the uniform earn its keep in computing?

Every random-number generator produces uniforms first: any other distribution is a transformation of this one. It is the flour of simulation — nothing is baked without it, and this page is the recipe card for its three properties.

What happens at a = x or b = x exactly?

The boundary belongs to the interval: P(X ≤ a) = 0 and P(X ≤ b) = 1, and the page answers them through the same (x − a)/(b − a) arithmetic — 0 and 1 fall out naturally, no special case needed.

Why refuse b ≤ a?

An interval with its ends crossed has no inside: the density 1/(b − a) would go negative or infinite, and every probability is a length ratio that needs b > a to mean anything. The refusal names the order problem — swap the endpoints and the page computes.

Related Statistics Engines