TapCub is live — analytics, insights and live chat, free on one platform
Glossary

Mean time between failures (MTBF): formula and example

MTBF is operating time divided by failures. A four-incident log turned into MTBF, MTTR and 99.44% availability, plus what the number cannot predict.

Lin Zhou Reviewed by Emma Collins Also called MTBF Last updated Dec 3, 2026 Glossary

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

MeasureFormulaReads as
MTBFtotal uptime ÷ number of failuresHow often it breaks
MTTR (mean time to repair or recover)total downtime ÷ number of failuresHow long each break lasts
Failure rate λ1 ÷ MTBFFailures per operating hour
AvailabilityMTBF ÷ (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.

IncidentStartDurationRunning time before it
1Hour 60 (day 3)30 min60.0 h
2Hour 250 (day 11)120 min189.5 h
3Hour 270 (day 12)18 min18.0 h
4Hour 610 (day 26)72 min339.7 h
After the last oneto hour 720none108.8 h
Total240 min = 4 h716 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:

ScenarioMTBFMTTRAvailabilityExpected downtime per 720 h
Today179 h1 h99.44%240 min
Fail half as often358 h1 h99.72%about 120 min
Recover twice as fast179 h0.5 h99.72%about 120 min
Both358 h0.5 h99.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:

QuestionCalculationResult
Chance of at least one failure in the next 24 h1 − e^(−24 ÷ 179)12.5%
Chance of at least one failure in the next 7 days1 − e^(−168 ÷ 179)60.9%
Chance of reaching 179 h with no failuree^(−1)36.8%
Expected failures in 720 h720 ÷ 1794.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

MetricUnitApplies toMisses
MTBFHours between failuresRepairable systems and servicesHow long and how bad each failure was
MTTFHours to failureItems replaced rather than repairedAnything after the first failure
MTTRHours per failureRecovery processHow often failures happen
Error rateFailed share of requests or viewsEvery request, including partial failuresWhether failures were one incident or constant background
AvailabilityPercentage of time or of requestsService-level targetsThe 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

  1. Write the failure definition first. For example: "more than 5% of checkout requests fail for 5 minutes or longer".
  2. Record two timestamps per incident: when users were first affected and when normal behavior returned.
  3. Say how planned maintenance is treated. Excluded or counted, but the same way every period.
  4. Use a window with several failures. With one or two, report the count and the raw durations instead of an average.
  5. Report MTBF together with the number of failures, the window and the longest incident.
  6. 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:

  1. Set alerts. In All-platform analytics › Operations › Monitors (Pro plan or above), add a fixed-threshold rule on error_rate at 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.
  2. 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.
  3. 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.
  4. Keep the clock in your own log. Put start and end times in the incident record, then apply the formulas above each month.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Lin Zhou

Product Experience Specialist

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

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

How do you calculate mean time between failures?

Add up the time the system was actually running during a period and divide by the number of failures in that period. With 720 hours in a month, 4 hours of downtime and 4 failures, uptime is 716 hours and MTBF is 716 ÷ 4 = 179 hours.

What is the difference between MTBF and MTTR?

MTBF measures how long the system runs between failures; MTTR measures how long each failure lasts until normal behavior returns. Together they give availability: MTBF ÷ (MTBF + MTTR). An MTBF of 179 hours with an MTTR of 1 hour is 99.44% available.

Is a higher MTBF always better?

It means failures are rarer, but it says nothing about their length or damage. A system with fewer but much longer outages can have a higher MTBF and lower availability. Read it together with MTTR, the longest incident and the number of failures behind the average.

Does an MTBF of 179 hours mean a failure every 179 hours?

No. It is the average. Under a constant failure rate, the chance of running 179 hours without any failure is about 37%, and the chance of at least one failure within 24 hours is about 12.5%. Real gaps between failures can vary widely.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics