Cost of software defects

Hand-drawn terracotta cracks of different lengths and widths, a few forking, cutting through wavy horizontal strata of cream, linen, sand and umber hatching with thin moss seams.

The cost of software defects is the effort, time and money spent finding faults and vulnerabilities in software, fixing them, and bearing the damage of those that reach users. The best-known figure, a 100:1 ratio between the cost of a fix after delivery and early in development, traces to data from large systems of the late 1970s (Boehm & Basili, 2001; Menzies et al., 2017). In 171 more recent projects, issues fixed in later development phases did not take consistently or substantially more effort (Menzies et al., 2017). US estimates of what escaped defects cost are also disputed: $59.5 billion a year from inadequate testing in one, at least $2.41 trillion from poor software quality in another (RTI, 2002; Krasner, 2022). Detection methods are hard to rank by cost per defect, because they find largely different defects (Hassler et al., 2025).

What counts as a cost

Defect costs are reported as hours of labour, as days of elapsed time or as money, and each source defines its own measure.

Quality management treats defects inside a wider “cost of quality”. That framework counts spending on prevention, on appraisal (checking work) and on failures. It splits failures into internal ones, caught before delivery to the customer, and external ones, found after (ASQ, n.d.). Rework, in the same framework, is the correction of defects or errors (ASQ, n.d.).

Elapsed time depends on where the clock starts and stops. Security tools report a “mean time to remediate”, but define it differently. One vendor measures from first detection to a confirmed fixed status; another can start the clock when a vulnerability first appears on a machine, or reappears after patching, and stops it at a scan that no longer finds it (Qualys, n.d.; Rapid7, n.d.).

Does a defect cost more to fix when found later?

Whether fixes grow steeply more expensive the later a defect is found is contested. The steep ratios come from old data and small surveys, while newer project data show small or no increases before release and moderate ones after it. What the curve implies for planning a design up front is covered in designing ahead; this section covers the evidence about defect repair.

Where the multipliers come from Weak evidence: few or small studies support this

The best-known multipliers rest on old data, course notes and small surveys. The 100:1 rule began with Barry Boehm’s studies of large systems. His 1976 paper plotted the relative cost of a fix against the phase in which the error was found, using series labelled IBM-SCD, GTE and a TRW survey median (Boehm, 1976). The fuller curve in his 1981 book drew on large late-1970s systems at IBM, TRW, GTE and Bell Labs (Menzies et al., 2017).

Boehm himself later narrowed the rule. Writing with Victor Basili in 2001, he put the factor for small, noncritical systems closer to 5:1 than 100:1 (Boehm & Basili, 2001).

The stepwise ratios in Roger Pressman’s textbook are credited to course notes. It gives a cost of 1 unit for a fix in design, 6.5 just before testing, 15 during testing and 60 to 100 after release. He credits the figures to 1981 IBM Systems Sciences Institute course notes on software inspections (Pressman, 2001).

The 2002 study that the research institute RTI carried out for the US National Institute of Standards and Technology (NIST) gives smaller, sector-specific ratios from surveys. Transport respondents estimated that a coding error cost twice as much to fix when found in integration and five times as much after release. Financial-services respondents put a requirements error found in production at about 15 times the cost (RTI, 2002). These rest on small samples: 10 vendors and 179 users in transport, four developers and 98 users in finance (RTI, 2002). In the report’s table of earlier studies, one column used the cost of returning a hardware line card as a stand-in for the cost of a requirements-phase repair (RTI, 2002).

What project data show

Project data disagree on how much later fixes cost, and the answer depends on the phases and defects compared.

Before release, recent project data show no steep rise. In 171 projects from 2006 to 2014, issues resolved in a later phase did not take consistently or substantially more effort than issues resolved soon after they appeared (Menzies et al., 2017). All of those projects used one disciplined process, the Team Software Process, and the data stop before deployment (Menzies et al., 2017).

After release, some projects do show higher repair effort, of about two to more than three times. At one large NASA mission, failures found after release took more than three times the average fix implementation effort of those found before (Hamill & Goseva-Popstojanova, 2017). At Avaya, a model estimated that a repair requested from the field took about twice the effort of a comparable repair requested internally (Mockus et al., 2003).

The ratio shrinks when like is compared with like. In the same NASA data, take noncritical failures whose fix touched one component and one kind of artifact. Their median effort was 2 hours for 684 failures found before release and 3 hours for 14 found after (Hamill & Goseva-Popstojanova, 2017). A median is the middle value, so it is less pulled up by a few very costly fixes than the average behind the threefold figure.

Errors left unresolved may also raise the cost of later work. Localising a product means adapting it for other languages. At one vendor, a regression linked its total localising cost to an exponential transformation of the count of errors left unresolved in the base software (Westland, 2002).

Moving checks earlier Weak evidence: few or small studies support this

“Shift left” means moving testing and security checks earlier in development. The evidence that it lowers total cost rests on a planning model and a small pilot. In an industrial study, a planning model compared development with and without static analysis, the automated checking of code without running it. In the model, early removal reduced total development effort (Nichols, 2020).

Starting such checks can be cheap. In a study of five projects at small and medium software firms, introducing each automated static analysis technique mostly took less than one person-hour (Gleirscher et al., 2014).

A pilot in three insurance companies reported a before-and-after drop in fix time. Time to resolve vulnerabilities fell from 11.5 to 3.2 days after the companies adopted DevSecOps, a set of practices that builds security checks into development and operations (Guda, 2025). This is weak evidence: the pilot was small and uncontrolled, and gives too little detail to show that DevSecOps caused the drop.

The cost of finding defects

The cost of detection varies widely within each method, and methods catch largely different defects.

Cost by technique

Labour per defect varies widely within a single technique. A survey of published studies found that inspections, in which people read code or documents to find faults, detected between 0.16 and 6 defects per staff-hour. The same survey found median removal efforts of 2.5 staff-hours per defect in unit testing, 4.55 in integration testing and 6.2 in system testing (Wagner, 2006).

Code reading and testing may differ in how well they isolate faults. In a small controlled experiment with 18 participants, code reading beat structural and functional testing at isolating the fault behind a failure. All three were equally efficient at revealing failures (Farooq et al., 2017).

Automated tools find largely different bugs, so a single cost per bug does not compare them well. In a benchmark on C and C++ code, fuzzers (tools that run a program on generated inputs) and static analyzers detected largely different sets of bugs. That benchmark’s cost per bug counted only the electricity for computing (Hassler et al., 2025). Keeping fuzzing running has its own upkeep: across projects in Google’s OSS-Fuzz service, the median project saw 4.76% of its fuzzing builds fail (Nourry et al., 2024b).

Formal methods, which check software against a mathematical specification, have been reported on in case studies. On SHOLIS, a safety-critical system, the team felt that proof of the formal specification and system validation tests were the most cost-effective phases for finding faults. The authors cautioned that they had not seriously compared the severity of faults found in each phase (King et al., 2000). At Philips Healthcare, two units built with a formal design method took 5,701 hours including non-coding work, and their code averaged 0.36 defects per thousand lines (Osaiweran et al., 2016).

Screening false alarms

Every alert a tool raises costs someone’s time to check, and some tools raise many false ones. At Google, a 2008 study estimated eight minutes of manual triage per static analysis warning (Ruthruff et al., 2008). At Tencent, developers said one alert took about 10 minutes to examine per review round, with one or two rounds per alert. In that company’s research dataset, 328 of 433 alerts were false positives (Du et al., 2026).

Confirming findings is costly even for researchers. In the C and C++ benchmark, two researchers each spent about 20 hours labelling the reports chosen for manual review, then four more hours resolving disagreements. Only 35 of the 424 reports matched a known target vulnerability, though that figure does not give the tools’ overall false-positive rate (Hassler et al., 2025).

Bug bounties and penetration tests

Bug bounties, which pay outside researchers for each valid vulnerability they report, cost a few thousand dollars or less per payout in two browser programmes. Over about three years, Chrome paid roughly $580,000 for 501 bounties and Firefox $570,000 for 190, about $1,160 and $3,000 per payout (Finifter et al., 2013). The authors compared these totals with a modeled in-house security researcher at about $500 a day, a $100,000 salary plus 50% overhead (Finifter et al., 2013).

Payouts leave out the cost of sorting reports, and most submissions are not valid vulnerabilities. In a US government bounty programme, 18% of submissions were valid and unique vulnerabilities, with an average award of $462 (Technology Transformation Services, 2020). The bounty platform HackerOne based its 2026 report on 92,194 valid reports and $89.1 million in payouts (HackerOne, 2026).

Penetration tests, in which hired specialists attack a system, are priced by the day rather than by the finding. One UK government supplier lists £1,000 to £1,500 plus VAT per consultant day, depending on scope (Cyberis Limited, 2024). Because bounties are priced per finding and penetration tests per day, their prices are hard to compare directly.

The cost of fixing defects

Fix costs are measured as labour hours or as calendar time, and much of both lies outside writing the code.

Engineering labour Weak evidence: few or small studies support this

A stage-by-stage split of vulnerability repair labour comes from one vendor’s small sample of outsourced projects. The data come from a set of 15 remediated applications (Cornell, 2012). In that sample, writing the fixes took 29% of execution time. Confirming fixes and quality assurance took 24%, setting up a development environment 16%, deployment 3% and overhead 28% (Cornell, 2013). Confirming fixes sometimes took longer than making them (Cornell, 2012).

Those shares carry heavy limits. The author named the small sample and the single project type, outsourced security remediation, as sources of bias. Planning was left out because its records were too messy, and one vulnerability that cost more to fix than all the included ones was dropped from the study (Cornell, 2012).

Other labour figures are models or measure something else. A commissioned Forrester model of a composite organisation assigns 6.5 developer hours to each vulnerability, averaged across development stages (Forrester Consulting, 2025). In six open-source projects, vulnerabilities took more time than ordinary bugs to settle on a fix strategy but less time to fix (Canfora et al., 2020).

Elapsed time to a fix

Vendors took weeks to fix reported vulnerabilities in one dataset, and the figure depends on which events start and stop the clock. Vendors took an average of 52 days to fix vulnerabilities that Google’s Project Zero reported in 2021 (Schoen, 2022). That average covers only bugs that were fixed; at publication, 11 reports remained unfixed and eight of them were past their deadline (Schoen, 2022). In open-source projects, among 2,153 vulnerabilities with a public GitHub issue before a pull request, the median time from issue to pull request was 23 days (Liu et al., 2025c).

In one sample, much of the delay came after the code was fixed. For 75 open-source browser bugs, the average was 8.8 days from report to public patch, then 37.3 days from patch to release (Schoen, 2022). Project Zero calls the wait for downstream products to take up an available upstream fix the “upstream patch gap” (Willis, 2025). At two healthcare organisations, 54% of the 417 recorded reasons for delay across 132 late patching tasks arose in deploying the patch (Dissanayake et al., 2022). Fixes that touch several products also take longer to coordinate: they were released a median of four days after disclosure, against two days before disclosure for single-product fixes (Lin et al., 2023b).

Disclosure deadlines appear to speed fixes without guaranteeing them. A historical study found evidence that a 182-day grace period sped up patch creation, yet 25.9% of reported vulnerabilities still had no patch within that time (McQueen et al., 2011).

What predicts how long a fix takes

Severity predicts fix time only weakly; where and by whom the fix is made can matter more. Across three Eclipse projects, the median delay between assigning a high-severity defect and a developer first selecting its code was 0.56 times that for a low-severity one (Zhang et al., 2012a). Critical open-source vulnerabilities reached a pull request in a median of 13.5 days against 26.0 for others, but the effect size was negligible (Liu et al., 2025c). That effect size, Cliff’s delta, was −0.077; it runs from −1 to 1, and values near zero mean the two groups’ times overlap almost completely. In SAP’s data on security issues after release, the component and the team predicted time to closure better than the CVSS score, a standard severity rating (Ben Othmane et al., 2017).

The cost of defects that escape

National estimates of what escaped defects cost differ widely and have been challenged, because they count different costs with different methods. What incident data say about breaches is covered in data breaches.

The RTI estimate Weak evidence: few or small studies support this

RTI estimated in 2002 that inadequate software testing infrastructure cost the United States $59.5 billion a year, and that feasible improvements could save $22.2 billion (RTI, 2002). It built the national figure by extrapolating per-employee costs from two sectors, transportation equipment manufacturing and financial services, to other industries (RTI, 2002). Those per-employee costs rest on the small interview samples described above.

The CISQ estimates Weak evidence: few or small studies support this

The Consortium for Information and Software Quality (CISQ) estimated the US cost of poor software quality in 2022 at at least $2.41 trillion (Krasner, 2022). Its largest parts are projections. It raised its 2020 estimate of operational failure costs by 15% cumulative inflation, to about $1.8 trillion. It took a 24% US share of global cybercrime costs, by GDP, to get about $1.44 trillion (Krasner, 2022).

The operational-failure figure rests on press-reported incidents. For 2018, CISQ assigned 75% of news-reported failure losses to the United States, giving $1.275 trillion (Krasner, 2020). A working group of BCS, the UK’s professional body for IT, found that most of one reported total of failure costs, from Tricentis, was the value of affected assets rather than actual losses. It also called the 22% growth that lifted the figure to $1.56 trillion in 2020 unsubstantiated (BCS IT Leaders Forum Software Risk & Resilience Working Group, 2022).

The estimate moves a great deal with its assumptions. CISQ’s first 2018 total of $3.73 trillion assumed its cost categories did not overlap. After changing that assumption and its treatment of technical debt, the same author revised 2018 to $2.1 trillion (Krasner, 2020). Loss surveys have a wider weakness too: in most cybercrime surveys examined in one study, a few of the largest responses dominated the totals (Florencio & Herley, 2011).

Further reading

  • Menzies, Nichols, Shull and Layman (2017) (Menzies et al., 2017): traces the history of the cost-to-fix curve and tests it on 171 projects.
  • Boehm and Basili (2001) (Boehm & Basili, 2001): the short list that states the 100:1 rule and its 5:1 qualification for small systems.
  • Wagner (2006) (Wagner, 2006): a survey of the costs of inspections and testing, per defect and per staff-hour.
  • Finifter, Akhawe and Wagner (2013) (Finifter et al., 2013): what the Chrome and Firefox bounty programmes paid, and how that compares with staff.
  • RTI (2002) (RTI, 2002): the NIST-commissioned national estimate, with its sector surveys of cost by phase.
  • BCS working group (2022) (BCS IT Leaders Forum Software Risk & Resilience Working Group, 2022): an audit of the data behind the trillion-dollar estimates of software failure costs.

Known gaps

What this article cannot tell you yet.

  1. Independent measurements of the engineering hours spent on each stage of a vulnerability fix (diagnosis, reproduction, repair, verification and release) are missing; the only stage-by-stage split comes from one vendor’s small sample.
  2. There is no comparison of the all-in cost per comparable defect across detection methods that counts tool setup, test upkeep, triage of alerts and confirmation of findings.
  3. No controlled industry comparison shows whether moving checks earlier lowers total labour.
  4. The primary data behind Pressman’s cost ratios (1981 IBM course notes) and behind the exact 1:10:100 progression are missing.
  5. No independent national estimate of defect costs made on the same basis as the RTI or CISQ estimates exists in the article’s evidence.
  6. How cost figures differ between kinds of software, organisations and decades is missing.
  7. The effectiveness of testing techniques compared with code reading rests on one small replication; larger multisite comparisons are missing.
  8. The quality of security patches, such as fixes that are incomplete or break the software, is not covered.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 42 references