Quick answer
Mean time between failures (MTBF) is the average operating time between failures of a repairable system: total uptime divided by the number of failures. A service that ran 716 hours and failed 4 times has an MTBF of 179 hours. It is an average, not a guaranteed failure-free period.
Formula: MTBF = total uptime ÷ failures; MTTR = total downtime ÷ failures; Availability = MTBF ÷ (MTBF + MTTR)
What is mean time between failures?
Mean time between failures (MTBF) is the average operating time between failures of a repairable system. You take the total time the system was running during a period and divide it by the number of failures in that period. A checkout service that ran for 716 hours in a month and failed 4 times has an MTBF of 179 hours.
The NIST/SEMATECH Engineering Statistics Handbook gives the same estimate, total system operation time divided by total number of failures, and notes that it is the maximum likelihood estimate under the constant failure rate model, whether the observation was cut off at a fixed time or not.
Three words in the definition do the work:
- Operating. In this article, repair time is excluded from MTBF. Some teams instead measure from the start of one failure to the start of the next, which includes the repair. Both are used, so write down which one you mean before comparing numbers.
- Failure. You decide what counts: a full outage, error responses above a threshold, a checkout that cannot complete. Change the definition and MTBF changes, with no change to the system.
- Repairable. The metric assumes the system is restored and returns to service. For parts that are thrown away after failing, the related measure is mean time to failure (MTTF).
MTBF, MTTR and availability formulas
| Measure | Formula | Reads as |
|---|---|---|
| MTBF | total uptime ÷ number of failures | How often it breaks |
| MTTR (mean time to repair or recover) | total downtime ÷ number of failures | How long each break lasts |
| Failure rate λ | 1 ÷ MTBF | Failures per operating hour |
| Availability | MTBF ÷ (MTBF + MTTR) | Share of time in working order |
The availability formula appears in "The Calculus of Service Availability" (ACM Queue, 2017), written by Google engineers, as MTTF ÷ (MTTF + MTTR): availability depends on how often outages happen and how long they last. When MTBF is defined as uptime between failures, as here, it plays the MTTF role. If your MTBF is measured failure-start to failure-start, it already contains the repair, and availability is (MTBF − MTTR) ÷ MTBF instead.
The same article says outage duration should be taken as users experience it: from the start of the malfunction until normal behavior resumes. That means the clock starts when requests begin to fail, not when someone acknowledges the alert.
Worked example: an incident log
Sample data. A checkout service is observed for 30 days, which is 720 hours. Hours are counted from the start of the window.
| Incident | Start | Duration | Running time before it |
|---|---|---|---|
| 1 | Hour 60 (day 3) | 30 min | 60.0 h |
| 2 | Hour 250 (day 11) | 120 min | 189.5 h |
| 3 | Hour 270 (day 12) | 18 min | 18.0 h |
| 4 | Hour 610 (day 26) | 72 min | 339.7 h |
| After the last one | to hour 720 | none | 108.8 h |
| Total | 240 min = 4 h | 716 h |
The calculation:
- MTBF = 716 h ÷ 4 = 179 h
- MTTR = 4 h ÷ 4 = 1 h
- Availability = 179 ÷ (179 + 1) = 99.44%, which matches 716 ÷ 720
Now look at the last column. The gaps between failures run from 18 hours to 340 hours, and none of them is close to 179. The average is correct arithmetic, but incidents 2 and 3 arrived within a day of each other, which suggests the first fix on day 11 did not hold. A single MTBF figure would never show that; the log does.
MTBF or MTTR: which one to improve
Availability depends on the ratio of MTTR to MTBF, so failing half as often and recovering twice as fast buy the same amount. Using the sample:
| Scenario | MTBF | MTTR | Availability | Expected downtime per 720 h |
|---|---|---|---|---|
| Today | 179 h | 1 h | 99.44% | 240 min |
| Fail half as often | 358 h | 1 h | 99.72% | about 120 min |
| Recover twice as fast | 179 h | 0.5 h | 99.72% | about 120 min |
| Both | 358 h | 0.5 h | 99.86% | about 60 min |
The two single changes are equal on paper and very different in cost. A decision rule that works in practice: if most downtime comes from a few long incidents, work on detection, rollback and runbooks (MTTR). If it comes from many short ones with a shared cause, remove the cause (MTBF). In the sample, incident 2 alone is 120 of the 240 minutes, so a faster rollback is the first thing to test.
Google's Site Reliability Engineering book makes the case for the recovery side: it describes reliability as a function of MTTF and MTTR, and calls MTTR the most relevant measure of how effective emergency response is.
What MTBF does not predict
It is not a failure-free period. If failures arrive at a constant rate (the exponential model, which NIST calls the homogeneous Poisson process), the chance of running for time t without any failure is e^(−t ÷ MTBF). With an MTBF of 179 hours:
| Question | Calculation | Result |
|---|---|---|
| Chance of at least one failure in the next 24 h | 1 − e^(−24 ÷ 179) | 12.5% |
| Chance of at least one failure in the next 7 days | 1 − e^(−168 ÷ 179) | 60.9% |
| Chance of reaching 179 h with no failure | e^(−1) | 36.8% |
| Expected failures in 720 h | 720 ÷ 179 | 4.0 |
So a system with a 179-hour MTBF reaches hour 179 without failing only about one time in three.
It is very uncertain when failures are few. NIST publishes factors that turn the estimate into a confidence interval. With 4 failures, the 90% factors are 0.4370 and 2.9276, so 179 hours means "somewhere between about 78 and 524 hours". A month-over-month change from 179 to 250 hours is well inside that noise.
Zero failures is not infinite reliability. A clean 720-hour month cannot be divided by zero. NIST's zero-failure factor gives a lower bound instead: 720 × 0.3338 ≈ 240 hours, with 95% one-sided confidence.
The constant rate may not hold. NIST justifies the model with the flat part of the bathtub curve. If a system is getting worse or better, for example failures that cluster after releases, a model with a changing repair rate fits better than one average.
It says nothing about severity. A 2-minute blip at 3 a.m. and a 2-hour outage during a sale each count as one failure.
MTBF vs MTTF vs error rate
| Metric | Unit | Applies to | Misses |
|---|---|---|---|
| MTBF | Hours between failures | Repairable systems and services | How long and how bad each failure was |
| MTTF | Hours to failure | Items replaced rather than repaired | Anything after the first failure |
| MTTR | Hours per failure | Recovery process | How often failures happen |
| Error rate | Failed share of requests or views | Every request, including partial failures | Whether failures were one incident or constant background |
| Availability | Percentage of time or of requests | Service-level targets | The pattern of outages |
Error rate and MTBF answer different questions. A service can have no incident that meets your failure definition and still fail 0.5% of requests all month. How you detect the failures matters too: synthetic monitoring probes on a schedule, so its timing precision is limited by the probe interval.
How to measure MTBF so it means something
- Write the failure definition first. For example: "more than 5% of checkout requests fail for 5 minutes or longer".
- Record two timestamps per incident: when users were first affected and when normal behavior returned.
- Say how planned maintenance is treated. Excluded or counted, but the same way every period.
- Use a window with several failures. With one or two, report the count and the raw durations instead of an average.
- Report MTBF together with the number of failures, the window and the longest incident.
- Separate causes. Failures from your own releases and from a supplier call for different fixes.
Which signals should open an incident in the first place is a monitoring design question, covered in website monitoring.
Collecting the incident evidence in TapCub
TapCub does not probe your servers for uptime and does not calculate MTBF or MTTR. It records what happened on real visits, which helps you decide when an incident started and how many people it touched. For the checkout example:
- Set alerts. In All-platform analytics › Operations › Monitors (Pro plan or above), add a fixed-threshold rule on
error_rateat the hour grain, and a collection-gap rule that fires after a set number of minutes without any event. A quiet night can also trigger the second, so set the minutes to your own traffic. See how to set up traffic alerts. - Look at the damage. Open Monitoring › Errors for the window of incident 2: error groups show occurrences, affected sessions and when each was last seen, and expanding one lists each occurrence with its time and page.
- Mark it on the charts. In Configuration › Annotations, add an annotation of type Incident with the date and a short title, so a traffic dip on that day has a visible cause. Annotations are dated by day.
- Keep the clock in your own log. Put start and end times in the incident record, then apply the formulas above each month.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 8.4.5.1 Constant repair rate (HPP/exponential) model
- NIST/SEMATECH e-Handbook, 8.1.7.1 Homogeneous Poisson Process
- Treynor, Dahlin, Rau and Beyer, The Calculus of Service Availability, ACM Queue, 2017 (PDF)
- Site Reliability Engineering, chapter 1, Introduction: Emergency Response (Google)
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Experience Specialist
Writes about product experience, practical workflows, and growth, turning complex processes into clear steps for everyday decisions.