Weibull distribution in Excel: shape, scale and time to failure
In short: how long a part lasts before it fails. One number sets the typical life; the other says whether failures come early, at random, or as parts wear out.
The Weibull distribution describes how long something lasts before it fails. Its scale sets the typical life and its shape sets how failures spread over time: below 1 they come early, at 1 they come at a constant rate (the exponential distribution), above 1 parts wear out. Excel has WEIBULL.DIST but no inverse, so a draw is =scale * (-LN(1 - RAND()))^(1 / shape). A pump with shape 1.5 and scale 20,000 hours lasts 18,055 hours on average, and 25.2% of pumps fail within a year of continuous running.
Shape and scale
The scale (η, eta) is the characteristic life: whatever the shape, 63.2% of units have failed by the time they reach it. The shape (β, beta) says how the failure rate, the chance that a unit still running fails in the next hour, changes with age:
- Below 1: the failure rate falls with age. Weak units fail early (infant mortality), and the survivors last.
- Exactly 1: the failure rate is constant. Age does not matter; this is the exponential distribution.
- Above 1: the failure rate grows with age, as parts wear out. With shape 1.5, a pump at 20,000 hours is 2.0 times as likely to fail in the next hour as one at 5,000 hours. Around 3 to 4 the life is almost symmetric around the scale.
How to read the chart: each line is one shape value with the same scale. Where a line is high, many units fail at that age: with shape 0.8 most failures come right at the start, with shape 3 they gather around the typical life.
The Weibull distribution in Excel
WEIBULL.DIST(x, shape, scale, TRUE) gives the share of units failed by age x, so =WEIBULL.DIST(8760, 1.5, 20000, TRUE) returns 25.2%, the chance a pump fails within a year (8,760 hours). Excel calls the shape alpha and the scale beta, while engineers often write β for the shape and η for the scale, so check the order. For a random life, turn a random number u between 0 and 1 into an age: the life is scale × (−ln(1 − u))1/shape, in one cell =F10*(-LN(1-RAND()))^(1/D10).
How to read the chart: each bar counts how many of the 10,000 simulated values fell in that stretch, and the line is the theoretical curve. The taller the bar, the more often values land there. The dotted lines mark the B10 life and the mean.
| Cell | Formula | Value |
|---|---|---|
| Random number u (I10) | =RAND() | |
| Draw (J10) | =F10*(-LN(1-I10))^(1/D10) | |
| Draw in one cell | =F10*(-LN(1-RAND()))^(1/D10) | |
| Mean (K10) | =F10*EXP(GAMMALN(1+1/D10)) | 18,055 |
| P10 (L10) | =F10*(-LN(1-0.1))^(1/D10) | 4,462 |
| P90 (M10) | =F10*(-LN(1-0.9))^(1/D10) | 34,874 |
Check the numbers: exact values against 10,000 draws from Excel and from xellstorm
| Exact | Excel, RAND() | xellstorm | |
|---|---|---|---|
| Mean | 18,055 | 18,229 | 18,055 |
| Standard deviation | 12,259 | 12,465 | 12,262 |
| P10 | 4,462 | 4,443 | 4,462 |
| P50 (median) | 15,664 | 15,628 | 15,665 |
| P90 | 34,874 | 35,730 | 34,870 |
Excel draws with RAND(), fully at random; xellstorm spreads its draws evenly over the range (Latin Hypercube sampling), so its statistics land closer to the exact values.
The B10 life, the age by which 10% of units have failed, is the P10: 4,462 hours for this pump. The median life is 15,664 hours and the mean 18,055; the mean lies above the median because a few pumps last far longer than most.
The exponential distribution: a Weibull with shape 1
When failures or arrivals come at random, at a constant average rate, the time between them is exponential: a breakdown every 500 hours on average means a rate of 0.002 per hour. It has a single parameter, the mean (or its inverse, the rate), and it has no memory, so the time already waited tells nothing about the time still to wait: a machine that has run 1,000 hours without a breakdown has the same 71.5% chance of getting through the next week (168 hours) as a new one. Most gaps are short: 63.2% are shorter than the mean, and the median is only 347 hours.
| Cell | Formula | Value |
|---|---|---|
| Random number u (I11) | =RAND() | |
| Draw (J11) | =-D11*LN(1-I11) | |
| Draw in one cell | =-D11*LN(1-RAND()) | |
| Mean (K11) | =D11 | 500 |
| P10 (L11) | =-D11*LN(1-0.1) | 53 |
| P90 (M11) | =-D11*LN(1-0.9) | 1,151 |
Check the numbers: exact values against 10,000 draws from Excel and from xellstorm
| Exact | Excel, RAND() | xellstorm | |
|---|---|---|---|
| Mean | 500 | 497 | 500 |
| Standard deviation | 500 | 499 | 500 |
| P10 | 53 | 54 | 53 |
| P50 (median) | 347 | 347 | 347 |
| P90 | 1,151 | 1,132 | 1,151 |
Excel draws with RAND(), fully at random; xellstorm spreads its draws evenly over the range (Latin Hypercube sampling), so its statistics land closer to the exact values.
In Excel, EXPON.DIST(x, rate, TRUE) takes the rate, 1 / mean, not the mean. A draw is =-D11*LN(1-RAND()). The total time for several such events in a row follows a gamma distribution, and the number of events in a fixed period a Poisson distribution.
When to use Weibull or exponential
- Weibull for lives of components and equipment, fatigue, and any time to failure where age matters. With failure data, fit it. The series system reliability example combines four Weibull components, this pump among them.
- Exponential for times between random events: breakdowns of a system with many parts, customer arrivals, calls. Do not use it for wear-out, where it underrates the failures of old units.
- Lognormal for repair times and other durations that are rarely short; it is often fitted alongside the Weibull to the same data.
Entering Weibull and exponential distributions in xellstorm
- Make the cell an input and, on the Distributions step, choose Weibull and type the shape and scale (loc is a failure-free period, usually 0). For an exponential, choose Exponential and type the mean as its scale.
- With failure times, select the input and use “From data” in the side panel: it fits Weibull, exponential, gamma and lognormal (all starting at zero) among other shapes and ranks them, so you can see which one the data support.
- Turn lives into the answer you need with workbook formulas: a system that stops at its first failure is the
MINof its components’ lives, andIF(life<8760,1,0)counts failures within a year.
Add-in models convert from RiskWeibull, VoseWeibull and PsiWeibull, and from RiskExpon, VoseExpon and PsiExponential.
Questions
How do I generate Weibull random numbers in Excel?
Excel has no WEIBULL.INV, so invert the distribution yourself: =scale*(-LN(1-RAND()))^(1/shape). For shape 1.5 and scale 20,000, that is =20000*(-LN(1-RAND()))^(1/1.5). The draws have the exact Weibull distribution, as the table above shows.
What do the shape and scale of a Weibull distribution mean?
The scale is the characteristic life, the age by which 63.2% of units have failed. The shape describes the failure rate over time: below 1 it falls (early failures), at 1 it is constant (random failures), above 1 it rises (wear-out).
What is the B10 life?
The B10 life is the age by which 10% of units have failed: the P10 of the life distribution, scale × (−ln 0.9)1/shape. For a pump with shape 1.5 and scale 20,000 hours it is 4,462 hours.
How is the exponential distribution related to the Weibull?
An exponential distribution is a Weibull distribution with shape 1, with the mean as its scale. It describes lives that do not depend on age: the chance of failing in the next hour is the same for a new unit and an old one.
Related
- Guide
Which probability distribution should I use? A guide for Monte Carlo models
Find the right probability distribution in two questions: PERT, triangular, normal, lognormal, Weibull, Poisson, binomial, beta and more, with what each is for and its Excel formula. - Equipment reliability
How likely is a series system to fail within a year?
Four components in series with Weibull lifetimes: 79.0% of units fail within a year (8,760 h) and mean life is 5,712 h. Simulated vs exact. - Guide
Gamma distribution in Excel: waiting times, totals and GAMMA.INV
The gamma distribution describes positive, right-skewed quantities such as the total time of several steps. Shape and scale, GAMMA.INV and GAMMA.DIST in Excel, and gamma vs lognormal.
xellstorm is a browser-based Monte Carlo simulation tool for Excel models: no add-in, and the workbook never leaves your computer.