How to calculate MTBF
MTBF is operating time divided by the number of failures. For equipment you repair and put back into service, count only the time it was running:
MTBF = (units × time watched - downtime) / failures
MTTR = downtime / failures
The default example is one server watched for 30 days (720 hours). It failed 3 times and was down for 6 hours in total, so it ran for 714 hours. MTBF is 714 ÷ 3 = 238 hours, MTTR is 6 ÷ 3 = 2 hours, and availability is 238 ÷ 240, or 99.1667%.
With several identical units, add up the hours of all of them. Twenty servers that each run a full year (8,760 hours) and fail 5 times between them give 20 × 8,760 ÷ 5 = 35,040 hours. That is a figure for the group: any one server has only about a 37% chance of running that long without a failure.
Failure rate, FIT and AFR
Datasheets state reliability in several units. With a constant failure rate they are the same number written different ways:
failure rate = 1 / MTBF
FIT = 1,000,000,000 / MTBF
AFR = 1 - e^(-8,760 / MTBF)
FIT counts failures in a billion device-hours, and the semiconductor industry uses it most. AFR is the chance that a unit running all year fails at least once in that year. An MTBF of 1,000,000 hours is 1,000 FIT and an AFR of 0.87%: run 1,000 such drives for a year and expect about 9 failures. Some makers count a year as 8,766 hours (365.25 days), which gives 0.873% instead of 0.872% for the same drive.
What MTBF does not tell you
Most units fail before they reach their MTBF. With a constant failure rate, the chance that a unit survives to its MTBF is e-1, about 37%, and the other 63% fail sooner. Many engineers assume the split is half and half. The chance of running a period of t hours with no failure is:
R(t) = e^(-t / MTBF)
A unit with a 100,000-hour MTBF has a 91.6% chance of getting through a year without a failure. Across 50 such units you should expect about 4.4 failures a year, which is why fleets keep spares.
The model only holds while the failure rate really is constant. Many products follow a bathtub curve: more failures early on, a long middle period with a steady rate, then a rise as parts wear out. The constant-rate maths fits only the middle period, so a new batch with early failures, or old machines near the end of their life, will fail more often than the MTBF suggests.
MTBF, MTTF and MTTR
MTBF applies to things you repair. Mean time to failure (MTTF) is the same idea for things you replace after one failure, such as a disk or a fan. MTTR is the average time each failure keeps the system out of service, and together with MTBF it sets availability:
availability = MTBF / (MTBF + MTTR)
The letters MTTR stand for four different measurements in different teams. The MTBF vs MTTR guide explains which one belongs in that formula.
Sources
- Wikipedia: Mean time between failures (definition for repairable systems, survival to MTBF of 1/e, R = e^(-T/MTBF))
- Wikipedia: Failure rate (FIT in 10^9 device-hours, MTBF = 1/λ only for a constant rate)
- Wikipedia: Annualized failure rate (AFR = 1 - exp(-8766/MTBF); some makers use 8,760 hours)
- Wikipedia: Bathtub curve (early failures, constant useful life, wear-out)