Weibull Distribution Calculator

Enter the shape (k) and scale (λ) parameters to compute the Weibull PDF, CDF, and mean at a value x, plus the quantile for any percentile.

Quick Facts

Method
CDF F(x) = 1 − e^(−(x/λ)^k)
PDF, quantile x = λ·(−ln(1−p))^(1/k), and mean λ·Γ(1+1/k) computed in closed form.

Your Results

Calculated
CDF F(x) — P(X ≤ x)
-
Cumulative probability at x
PDF f(x)
-
Probability density at x
Quantile at p
-
x such that F(x) = p
Mean E[X]
-
λ·Γ(1 + 1/k)

Ready

Enter k, λ, x, and a percentile, then press Calculate.

Understanding the Weibull Distribution

The Weibull distribution is a continuous probability distribution for non-negative values, named after Swedish engineer Waloddi Weibull, who described it in 1951. It is the workhorse of reliability engineering and life-data analysis because its two parameters can reproduce an increasing, constant, or decreasing failure rate simply by changing the shape parameter. This calculator uses the standard two-parameter Weibull (with location parameter fixed at 0).

The formulas

For shape parameter k > 0 and scale parameter λ > 0, and for x ≥ 0:

  • Probability density (PDF): f(x) = (k/λ) · (x/λ)k−1 · e−(x/λ)^k
  • Cumulative distribution (CDF): F(x) = 1 − e−(x/λ)^k
  • Quantile / inverse CDF: xp = λ · (−ln(1 − p))1/k
  • Mean: E[X] = λ · Γ(1 + 1/k), where Γ is the gamma function

The calculator on this page evaluates all four of these directly. The gamma function needed for the mean is computed with the Lanczos approximation, which is accurate to roughly 15 significant digits.

What the two parameters do

  • Shape (k): governs the failure-rate behavior. k < 1 gives a decreasing hazard rate — early "infant mortality" failures. k = 1 gives a constant hazard rate, which makes the Weibull identical to the exponential distribution with mean λ. k > 1 gives an increasing hazard rate — wear-out failures. At k ≈ 3.44 the Weibull becomes nearly symmetric and closely resembles a normal distribution.
  • Scale (λ): stretches or compresses the distribution along the x-axis. It is also called the characteristic life because F(λ) = 1 − e−1 ≈ 0.632 for every value of k — so about 63.2% of the population has failed by x = λ.

Why it is needed

Many real quantities are strictly positive and skewed: time to failure of a bearing, wind-speed distributions at a turbine site, particle sizes from grinding, or the strength of brittle materials. The normal distribution allows negative values and is symmetric, so it fits these poorly. The Weibull's flexible shape lets a single family model all of these, which is why it appears in reliability standards, warranty analysis, and wind-energy resource assessment.

Common reference points

  • Median (B50 life): x = λ · (ln 2)1/k = λ · (0.6931)1/k.
  • B10 life (time by which 10% fail): x = λ · (0.10536)1/k.
  • Characteristic life: x = λ always corresponds to 63.2% failed.
  • k = 1: reduces to the exponential distribution; the mean equals λ exactly since Γ(2) = 1.
  • k = 2: the Rayleigh distribution, common for wind speed and 2-D vector magnitudes; its mean is λ·Γ(1.5) = λ·(√π/2) ≈ 0.8862·λ.

Frequently Asked Questions

What do the shape (k) and scale (λ) parameters mean?
The shape parameter k controls the failure pattern: k < 1 means a decreasing failure rate (infant mortality), k = 1 is a constant rate (equivalent to the exponential distribution), and k > 1 means an increasing rate (wear-out). The scale parameter λ, the characteristic life, is the value at which about 63.2% of units have failed, because F(λ) = 1 − e−1 ≈ 0.632 regardless of k.
How do I compute a Weibull quantile such as the B10 life?
Invert the CDF: for a target probability p, the quantile is x = λ · (−ln(1 − p))1/k. The B10 life — the time by which 10% of units fail — uses p = 0.10, giving x = λ · (−ln 0.90)1/k = λ · (0.10536)1/k. Enter 0.10 in the percentile field to get it directly.
Is the Weibull the same as the exponential distribution?
Only when k = 1. In that special case f(x) = (1/λ)·e−x/λ, the hazard rate is constant, and the mean equals λ. For any other k the failure rate changes with age, which is the whole reason the Weibull is used instead of the exponential.
Why is the mean not simply λ?
λ is the 63.2nd-percentile scale, not the average. The mean is λ·Γ(1 + 1/k), where Γ is the gamma function. For k = 1 this equals λ (Γ(2)=1), but for k = 2 it is about 0.886·λ, and it approaches λ as k grows large. Always report which statistic you mean — characteristic life, median, or mean — since they differ.