Interactive module guide

Uniform Distribution Calculator & Guide

This uniform distribution calculator lets you calculate interval probabilities on [a, b] and see how moving either endpoint reshapes the flat density and its CDF.

Open calculator

Free · No sign-up · Calculations stay in your browser

The continuous uniform distribution assigns the same density to every value in a bounded interval from a lower bound a to an upper bound b, so probability depends only on interval length.

Equal likelihood is a strong structural claim about a mechanism, not a neutral stand-in for ignorance.

Use this page to examine the flat density, the linear cumulative curve, and interval probabilities implied by chosen bounds; the model requires a<b, and the flat shape should be justified by a mechanism such as a rounding rule or a scheduled window, not by a lack of information.

Is this the right module for my question?

Use it when

  • Use a uniform model when a mechanism confines the variable to a known interval and favors no subinterval. Classic cases are the rounding error of a value reported to a fixed unit, naturally modeled as uniform over plus or minus half that unit, and an arrival equally likely at any moment of a stated service window.
  • It is also the foundation of stochastic simulation. Pseudorandom generators produce standard uniform numbers between zero and one, and inverse-CDF sampling converts each draw into a sample from another distribution through that distribution’s quantile function. The quantile lookup on this page, Q(p)=a+p(b−a), is the uniform case of that transformation.
  • Choose it when the question asks for the probability of landing in a subinterval, exceeding a threshold, or falling below a planning quantile, and defensible bounds are available. The interval calculator, the point calculator with PDF, CDF, and survival values, and the quantile lookup answer those questions directly from a and b.

Choose another method when

  • Do not adopt a uniform distribution merely because nothing is known about a quantity. Not knowing the distribution is a statement about the analyst; equal likelihood is a statement about the process, and the two are not interchangeable. When the shape is genuinely uncertain, compare candidate models or run a sensitivity analysis rather than defaulting to a flat curve.
  • Avoid it for measurements that cluster around a typical value and taper off, for waiting times with no fixed maximum, and for variables whose limits are soft, unknown, or estimated from the data at hand. A normal or exponential model, or another family with compatible support, usually represents such mechanisms more honestly.
  • A variable confined to an interval is not automatically flat across it. Proportions, scores, and bounded ratings often pile up near one end or the middle; the beta family keeps the bounded support while allowing those shapes, and it reduces to the standard uniform only when both shape parameters equal one.

Interactive tool

The calculator loads as you approach this section so the guide remains fast on mobile connections.

Example preview

Waiting inside a fixed window

Inputs
X ~ Uniform(a=2, b=8); evaluate P(3 < X ≤ 5).
Representative result
P(3 < X ≤ 5) = 2/6 ≈ 0.3333 because probability is proportional to interval length.

Illustrative only. Load the interactive tool to enter your own values and review assumptions.

Watch the explanation

2:55 min

The player loads only after you press play. You can also watch on YouTube.

Read the complete transcript

The Continuous Uniform Distribution. A six-hour service window sounds precise, but when inside that window should you actually expect arrival? A continuous uniform model answers: every equal-length part of a fixed interval receives equal probability. Its support runs from lower bound a to upper bound b, and the model requires a less than b. Inside those bounds, density is constant; outside them, density is exactly zero. That flatness must come from the mechanism, not simply from having little information.

The density is one divided by b minus a, making a rectangle whose total area equals one. Widening the interval lowers the rectangle, while narrowing it raises the rectangle without changing total probability. Probability is area, so any internal interval receives its length divided by the full interval length. The cumulative distribution rises linearly from zero at a to one at b. Inverting that ramp gives the quantile formula: a plus p times b minus a. The mean and median share the midpoint; variance is the squared width divided by twelve. For the standard uniform, a equals zero and b equals one, the starting point for simulation. Passing a standard uniform draw through another distribution's quantile function generates that target model.

Suppose a repair arrival is equally likely between hour two and hour eight of the working day. For arrival between hour three and hour five, the favorable interval is two hours long. The full window is six hours, so the probability is two sixths, or one third. Any other two-hour interval fully inside the window has exactly the same probability. The midpoint gives both mean and median: hour five; the variance is three squared hours. For a time covering ninety-five percent of arrivals, compute two plus zero point nine five times six. The result is hour seven point seven, leaving five percent of modeled arrivals later.

A flat density is not an exact-point probability; every single arrival time still has probability zero. There is no unique mode because no point inside the interval is more dense than another. Density may even exceed one for a narrow interval, because only the rectangle's area must equal one. If dispatchers front-load morning visits, the one-third probability and planning quantile are both wrong. Use historical data to challenge the equal-likelihood claim, rather than choosing observed minimum and maximum as bounds. Report the bounds, units, exact interval, and the mechanism that justifies the flat model. Explore interval probabilities, quantiles, and parameter changes free at Distri Scope dot com.

How to read the result

Read the flat PDF as equal concentration, not as a claim that anything can happen. All probability lies between a and b, any single exact value has probability zero, and only interval areas are probabilities. The point calculator therefore reports density, cumulative probability, and survival probability at x as three different numbers.

When reporting a result, state the bounds, the units, and the exact event, for example P(3<X≤5) under stated a and b. Endpoint inclusion carries zero probability in the ideal continuous model but can matter for rounded data. Parameters can be shared through the URL and the charts exported as PNG or CSV, so a reader can reproduce the figure and the numbers.

Inputs and parameter meaning

Set the lower bound a and upper bound b with the two sliders, each running from −10 to 10 in steps of 0.1; the defaults a=0 and b=1 give the standard uniform used by random number generators. The model requires a<b, so dragging a to or above b produces a calculation error until the bounds are valid again.

Inside the interval the density is the constant 1/(b−a); outside it is exactly zero. Widening the interval lowers the flat top and narrowing it raises the top, because the rectangle must always enclose a total area of one. Watch the height fall as the bounds move apart; height is a density, not a probability.

The Key Statistics panel reports the mean (a+b)/2, the variance (b−a)²/12, and the median at the same midpoint. The mode is shown as a dash because every point in the interval has equal density, so no single most likely value exists. Skewness is 0 by symmetry, and the excess kurtosis of −1.2 records a flat-shouldered shape with no tails.

Formula and available parameters

Density or probability mass

f(x)=1ba,axbf(x) = \frac{1}{b-a}, \quad a \le x \le b

Cumulative distribution

F(x)=xaba,axbF(x) = \frac{x-a}{b-a}, \quad a \le x \le b

Mean

μ=a+b2\mu = \frac{a+b}{2}

Variance

σ2=(ba)212\sigma^2 = \frac{(b-a)^2}{12}
  • Lower bound (a): interactive range -10 to 10; default 0.
  • Upper bound (b): interactive range -10 to 10; default 1.

What the method is doing

Probability under this model is geometric: any subinterval inside the bounds has probability equal to its length divided by b−a, regardless of where it sits. The CDF is the linear ramp F(x)=(x−a)/(b−a), rising at a constant rate from zero at a to one at b, which is why equal-length windows anywhere inside receive equal probability.

The quantile function inverts that ramp: Q(p)=a+p(b−a). The same identity underlies inverse-CDF sampling, because applying a target distribution’s quantile function to a standard uniform draw produces a variable with the target distribution. The uniform is thus the raw material from which simulated normal, exponential, and other variates are manufactured.

Worked example: arrival within a service window

A repair visit is promised between hour 2 and hour 8 of the working day, and the dispatcher claims that no part of the window is favored. Model the arrival time as X~Uniform(2,8). The customer wants the probability of arrival between hour 3 and hour 5, a summary of center and spread, and a time by which arrival is 95% assured under the model.

  1. 1Set a=2 and b=8. The density is 1/6 across the window, and the interval calculator gives P(3<X≤5)=(5−3)/(8−2)=2/6=1/3≈0.3333. Probability is proportional to interval length, so any two-hour span inside the window carries the same one-third probability no matter where it sits.
  2. 2The Key Statistics panel shows the mean (2+8)/2=5, which also equals the median, and the variance (8−2)²/12=36/12=3 in squared hours. The dash in the mode field is a reminder that every arrival time in the window is equally dense, so no single time is the most likely one.
  3. 3For the planning question, the quantile lookup gives Q(0.95)=2+0.95×6=7.7. Under the model, 95% of arrivals occur by hour 7.7, and the survival value at x=7.7 confirms that only 5% fall later.

Interpretation

These numbers are exactly as trustworthy as the equal-likelihood claim. If the dispatcher actually front-loads morning appointments, the flat model misstates both the one-third figure and the 7.7-hour planning quantile. Before using 7.7 as a staffing cutoff, compare the claimed window against past arrival records in the Data Fitting workspace.

Common mistakes

  • Do not read the flat height as a probability. Over a wide interval the density sits far below one, and over an interval narrower than one unit it exceeds one; a density above one is not an error, because only areas are probabilities.
  • Do not encode ignorance as flatness. A uniform claim is also scale dependent: if X is uniform, a transformed quantity such as X² or log X is not, so “no information” cannot be represented by a flat curve in every parameterization at once.
  • Do not set the bounds from the smallest and largest observed values. A sample minimum and maximum understate the true range, and the resulting model assigns zero probability to values just beyond the data. Take bounds from the mechanism, such as the rounding unit or the published window; errors in the bounds propagate into every probability.

Limits and independent validation

This page visualizes an assumed model; it does not estimate a and b from observations or test whether data are uniform, so use the Data Fitting workspace for observed samples. The sliders cover −10 to 10 in steps of 0.1; shift and rescale variables on other ranges first, a transformation the uniform family tolerates exactly.

The hard cutoff at the bounds is itself a strong assumption. Zero density outside the interval calls any spillover impossible, so probabilities near the edges are sensitive to small errors in a or b. Processes with soft limits may need a bounded model with interior shape, or a mixture, rather than a strict rectangle.

Before using the result

  • Justify both the interval and the flatness from the mechanism, such as a written schedule, a documented rounding rule, or the design of a random number generator. When historical data exist, divide the interval into equal-width bins and check that counts are comparable and that no observations fall past the claimed bounds.
  • Recompute one interval probability by hand as length divided by b−a and one quantile as a+p(b−a), then confirm the reported mean and variance against (a+b)/2 and (b−a)²/12. Record a, b, units, and the exact event, and share the parameterized URL so another analyst can reproduce the result.

See every option in the Probability Distribution Explorer or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.