A frequently repeated claim in software engineering — that a defect costs dramatically more to fix the later it's discovered in a development process, sometimes cited with specific multipliers between stages — has been influential enough to shape a lot of testing and process advice, including much of the reasoning behind test-driven development and the testing pyramid, both discussed elsewhere on this shelf. The specific numeric multipliers originally cited have been contested and are harder to verify rigorously than their frequent repetition suggests, but the underlying mechanism the claim points to is real and worth understanding directly, independent of any specific number attached to it. A prevention-focused engineering reference is the OWASP secure coding practices.

Why later discovery is more expensive, mechanically

A bug caught by a fast unit test, moments after the responsible code was written, is cheap to fix for a specific reason: the context is still fully loaded in the developer's mind, the scope of what might be affected is small and well understood, and no other work has yet been built on top of the flawed assumption. A bug discovered in production, by contrast, often requires first being noticed at all (which can take time on its own), then reproduced (sometimes difficult if it depends on specific production conditions hard to replicate elsewhere), then diagnosed by someone who may not have written the original code and has to reconstruct the relevant context from scratch, then fixed and deployed through whatever process governs production changes — and by that point, other code may have been built on top of the original flawed behavior, meaning the fix has to account for those downstream dependencies too. Any metric can become unreliable when people optimize for the signal, so teams may compare detection approaches in this reference.

This is the actual mechanism behind the cost curve, and it explains why the effect isn't a fixed, universal multiplier so much as a description of several compounding costs that tend to accumulate the longer a defect goes unnoticed: lost context, harder reproduction, more accumulated downstream dependency on the flawed behavior, and often a more urgent, higher-pressure fixing environment (a live production issue) than the calm, unhurried environment a bug caught by a local test would have been fixed in.

Why the specific multipliers are worth being skeptical of

The specific numbers sometimes cited for how much more expensive a late-discovered bug is have murkier, harder-to-verify empirical origins than their frequent, confident citation suggests, and reasonable critics have pointed out that the cost genuinely varies enormously by context — the type of software, the nature of the specific defect, how the organization responds to production incidents — in ways that a single universal multiplier can't capture. The mechanism (context loss, harder reproduction, accumulated dependency, response pressure) is well supported and intuitive; the specific numbers attached to it are less rigorously established than their ubiquity in engineering conversations implies.

How this connects to the rest of this shelf

This idea is the underlying justification running through several of the other process guides on this shelf: the testing pyramid's preference for fast, cheap unit tests over slow, broad ones; test-driven development's discipline of catching a mismatch between intent and implementation immediately; continuous delivery's preference for small, easily-diagnosed batches over large ones. None of these practices require believing a specific numeric multiplier — they all follow directly from the more modest, better-supported claim that catching a problem earlier, with more context and less accumulated dependency, is genuinely, mechanically cheaper than catching it later.

The exact multiplier is less important, and less well established, than the mechanism behind it: a bug caught early is fixed by someone with full context, in a calm environment, before anything else depends on the flawed behavior. Every one of those conditions gets worse the longer a defect goes unnoticed.

Stripped of its most-quoted but least-verifiable numbers, this remains one of the more genuinely load-bearing ideas in modern software process — not because of a specific multiplier, but because the compounding mechanism it describes shows up, in some form, in nearly every team's actual experience of fixing a bug that got away.