Uniform Distribution CalculatorCalculator
Calculate probability density f(x), cumulative CDF P(X ≤ x), range probabilities P(x1 ≤ X ≤ x2), mean, and variance for uniform distributions.
Uniform Distribution Bounds
Probability & Dispersion Results
Uniform Distribution Calculator - Continuous & Discrete Probability: Calculate continuous and discrete rectangular uniform probabilities, interval slicing, and variance. Free, private, and runs 100% directly in your web browser.
How to Use the Uniform Distribution Calculator
Define Interval Range [a, b]
Enter the minimum value (a) and maximum value (b) bounding the uniform distribution.
Specify Target Sub-Interval [x1, x2]
Enter the start and end coordinates of the interval whose probability you want.
Evaluate Interval Probability
Read P(x1 ≤ X ≤ x2) representing the area under the flat probability density curve.
Inspect Central Tendency & Spread
Review the midpoint mean (a+b)/2 and variance (b-a)²/12.
Statistical Modeling & Mathematical Analysis
The continuous uniform distribution—often termed the rectangular distribution—is the simplest continuous probability distribution. It characterizes a scenario where all intervals of equal length within the distribution's support [a, b] are equally likely to occur. It serves as the mathematical embodiment of "complete randomness" or total lack of prior bias.
The probability density function (PDF) is a constant horizontal flat line: f(x) = 1 / (b - a) for a ≤ x ≤ b, and 0 everywhere else. Because total probability must equal 1, the area of the rectangle formed by base (b - a) and height 1 / (b - a) equals exactly 1.0.
The cumulative distribution function (CDF) is linear: F(x) = P(X ≤ x) = (x - a) / (b - a) for x within the boundaries. The probability that random variable X falls within any sub-interval [x1, x2] is simply the ratio of the sub-interval length to the total width: (x2 - x1) / (b - a).
In computer science and simulation modeling, the uniform distribution on [0, 1] is the foundational engine of pseudo-random number generation (PRNG). Using inverse transform sampling, numbers drawn from a uniform U(0, 1) distribution can be mathematically transformed to simulate draws from any continuous distribution (Normal, Exponential, Weibull, etc.).
Key Analytical Advantages
Equally Likely Probability Modeling
Models scenarios with equal probability density across defined boundaries.
Dynamic Sub-Interval Slicing
Computes exact area probabilities P(x1 ≤ X ≤ x2) for arbitrary ranges.
Monte Carlo Simulation Engine
Provides mathematical benchmarks for pseudo-random number generators.
Closed-Form Statistics
Instant calculation of exact midpoint mean, variance, and standard deviation.
Sub-Millisecond Browser Engine
Executes clean geometric calculations locally on your device in microseconds.
Private & Secure
Confidential engineering simulation parameters remain completely private.
Frequently Asked Questions
In any continuous distribution, the probability of selecting an exact infinitely precise point P(X = c) is mathematically 0. Probability is only non-zero over an interval of positive width.
Integrating (x - μ)² · (1 / (b - a)) from a to b yields [((b - a)³ / 3) / (b - a)] / 4 = (b - a)² / 12.
A continuous uniform distribution allows any real number between a and b. A discrete uniform distribution only allows a finite set of equally spaced discrete values (e.g., rolling a die with outcomes {1, 2, 3, 4, 5, 6}).
Standard pseudo-random number generators generate random floats from U(0, 1). Using inverse transform sampling, these are transformed to simulate random variables from complex distributions.
The tool automatically clamps the interval to the valid support [a, b], since the probability density outside the range [a, b] is exactly zero.