Want a Custom tool for Yourself?

Need a Custom Tool? We build custom tools that can save hours per employee per day.

Uniform Distribution Calculator

Work with the uniform distribution to get probabilities, CDF, PDF, quantiles, samples, and common measures. Choose the mode you need here.

Enter the Details

Mode:

Probability type:

Pararmeter (a):

Pararmeter (b):

x:


Result will appear here...


Last updated: April 18, 2026

Created by: Eon Tools Dev Team

Reviewed by: Ankit Khatiwada



What the uniform distribution calculator does

The continuous uniform distribution is the one where every value in a range is equally likely. This calculator works with it in several ways: probabilities over a range, the density and cumulative functions, quantiles, random samples, and the standard summary measures, all from just two numbers, the lower and upper ends of the range.

It is the simplest continuous distribution and the baseline that others are compared against. Below is how it works and what each mode gives you.

How to use it

  1. Choose a mode, such as probability, density, cumulative, quantile, sample, or common measures.
  2. Enter the two parameters, the lower end a and the upper end b, plus any value the mode needs.
  3. Press Calculate for the result, or Reset to clear it.

The distribution where everything is equally likely

The uniform distribution spreads probability evenly across a range from a to b. No value in that range is favoured over any other, which is why its density is a flat line, a rectangle sitting over the interval. Outside the range, nothing can happen, so the density there is zero.

This even spread is what makes it the model for pure, unbiased randomness. A number chosen at random between 0 and 1, or a bus equally likely to arrive at any moment in the next half hour, both follow a uniform distribution. Its flatness also makes it the reference point people picture when they say something is chosen "completely at random" over a range.

How the probabilities are worked out

Because the density is flat, probability is just proportion of length. The chance of landing in any stretch of the range equals the width of that stretch divided by the width of the whole range:

P(over a stretch) = width of the stretch ÷ (b minus a)

So the chance of falling in the lower half is exactly one half, and the chance of falling in any interval is however much of the total range it covers. The density itself is one divided by the range width, the constant height that makes the whole rectangle have an area of 1, as every probability distribution must.

The modes it offers

The probability mode gives the chance of being below a value, above it, or between two values. The density function returns the flat height of the curve, and the cumulative function returns the probability up to a value, which rises in a straight line from 0 at a to 1 at b.

The quantile function runs that in reverse, turning a probability back into the value at that point of the range. The sample generator produces random draws from the distribution, and common measures reports the summary statistics. Together they cover both the theory of the distribution and its practical use.

The mean and variance

The mean of a uniform distribution sits exactly in the middle of the range, the average of the two ends, which is obvious once you picture the symmetric rectangle. The median is the same, since the distribution is perfectly balanced. The calculator reports both, and they are always equal here.

The variance is the range width squared, divided by twelve. The wider the range, the larger the spread, and the division by twelve is a fixed feature of the rectangular shape. It is worth knowing because the uniform's variance often appears as a building block, for instance in rounding error, where a value rounded to the nearest unit is off by an amount that is uniformly distributed.

A worked example

Suppose a bus is equally likely to arrive at any time in the next 30 minutes, a uniform distribution from 0 to 30. What is the chance of waiting 10 minutes or less?

That is the proportion of the range below 10, which is 10 divided by 30, about 33 percent. The mean wait is the middle of the range, 15 minutes, and the variance is 30 squared over 12, that is 75, giving a standard deviation of about 8.7 minutes. Simple length-proportions answer every probability question for this distribution.

Entering your values

Enter the lower end a and the upper end b, with a smaller than b, and any value the mode requires. For the quantile mode, the probability must be between 0 and 1. Probabilities are proportions of the range, so they are easy to check by eye against how much of the interval you are asking about.

Questions people ask

What is the continuous uniform distribution?

The distribution where every value in a range from a to b is equally likely. Its density is a flat rectangle over the range and zero outside it.

How do I find a probability?

Take the width of the stretch you are asking about and divide by the width of the whole range. The chance of any interval is the fraction of the range it covers.

Where is the mean?

Exactly in the middle of the range, the average of the two ends. The median is the same, since the distribution is symmetric.

What is it used for?

As the model for unbiased randomness over a range, for generating random values, and as a building block, such as describing rounding error.

References

A quick note on where the methods here come from. The continuous uniform distribution is set out in the NIST/SEMATECH e-Handbook of Statistical Methods, the US government's public statistics reference. OpenStax Introductory Statistics is a free, widely used textbook covering the uniform distribution.

  1. NIST/SEMATECH e-Handbook of Statistical Methods (the uniform distribution). https://www.itl.nist.gov/div898/handbook/
  2. OpenStax, Introductory Statistics (the continuous uniform distribution). https://openstax.org/details/books/introductory-statistics-2e


Ankit Khatiwada

Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.