
MTBF (mean time between failures) is the average operating time between failures of a system you repair. MTTF (mean time to failure) is the average operating time before an item you replace, rather than repair, fails for good. MTTR (mean time to repair, or recover) is the average time it takes to get a failed system working again. MTBF and MTTF tell you how often things break; MTTR tells you how long each break lasts. Together, MTBF and MTTR determine availability.
The formulas are short. The hard part is defining what counts as a failure, when each clock starts and stops, and which population you are averaging over. This guide covers all three, with worked examples and the arithmetic shown.
MTBF, MTTF, and MTTR at a glance
| Metric | What it measures | Formula | Applies to | Better when |
|---|---|---|---|---|
| MTBF (mean time between failures) | Average operating time between one failure and the next | Total operating time / Number of failures | Repairable systems | Higher |
| MTTF (mean time to failure) | Average operating time until an item fails permanently | Total operating time of all units / Number of failures | Non-repairable items | Higher |
| MTTR (mean time to repair / recover) | Average time from failure to restored service | Total downtime / Number of incidents | Repairable systems | Lower |
A short way to remember them:
- MTBF: how often a repairable thing breaks
- MTTF: how long a replaceable thing lasts
- MTTR: how long it takes to fix things when they break
What does MTTR stand for?
MTTR is the most overloaded acronym of the three. Depending on who is writing, the R can mean repair, recovery, resolve, or respond. Each one measures a different stretch of the incident, and the numbers can differ by hours for the same incident.
| Expansion | Clock starts | Clock stops | Use it when |
|---|---|---|---|
| Mean time to repair | Repair work begins (or the failure, in some definitions) | The component works again | Hardware and maintenance teams measuring hands-on repair effort |
| Mean time to recovery / restore | Failure or user impact begins | Service is available to users again | Reporting user-facing downtime and availability. This is the default for web services |
| Mean time to resolve | Failure begins | The incident is fully closed, including root-cause fix and follow-up | Measuring the full cost of an incident to the team |
| Mean time to respond | Alert fires (or failure begins) | Someone starts working on it | Checking on-call and alerting health. Often called MTTA (mean time to acknowledge) |
A worked example: one incident, four MTTRs
Take a single API outage:
- 14:00: a bad deploy starts returning 500 errors
- 14:03: the monitor confirms the failure and alerts
- 14:07: the on-call engineer acknowledges and starts work
- 14:31: the deploy is rolled back and the API serves traffic again
- 16:10: the bug is fixed properly, tested, and the incident is closed
The same incident produces very different numbers:
- Time to respond: 14:07 − 14:03 = 4 minutes from alert (7 minutes from the start of the failure)
- Time to repair: 14:31 − 14:07 = 24 minutes of hands-on work
- Time to recover: 14:31 − 14:00 = 31 minutes of user-facing downtime
- Time to resolve: 16:10 − 14:00 = 130 minutes until the incident was closed
None of these is wrong. What goes wrong is a report that says "MTTR: 31 minutes" next to another team's "MTTR: 130 minutes" without saying which clock each one used. Pick one expansion per report, write down the start and stop events, and keep using them.
For uptime and availability work, use mean time to recovery: it is the number that matches the downtime your users actually saw.
How to calculate MTTR
MTTR = Total downtime / Number of incidents
Example: Over a quarter, a service had 4 incidents lasting 45, 12, 30, and 25 minutes.
Total downtime = 45 + 12 + 30 + 25 = 112 minutes
MTTR = 112 / 4 = 28 minutes
If you want to shorten that number, the phase-by-phase approach is covered in our guide to reducing MTTR. This post sticks to definitions and comparisons.
What is MTBF?
MTBF is the average time a repairable system runs between failures. A web service, a database cluster, and a load balancer are all repairable: when they fail, you fix them and they go back into service.
How to calculate MTBF
MTBF = Total operating time / Number of failures
Operating time means time the system was up. Downtime is excluded.
Example: Over 30 days (720 hours), a service failed 3 times. Total downtime was 90 minutes (1.5 hours).
Operating time = 720 − 1.5 = 718.5 hours
MTBF = 718.5 / 3 = 239.5 hours ≈ 9.98 days
On average, the service ran about 10 days between failures.
Two MTBF conventions
You will see MTBF defined two ways:
- Operating time between failures (the formula above). Downtime is excluded.
- The full cycle from the start of one failure to the start of the next, which includes the repair time. Under this convention,
MTBF = MTTF + MTTR, where MTTF here means the uptime portion of the cycle.
For web services the gap is usually small because downtime is short next to uptime. In the example above, the full-cycle MTBF would be 720 / 3 = 240 hours against 239.5 hours operating time. The difference matters for the availability formula below, so state which convention you use.
MTBF vs uptime percentage
Two services can have the same uptime and very different MTBF:
| Scenario (30 days = 43,200 min) | Uptime | MTBF | What it means |
|---|---|---|---|
| 1 outage of 43 min | (43,200 − 43) / 43,200 = 99.90% | 43,157 / 1 ≈ 30 days | Rare but long failure |
| 6 outages of 7 min | (43,200 − 42) / 43,200 = 99.90% | 43,158 / 6 ≈ 5 days | Frequent short failures |
Uptime percentage hides frequency. MTBF shows it. Users who hit six separate outages in a month usually notice more than the uptime number suggests. For more on what uptime percentages mean in practice, see how to calculate website uptime.
What is MTTF?
MTTF is the average time a non-repairable item runs before it fails permanently. When it fails, you replace it instead of fixing it. Disks, power supplies, fans, and many other hardware parts are treated this way.
How to calculate MTTF
MTTF = Total operating time of all units / Number of failures
The important detail is "all units". Units that are still running at the end of the observation period still contributed operating time, and leaving them out is the most common MTTF mistake.
Example: You run 10 servers for 24 months. Two have a disk failure: one at month 18, one at month 22. The other 8 are still running at month 24.
Operating time of failed units = 18 + 22 = 40 unit-months
Operating time of survivors = 8 × 24 = 192 unit-months
Total operating time = 40 + 192 = 232 unit-months
MTTF = 232 / 2 = 116 months
If you only averaged the two failures, you would get (18 + 22) / 2 = 20 months, which badly understates how long these disks last. With a small sample and most units still running, treat any MTTF figure as a rough estimate, and expect it to change as more units fail.
MTTF is also an average across a population. An MTTF of 116 months does not mean a single disk will last 116 months; it says something about the fleet, not any one unit.
Where MTTF shows up for web teams
Most web teams use MTBF and MTTR far more than MTTF. MTTF comes up with self-hosted hardware, fleet replacement planning, and components you swap out on failure, such as immutable VMs or containers that are recreated rather than debugged in place.
MTBF vs MTTF: what's the difference?
The difference is whether you repair the thing after it fails.
- MTBF is for repairable systems. After a failure, the system is fixed and keeps running, so you measure the time between failures.
- MTTF is for non-repairable items. A failure ends the item's life, so you measure the time to failure.
Both are averages of operating time, both use operating time divided by number of failures, and for both, higher is better. The formula is nearly identical; what changes is the population. MTBF follows one system through many failures. MTTF follows many units through one failure each.
| MTBF | MTTF | |
|---|---|---|
| Applies to | Repairable systems | Non-repairable items |
| After a failure | System is repaired and returns to service | Item is replaced |
| Counts | Multiple failures of the same system | One failure per unit, across many units |
| Typical example | A web service, a database cluster | A disk, a power supply |
A server is repairable (you can swap its disk), so it has an MTBF. The disk inside it is not (you replace it), so it has an MTTF. The server's MTBF depends partly on the MTTF of its parts.
MTTR vs MTBF
MTTR and MTBF measure opposite sides of the same cycle:
- MTBF measures how long the system runs between failures. Higher is better.
- MTTR measures how long each failure lasts. Lower is better.
|←—— up ——→|← down →|←—— up ——→|← down →|
MTBF MTTR MTBF MTTR
They are independent levers. A team can recover from every incident in five minutes and still have a poor service if it fails twice a day. Another team can fail once a quarter and lose a full day each time. Track both: MTBF to see whether failures are getting rarer, MTTR to see whether they are getting shorter.
How MTBF and MTTR determine availability
Using the operating-time convention for MTBF, availability is:
Availability = MTBF / (MTBF + MTTR)
Example: Using the 30-day service from earlier, MTBF is 239.5 hours and MTTR is 90 / 3 = 30 minutes (0.5 hours).
Availability = 239.5 / (239.5 + 0.5)
= 239.5 / 240
= 0.99792 → 99.79%
Check it against the raw numbers: 718.5 hours up out of 720 hours is also 99.79%. The formula is just uptime divided by total time, expressed in averages.
You can also run it backwards to find the MTTR you need for a target. Say you want 99.9% availability and your MTBF is 240 hours:
MTTR = MTBF × (1 − A) / A
= 240 × 0.001 / 0.999
≈ 0.24 hours ≈ 14.4 minutes
So at one failure every 10 days, each failure has to be over in about 14 minutes on average to hold 99.9%. If you cannot get MTTR that low, the other way to reach the target is to increase MTBF. For what the different availability targets mean in allowed downtime, see 99.9% vs 99.99% availability.
If you use the full-cycle convention for MTBF instead, the formula becomes Availability = (MTBF − MTTR) / MTBF. Both give the same answer when applied consistently.
MTTR vs MTTD
MTTD (mean time to detect) is the average time from the start of a failure to the moment you know about it. MTTD is a part of MTTR when MTTR is measured as time to recovery: detection has to happen before anyone can start fixing anything.
In the incident above, the failure began at 14:00 and the monitor alerted at 14:03, so time to detect was 3 minutes out of a 31-minute recovery.
Tracking MTTD on its own matters because it is easy to hide. If your MTTR clock starts at the alert instead of at the start of the failure, every minute of detection delay disappears from the report. A service that users notice before your monitoring does will look fine on an alert-based MTTR. Record the start of impact separately, and report MTTD next to MTTR. Check frequency sets a floor on MTTD; see 1-minute vs 5-minute check intervals.
MTTR vs RTO
RTO (recovery time objective) is a target set in advance: the longest a system may be down after a disruption before the outage becomes unacceptable. MTTR is a measurement: the average recovery time you actually achieved.
The two are easy to confuse because both are measured in recovery time. The differences:
- RTO is a limit per incident. MTTR is an average across incidents.
- RTO comes from business requirements and disaster recovery planning. MTTR comes from incident data.
- RTO is usually set for major disruptions such as losing a region or a database. MTTR usually covers all incidents of a given severity.
An MTTR below RTO does not mean you met RTO. Example: RTO is 4 hours, and three incidents took 1, 1, and 6 hours.
MTTR = (1 + 1 + 6) / 3 ≈ 2.7 hours
The average is well under the 4-hour RTO, but one incident broke it by 2 hours. Compare each incident against RTO, not the average. For RTO and its companion RPO, see RTO vs RPO explained.
Common mistakes with MTTR, MTBF, and MTTF
Not saying which MTTR you mean
Repair, recovery, resolve, and respond produce different numbers for the same incident. Name the expansion and the start and stop events in every report.
Leaving surviving units out of MTTF
Averaging only the units that failed underestimates MTTF, as the disk example shows. Include the operating time of every unit you observed.
Averaging everything together
A single MTTR across every severity mixes five-minute blips with day-long outages. Segment by severity (see incident severity levels) and by service. Averages also hide spread: an MTTR of 20 minutes can mean every incident took about 20 minutes, or most took 5 and one took 3 hours. Report the median and a high percentile next to the mean.
Improving one metric at the expense of the other
Faster recovery is good, but if MTBF is falling at the same time, you are getting better at firefighting rather than having fewer fires. Watch both.
FAQ
What is a good MTTR?
There is no universal number. A good MTTR is one that keeps you inside your availability target and your SLOs at your current MTBF, which you can work out with the availability formula above. Start by measuring your current MTTR per severity, then set targets relative to that baseline.
What is the MTTR and MTBF formula?
MTTR = total downtime / number of incidents. MTBF = total operating time / number of failures. Combined, availability = MTBF / (MTBF + MTTR).
How do you calculate MTTF?
Add up the operating time of every unit you observed, including the ones that have not failed yet, and divide by the number of failures. Ten units running 24 months with two failures at months 18 and 22 give (18 + 22 + 8 × 24) / 2 = 116 months.
Is MTBF the same as MTTF?
No. MTBF is for systems you repair and put back into service; MTTF is for items you replace when they fail. The formulas look the same, but MTBF tracks repeated failures of one system, while MTTF tracks one failure each across many units.
What does MTBF mean in cyber security?
The definition is the same: the average time between failures. In a security context, the "failure" is usually a security incident or a control failure, so MTBF tells you how often incidents happen while MTTD and MTTR tell you how quickly they are found and contained. As with any use of these metrics, define what counts as an incident before you start counting.
How Webalert helps track these metrics
All three metrics depend on accurate failure and recovery timestamps. Webalert records them for you:
- Incident timestamps for every outage, so you can calculate MTTR and MTBF from real data
- 1-minute check intervals and multi-region checks to keep MTTD short and confirm real outages
- On-call scheduling and escalation so time to respond does not depend on someone seeing an email
- Uptime history and reports for trending availability, MTBF, and MTTR over time
For the wider set of delivery metrics, including time to restore service, see DORA metrics explained. See features and pricing for the full details.
Summary
- MTBF: average operating time between failures of a repairable system. Higher is better.
- MTTF: average operating time until a non-repairable item fails. Higher is better. Include surviving units in the calculation.
- MTTR: average time to restore service. Lower is better. Say whether you mean repair, recovery, resolve, or respond.
- Availability = MTBF / (MTBF + MTTR). Raise MTBF, lower MTTR, or both.
- MTTD is the detection part of recovery time. RTO is a per-incident limit, not an average.