Skip to main content

Weibull Distribution Calculator

The Weibull distribution describes the time until something fails, breaks or expires. It has two parameters: a scale λ that sets the size of the numbers involved, and a shape k that decides the whole character of the distribution.

Probabilities and hazard rates, quantiles for a chosen probability, or a generated sample.

Below 1 heavy-tailed, 1 exponential, 2 Rayleigh, about 3.6 closest to normal.

A characteristic size in the units you are measuring, such as hours, cycles or metres.

The point you want probabilities at. The Weibull is defined for x ≥ 0.

Fill this in to get the probability of an interval instead of a single tail.

For example 0.9 for the value that 90% of observations fall below, or the 0.9th percentile when p is small.

Fixes the generated values, so the same seed always reproduces the same sample.

What Is the Weibull Distribution Calculator?

The Weibull distribution is a continuous probability distribution defined for non-negative values, most often used to model the time until a machine fails, a light bulb burns out or a component wears through. Unlike the normal distribution it can be strongly skewed, and unlike the exponential distribution it does not insist on a constant failure rate.

It has just two parameters. The scale λ has the same units as the data and acts as a yardstick; the shape k is dimensionless and decides the behaviour of the tail and of the failure rate.

How Does the Weibull Distribution Calculator Work?

Every Weibull variable is built from the same skeleton: raise x/λ to the power k, then take the exponential. Changing k reshapes the curve — k = 1 recovers the exponential distribution, k = 2 the Rayleigh distribution, and k ≈ 3.6 a bell curve almost indistinguishable from a normal one.

The cumulative distribution gives the probability of failing at or before x, and its complement, the survival function, gives the probability of lasting longer than x. The density is that survival function multiplied by the hazard rate, which works out to the tidy (k/λ)(x/λ)^(k−1).

The quantile formula simply rearranges the same expression, so every probability and every percentile are two views of one relationship. The median is λ(ln 2)^(1/k) and the mode, when k > 1, is λ((k−1)/k)^(1/k).

The mean and variance come from the gamma function rather than from integration: mean = λΓ(1 + 1/k) and variance = λ²[Γ(1 + 2/k) − Γ(1 + 1/k)²]. Because Γ(1 + 1/k) exceeds 1 when k < 1 and falls below it when k > 1, the mean sits above the median for heavy-tailed shapes and below it for stretched ones.

Weibull Distribution Calculator Formula & Variables

The core mathematical equation utilized by this calculator is expressed as:

F(x)=1−e−(x/λ)kf(x)=kλ(xλ)k−1e−(x/λ)kQ(p)=λ[−ln⁡(1−p)]1/kF(x) = 1 - e^{-\left(x/\lambda\right)^{k}} \qquad f(x) = \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1} e^{-\left(x/\lambda\right)^{k}} \qquad Q(p) = \lambda\left[-\ln(1-p)\right]^{1/k}

Variable Definitions

SymbolVariable Meaning & Units
xthe value you want probabilities at
kshape parameter — the behaviour of the distribution
λscale parameter — the size of the numbers
pprobability between 0 and 1

Raise the ratio x/λ to the power k, negate it, and take the exponential to get the share of observations surviving past x. The density adds the factor (k/λ)(x/λ)^(k−1), which is why its shape changes so completely as k passes 1. Solving the same expression for x gives the quantile formula, and the mean and variance follow in closed form through the gamma function.

How to Use the Weibull Distribution Calculator

  1. Enter the shape k and the scale λ in the units of your measurement. If you fitted them from data, use those values; otherwise start from a defensible guess and vary k to see how sensitive the answer is.
  2. In probability mode, type the value x you care about. The calculator returns P(X ≤ x), the density there, the survival probability and the hazard rate. Adding a lower value turns the answer into an interval probability.
  3. In quantile mode, enter a probability such as 0.9 or 0.99 to get the value that share of observations fall below. This is the direction reliability work usually needs.
  4. In sample mode, choose how many values to draw and a seed. The generated values appear in a table, with their mean and median alongside the theoretical ones for comparison.

Step-by-Step Example Calculation

Lifetime of a bearing with k = 2 and λ = 1000 cycles

Input Values:

mode:probability
shape:2
scale:1000
value:1500
Worked Steps: P(X ≤ 1500) = 1 − e^−2.25 ≈ 89.5%, so nearly nine in ten bearings survive 1500 cycles, and the hazard rate there is 0.003 per cycle.

Understanding Your Result

A probability such as 89.5% means that in the long run 89.5% of units would fail at or before that point. It is a property of the fitted distribution, not a promise about any single unit.

The hazard rate is the conditional failure rate: the chance of failing in the next unit of time given survival so far. Its trend across x is what tells you whether the model describes wear-out or infant mortality.

The mean can sit far from the median. With k < 1 a few very large values pull the mean up; with k > 3.6 the values huddle near the mode and the mean falls below the median.

The sample mode is a single realisation, so its mean will differ from the theoretical mean. That gap shrinks roughly as 1/√n and is not an error in either number.

Factors That Affect the Result

  • The shape parameter k. It is the single most important choice: it moves the distribution from a sharp peak at zero through the exponential to a near-normal bell, and it decides whether the hazard rate rises or falls.
  • The scale parameter λ. It scales every value linearly, so a percentage answer is unaffected by it while an absolute answer is exactly proportional to it.
  • Units. Weibull calculations are only meaningful with consistent units; 1000 cycles and 1000 hours describe different realities even though the arithmetic is identical.
  • Sample size in sample mode. The spread of the generated values narrows as more values are drawn, so the sample mean approaches the theoretical mean.
  • The probability chosen in quantile mode. Near 0 or 1 the quantile becomes extreme, and p = 0 or 1 returns the boundary of the distribution.

When Should You Use This Calculator?

  • Modelling time to failure for machinery, electronics, lamps, bearings and other components whose lifetimes are strictly non-negative.
  • Describing wear-out, where k > 1 and the failure rate climbs with age, or infant mortality, where k < 1 and it falls.
  • Setting warranty periods and design targets from a required reliability such as 90% or 95%.
  • Turning a fitted survival curve into everyday quantities: expected life, medians, or the life exceeded by only 1% of units.
  • Generating realistic lifetime data for simulations, schedules and spare-parts stock, where values must never go negative.

Assumptions & Limitations

  • Values cannot be negative. The distribution has no support below zero, which is why an entry below 0 is rejected rather than clamped.
  • The model assumes the failure mechanism stays the same. A population where the mechanism changes partway through is not Weibull, and fitting it as one will understate the risk.
  • Both parameters must be known or estimated. Plausible-looking numbers are not data, and the results are only as good as the fit behind k and λ.
  • Generated samples are independent draws. Real equipment often fails in clusters, and a sample from this distribution will understate that clustering.
  • The mean alone hides the tail. For heavy-tailed shapes the 10% of units lasting far beyond the mean matters more than the mean itself, so read quantiles as well.

Frequently Asked Questions

Calculation Accuracy & Reference Note

The distribution functions are evaluated in closed form with the standard library exponential and logarithm, and the moments use a Lanczos approximation of the gamma function accurate to roughly 14 significant digits, so the reported probabilities carry no meaningful numerical error.

Standard Reference: Weibull, W. (1939), Über die Form der Lebensdauer-Kurve von Menschen, Tieren und Planten. World Archives of Utility Science 2, 289–292.