The Weibull Distribution, Explained
After reading this you can compute failure probabilities and lifetimes for a Weibull distribution, read what the shape parameter says about wear, and avoid the common mix-ups between reliability and failure probability.
What the Weibull distribution describes
The Weibull distribution models the time until something fails: a bearing, a hard drive, a light bulb, a battery. It is defined for x \ge 0 and controlled by two positive numbers, a shape k and a scale \lambda.
Here is the hook. Suppose a fan motor has a Weibull failure time with shape 2 and scale 1 (in years). The probability it fails within one year is 0.6321, and within half a year only 0.2212. The failure rate is not constant. It starts low and climbs as the part ages, which is exactly what "wear-out" means. That climbing rate is what the shape parameter encodes, and it is why the Weibull is the workhorse of reliability engineering.
When to use it, and when not
Reach for the Weibull when you have lifetime or time-to-event data and you suspect the hazard (the instantaneous failure rate) changes with age. It covers three qualitatively different regimes with one formula.
- Shape k \lt 1
- The failure rate decreases over time. This is "infant mortality": weak units die early, survivors are sturdy.
- Shape k = 1
- The failure rate is constant. The Weibull collapses to the exponential distribution with mean \lambda.
- Shape k \gt 1
- The failure rate increases over time. This is wear-out, common for mechanical parts. At k \approx 3.4 the shape is close to a bell curve.
Do not use the Weibull for counts of events; use the Poisson calculator or binomial calculator for those. If your data are right-skewed sizes such as incomes or file lengths, a log-normal distribution often fits better. For general positive waiting times without a monotone hazard story, compare against the gamma distribution.
The formulas and what each symbol does
The probability density function is:
Here k is the shape and \lambda is the scale. The scale sets the horizontal stretch: double \lambda and every characteristic time doubles. The shape sets the form of the curve and the direction of the hazard.
The cumulative distribution function has a clean closed form, which is why the Weibull is so convenient:
F(x) is the probability of failure by time x. Its complement, R(x) = e^{-(x/\lambda)^k}, is the reliability or survival function: the probability the unit is still working at time x. Notice that at x = \lambda, F(\lambda) = 1 - e^{-1} \approx 0.6321 for every shape. The scale is the 63.2% failure time.
Because the CDF inverts by hand, the quantile for a target probability p is:
The mean is \lambda\,\Gamma(1 + 1/k), where \Gamma is the gamma function. For k = 2, \lambda = 1 the mean is about 0.8862, a touch below the scale.
Two useful checks. The mode (most likely failure time) is \lambda\,(1 - 1/k)^{1/k} when k \gt 1, and it is 0 when k \le 1. The median is always \lambda\,(\ln 2)^{1/k}, which for k = 2, \lambda = 1 equals 0.8326.
A worked example that matches the demo
Failure probability at one year, k = 2, λ = 1
Use the demo defaults: mode "probability from x", shape 2, scale 1, value 1.
- Form the ratio: x/\lambda = 1/1 = 1.
- Raise to the shape: (x/\lambda)^k = 1^2 = 1.
- Cumulative probability: F(1) = 1 - e^{-1} = 0.6321.
- Reliability: R(1) = e^{-1} = 0.3679.
- Density at the point: f(1) = \frac{2}{1}\cdot 1^{1}\cdot e^{-1} = 0.7358.
So a unit with this life law has a 63.21% chance of failing by year one and a 36.79% chance of surviving past it. If instead you switch to "x from probability" with p = 0.95, invert the CDF: x = 1\cdot[-\ln(0.05)]^{1/2} = \sqrt{2.9957} = 1.731. Ninety-five percent of these units fail by about 1.731 years.
See how the shape reshapes the curve
Reading and interpreting the output
Keep the four quantities distinct. The density f(x) is not a probability; it is a rate per unit time and can exceed 1 (at k = 2, \lambda = 1 it peaks near 0.858, but for a small scale it goes far higher). Probabilities come from the CDF.
| x (years) | Density f(x) | Failure F(x) | Reliability R(x) | Hazard h(x) |
|---|---|---|---|---|
| 0.5 | 0.7788 | 0.2212 | 0.7788 | 1.000 |
| 1.0 | 0.7358 | 0.6321 | 0.3679 | 2.000 |
| 1.5 | 0.4111 | 0.8946 | 0.1054 | 3.000 |
The hazard column is h(x) = f(x)/R(x) = (k/\lambda)(x/\lambda)^{k-1}. For k = 2 it is exactly 2x, a straight line rising with age. That linear rise is why k = 2 is called the Rayleigh case and is the simplest model of steady wear.
Common mistakes
Do not confuse the failure probability F(x) with the reliability R(x). They sum to 1. If a spec says "90% reliable at 5 years", that is R(5) = 0.90, which means F(5) = 0.10. Solve for the design life with p = 0.10 in the quantile formula, not p = 0.90.
Three more traps to watch:
- The scale is not the mean. The mean is \lambda\,\Gamma(1+1/k). For k = 2 that is
0.8862\lambda, not \lambda. The scale is the 63.2% quantile. - Parameterization differs across software. Some tools use a rate 1/\lambda instead of a scale, and some swap the roles of the two arguments. This calculator uses shape k and scale \lambda as written above. If your numbers look inverted, check that first.
- Units of time must match. If \lambda is in hours, feed x in hours. Mixing hours and years silently gives wrong probabilities.
Related calculators
The exponential is the Weibull with k = 1, so the exponential distribution calculator is the constant-hazard special case. For positive continuous quantities without a monotone hazard, compare the gamma and log-normal tools. When the shape is near 3.4 the Weibull resembles a normal distribution, though it stays bounded at zero. For proportions on a fixed interval, use the beta distribution calculator, and for discrete failure counts the geometric and negative binomial calculators.
Frequently asked questions
What does the scale parameter mean in plain terms?
It is the time by which about 63.2% of units have failed, regardless of the shape. At x = \lambda, F(x) = 1 - e^{-1} = 0.6321. A larger scale stretches the whole timeline.
How do I get the reliability from this calculator?
Run the probability mode to get F(x), then subtract from one. For k = 2, \lambda = 1, x = 1 you get F = 0.6321, so reliability is 1 - 0.6321 = 0.3679.
Why does k = 1 give the exponential distribution?
Set k = 1 in the CDF: F(x) = 1 - e^{-x/\lambda}, which is exactly the exponential CDF with mean \lambda. The hazard h(x) = 1/\lambda is constant, so age carries no information about the next failure.
Can the density be larger than one?
Yes. Density is not probability. With a small scale the peak height grows: for k = 2, \lambda = 0.2 the density exceeds 4. Only the area under the curve equals one.
How do I find a design life for a target reliability?
If you want reliability R, set p = 1 - R and use the quantile mode. For 95% reliability with k = 2, \lambda = 1, use p = 0.05: x = [-\ln(0.95)]^{1/2} = 0.2265 years.