{
  "id": "mtbf",
  "version": "2d7231ddd8e1",
  "status": "published",
  "name": "MTBF Calculator",
  "question": "What is the MTBF?",
  "summary": "MTBF calculator: mean time between failures from total operating hours and failures, with the failure rate, reliability over a mission time, and chi-square confidence bounds, including the zero-failure case.",
  "category": "physics",
  "subcategory": "electricity",
  "url": "https://www.acalculator.org/physics/mtbf-calculator",
  "markdown": "https://www.acalculator.org/physics/mtbf-calculator.md",
  "kind": "function",
  "method": "T = units × time per unit; MTBF = T ÷ r; λ = r ÷ T; lower bound 2T ÷ χ²(c; 2r + 2); two-sided interval [2T ÷ χ²(1 − α/2; 2r + 2), 2T ÷ χ²(α/2; 2r)] with α = 1 − c; R(t) = e^(−t ÷ MTBF).",
  "assumptions": [
    "A constant failure rate (the exponential model): failures arrive at random, and failed units are repaired or replaced at once.",
    "The test runs for a fixed time (Type I censoring), as in NIST §8.4.5.1; χ²(p; k) is the value a chi-square variable with k degrees of freedom stays below with probability p."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "n": {
        "title": "Number of units",
        "description": "How many units ran (each for the time below).",
        "type": "integer",
        "minimum": 1,
        "maximum": 1000000000
      },
      "t": {
        "title": "Operating time per unit",
        "description": "How long each unit ran.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "time",
        "minimum": 1,
        "maximum": 10000000000000
      },
      "r": {
        "title": "Failures",
        "description": "The number of failures seen in that time; 0 if none.",
        "type": "integer",
        "minimum": 0,
        "maximum": 100000
      },
      "c": {
        "title": "Confidence level",
        "description": "The confidence for the MTBF bounds, for example 90%.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 1,
        "maximum": 99.99
      },
      "m": {
        "title": "Mission time",
        "description": "Optional: a time to find the chance of running that long without a failure.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "time",
        "minimum": 0,
        "maximum": 10000000000000
      }
    }
  },
  "outputs": {
    "result": {
      "label": "MTBF",
      "description": "Total operating time ÷ failures, in hours; with no failures, the lower confidence bound.",
      "format": "text"
    },
    "mtbf": {
      "label": "MTBF (hours)",
      "description": "Total operating time ÷ failures. None when there are no failures.",
      "format": "number"
    },
    "totalHours": {
      "label": "Total operating time (hours)",
      "description": "Units × operating time per unit.",
      "format": "number"
    },
    "rate": {
      "label": "Failure rate (per hour)",
      "description": "λ = failures ÷ total operating time = 1 ÷ MTBF.",
      "format": "number"
    },
    "perMillion": {
      "label": "Failures per million hours",
      "description": "λ × 10⁶.",
      "format": "number"
    },
    "fit": {
      "label": "Failures per billion hours (FIT)",
      "description": "λ × 10⁹, the FIT rate.",
      "format": "number"
    },
    "lower": {
      "label": "Lower confidence bound (hours)",
      "description": "One-sided: the MTBF is at least this at the chosen confidence, 2T ÷ χ²(c; 2r + 2).",
      "format": "number"
    },
    "intervalLow": {
      "label": "Two-sided interval, low (hours)",
      "description": "2T ÷ χ²(1 − α/2; 2r + 2), with α = 1 − confidence.",
      "format": "number"
    },
    "intervalHigh": {
      "label": "Two-sided interval, high (hours)",
      "description": "2T ÷ χ²(α/2; 2r). Needs at least one failure.",
      "format": "number"
    },
    "reliability": {
      "label": "Reliability over the mission (%)",
      "description": "R = e^(−mission ÷ MTBF), as a percent: the chance of no failure in the mission time.",
      "format": "number"
    },
    "failureChance": {
      "label": "Chance of a failure in the mission (%)",
      "description": "The chance of at least one failure in the mission time, 1 − R, as a percent.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "n": 1,
      "t": "800 h",
      "r": 2,
      "c": 90,
      "m": "100 h"
    },
    "outputs": {
      "result": "400 hours",
      "mtbf": 400,
      "totalHours": 800,
      "rate": 0.0025,
      "perMillion": 2500,
      "fit": 2500000,
      "lower": 150.31038141637697,
      "intervalLow": 127.06896827442834,
      "intervalHigh": 2251.2286106257034,
      "reliability": 77.8800783071405,
      "failureChance": 22.119921692859513
    },
    "text": "MTBF: 400 hours, from 800 hours of operation."
  },
  "examples": [
    {
      "given": {
        "n": 1,
        "t": 2880000,
        "r": 2,
        "c": 90,
        "m": 360000
      },
      "expect": {
        "result": "400 hours",
        "mtbf": 400,
        "rate": 0.0025,
        "perMillion": 2500,
        "intervalLow": 127.06896827442839,
        "intervalHigh": 2251.2286106257047,
        "reliability": 77.8800783071405
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, §8.4.5.1 Constant repair rate (HPP/exponential) model (MTBF = total time ÷ total failures; 2T ÷ χ² bounds; zero failures: T ÷ (−ln α); example: 800 h and 2 failures, MTBF 400 h, 90% interval (127, 2251), 127 a 95% lower limit), https://www.itl.nist.gov/div898/handbook/apr/section4/apr451.htm (retrieved 2026-10-18); NIST/SEMATECH e-Handbook of Statistical Methods, §8.1.6.1 Exponential (R(t) = e^(−λt)), https://www.itl.nist.gov/div898/handbook/apr/section1/apr161.htm (retrieved 2026-10-18); R = e^(−100 ÷ 400) = 77.88% (hand calculation in content.mdx)",
      "tolerance": 1e-9
    },
    {
      "given": {
        "n": 1,
        "t": 2880000,
        "r": 2,
        "c": 95
      },
      "expect": {
        "lower": 127.06896827442839
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, §8.4.5.1 Constant repair rate (HPP/exponential) model (MTBF = total time ÷ total failures; 2T ÷ χ² bounds; zero failures: T ÷ (−ln α); example: 800 h and 2 failures, MTBF 400 h, 90% interval (127, 2251), 127 a 95% lower limit), https://www.itl.nist.gov/div898/handbook/apr/section4/apr451.htm (retrieved 2026-10-18): 127 is a 95% lower limit for the true MTBF",
      "tolerance": 1e-9
    },
    {
      "given": {
        "n": 1,
        "t": 2880000,
        "r": 0,
        "c": 95
      },
      "expect": {
        "lower": 267.04656055626725,
        "result": "At least 267.047 hours (95% lower bound, no failures yet)",
        "rate": 0
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, §8.4.5.1 Constant repair rate (HPP/exponential) model (MTBF = total time ÷ total failures; 2T ÷ χ² bounds; zero failures: T ÷ (−ln α); example: 800 h and 2 failures, MTBF 400 h, 90% interval (127, 2251), 127 a 95% lower limit), https://www.itl.nist.gov/div898/handbook/apr/section4/apr451.htm (retrieved 2026-10-18): zero failures, MTBF lower bound T ÷ (−ln α) = 800 ÷ (−ln 0.05) = 267",
      "tolerance": 1e-9
    },
    {
      "given": {
        "n": 50,
        "t": 3600000,
        "r": 4,
        "c": 90,
        "m": 31536000
      },
      "expect": {
        "mtbf": 12500,
        "fit": 80000,
        "reliability": 49.61881944133068,
        "failureChance": 50.381180558669314
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, §8.4.5.1 Constant repair rate (HPP/exponential) model (MTBF = total time ÷ total failures; 2T ÷ χ² bounds; zero failures: T ÷ (−ln α); example: 800 h and 2 failures, MTBF 400 h, 90% interval (127, 2251), 127 a 95% lower limit), https://www.itl.nist.gov/div898/handbook/apr/section4/apr451.htm (retrieved 2026-10-18); NIST/SEMATECH e-Handbook of Statistical Methods, §8.1.6.1 Exponential (R(t) = e^(−λt)), https://www.itl.nist.gov/div898/handbook/apr/section1/apr161.htm (retrieved 2026-10-18); hand calculation in content.mdx: 50 × 1,000 ÷ 4 = 12,500 h, λ = 8 × 10⁻⁵ per hour, R = e^(−8,760 ÷ 12,500)",
      "tolerance": 1e-9
    }
  ],
  "sources": [
    "NIST/SEMATECH e-Handbook of Statistical Methods, §8.4.5.1 Constant repair rate (HPP/exponential) model: the MTBF estimate is total time ÷ total failures; chi-square confidence bounds for Type I (time) censoring; the zero-failure bound T ÷ (−ln α); the 800-hour example, retrieved 2026-10-18. https://www.itl.nist.gov/div898/handbook/apr/section4/apr451.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, §8.1.6.1 Exponential: R(t) = e^(−λt), constant failure rate λ, mean 1 ÷ λ, retrieved 2026-10-18. https://www.itl.nist.gov/div898/handbook/apr/section1/apr161.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, §8.1.7.1 Homogeneous Poisson Process: times between failures are exponential and MTBF = 1 ÷ λ, retrieved 2026-10-18. https://www.itl.nist.gov/div898/handbook/apr/section1/apr171.htm",
    "Wikipedia, Failure rate, section Units: FIT, failures in one billion (10⁹) device-hours, retrieved 2026-10-18. https://en.wikipedia.org/wiki/Failure_rate"
  ],
  "related": [
    "battery-life",
    "power"
  ],
  "changelog": []
}
