Uniform Distribution Calculator
Compute interval probabilities, constant density, mean and spread between two bounds.
What it does
The continuous uniform distribution is the simplest model for a value that can land anywhere in a fixed range with no preference for one spot. It describes rounding error, the position of a random point on a line, or a time that is equally likely to fall anywhere inside a scheduled window.
Because the density is flat, probabilities reduce to lengths. The chance of landing in a slice is the width of that slice divided by the total width. That makes this distribution a good first example for learning how continuous probability works.
The tool takes the two bounds and answers the usual questions: cumulative chance up to a value, chance above a value, chance inside an interval and the density level. It also reports the mean and standard deviation, both of which follow directly from the width.
Uniform behaviour is rare in measured data. Heights, incomes and waiting times cluster. Use this model when you genuinely have no reason to favour one value over another, or when you want a neutral baseline before gathering evidence.
How to use
- Choose the question you want answered from the first menu.
- Enter the lower and upper bounds of the possible range.
- Enter the value x you are asking about.
- For a between question, enter a second value no smaller than x.
- Read the probability as a decimal and a percent.
- Check that the mean lies halfway between your bounds.
Formula
- a
- Lower bound of the interval in the same units as x.
- b
- Upper bound of the interval, strictly greater than a.
- x
- The value or threshold being evaluated.
- f(x)
- Constant density inside the interval and zero outside it.
Below a the cumulative probability is zero, and above b it is one. The probability of landing in any slice is the overlap length divided by b minus a, clipped to the range from zero to one. The chance at one exact point is zero for a continuous variable, which is why a density is reported instead.
Worked example
Example: uniform from 0 to 10, x = 3
Lower bound 0, upper bound 10, asking for the probability of a value at most 3.
- Interval width: 10 - 0 = 10.
- Density: 1 / 10 = 0.1000.
- Favourable slice: 3 - 0 = 3.
- Cumulative probability: 3 / 10 = 0.3000, or 30.00 %.
- Mean: (0 + 10) / 2 = 5.
- Variance: 10 squared / 12 = 8.3333, so the standard deviation is 2.8868.
- Tool shows probability 0.3000 (30.00 %), density 0.1000, mean 5 and sd 2.8868.
Reference table
| Value x | P(X <= x) | P(X >= x) |
|---|---|---|
| 2 | 0.2000 (20.00 %) | 0.8000 (80.00 %) |
| 5 | 0.5000 (50.00 %) | 0.5000 (50.00 %) |
| 8 | 0.8000 (80.00 %) | 0.2000 (20.00 %) |
Limits
- Assumes every value in the interval is equally likely.
- Cannot represent clustering or a preferred central value.
- Endpoints are continuous so including or excluding them changes no probability.
- Negative and positive bounds are allowed but the upper must exceed the lower.
Common mistakes
- Dividing by the upper bound instead of the interval width.
- Treating the density as the probability of an exact value.
- Entering bounds in the wrong order.
- Forgetting that a slice outside the interval has probability zero.
- Assuming a uniform shape for data that clearly has a peak.
Try it yourself
Quick checks. Answers sit tucked under each question.
On [0, 10], what is the chance of a value between 2 and 6?
0.4000 (40.00 %), because the slice has width 4 out of 10.
On [0, 10], what is the chance of a value at least 8?
0.2000 (20.00 %), from a slice of width 2.
What are the density and mean on [0, 10]?
Density 0.1000 and mean 5, with standard deviation 2.8868.
Questions
What does a flat density mean?
Equal length intervals have equal probability, no matter where they sit inside the range.
Why is the probability at one exact point zero?
A single point has no width, so its slice of the interval contributes nothing to area under the density.
Can the interval start at a negative number?
Yes. The formulas use only the difference between the bounds.
What is the standard uniform distribution?
The case with bounds 0 and 1, often used to generate other random variables.
How is this different from a discrete uniform?
A discrete version spreads chance over a finite list of outcomes, while this one spreads it over a continuous range.
When should I avoid this model?
Whenever measurements pile up around a centre or tails, since a flat shape would misstate the chances.
Sources
- NIST and SEMATECH e-Handbook, Uniform Distribution
- Penn State STAT 414, Lesson 14: Continuous Random Variables