Uniform Distribution Calculator
Enter the interval [a, b] and a point x for the uniform distribution.
Result
How it is calculated
For a continuous uniform distribution on the interval from a to b, let the width be w = b − a. The mean is (a + b) ÷ 2, the variance is w² ÷ 12, the density is f(x) = 1 ÷ w for a ≤ x ≤ b and 0 outside, and the cumulative probability is F(x) = (x − a) ÷ w inside the interval, 0 below a and 1 above b. Mean and variance are shown to two decimals, density and cumulative probability to four. The upper end must be larger than the lower end. The point x may lie outside [a, b], in which case the density is 0 and the cumulative probability is 0 or 1. The density is not a probability: with a narrow interval it can exceed 1.
Worked example
The interval is from a = 2 to b = 10, and the point is x = 4. Width: 10 − 2 = 8. Mean: (2 + 10) ÷ 2 = 6. Variance: 8² ÷ 12 = 64 ÷ 12 = 5.33. Density: 1 ÷ 8 = 0.125. Cumulative probability: (4 − 2) ÷ 8 = 0.25. Result: mean 6.00, variance 5.33, density 0.1250 and cumulative probability 0.2500, so there is a 25% chance that a value is 4 or less.
Common mistakes
- Reading the density as a probability. The 0.1250 is a height, not a chance, and for an interval narrower than 1 it exceeds 1, which is not an error.
- Swapping a and b or entering equal ends. The upper end b must be greater than a, otherwise no result is returned.
- Using a standard deviation where the variance is shown. The variance is 5.33, and the standard deviation is its square root, about 2.31.
- Expecting the density to fall off beyond the ends. It drops straight to 0 at x outside [a, b], with no gradual tail.
- Treating the cumulative value at x as the chance of landing exactly on x. For a continuous distribution that chance is 0; the cumulative value is the chance of being at or below x.
About this calculator
The continuous uniform distribution on an interval [a, b] describes a quantity that is equally likely to take any value in that range, with no value more probable than another. Its probability density function (PDF) is flat, equal to 1/(b − a) everywhere between a and b and zero outside it, its mean is simply the midpoint (a + b)/2, and its variance is (b − a)² / 12.
The cumulative distribution function (CDF) at a point x gives the probability that the random variable is less than or equal to x, calculated as (x − a)/(b − a) within the interval. This distribution is the standard model for situations where outcomes really are equally likely across a range, such as rounding errors, the position where a random point lands on a line segment, or the output of a basic pseudo-random number generator before it's transformed into other distributions, and it's a foundational building block taught early in probability courses.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments