Skip to content
EngineeringAll explainers

Technical debt: what it is, what it costs, and when to repay

Technical debt is the future cost of a shortcut taken now, paid later as slower changes. Where the metaphor comes from, Fowler's quadrant for telling prudent shortcuts from reckless ones, the symptoms that show up before anyone names the cause, and what's worth repaying first.

Published: Updated: Reading time: 5 min
On this page

Technical debt is the future cost of choosing a faster solution now over a better one. The gap between the two stays in the codebase and gets paid later, as changes that take longer than they should. A team ships the quick version to hit a date, and every feature built on top of it inherits the gap until someone fixes it directly or routes around it for good. Engineers often shorten the term to tech debt.

Where the metaphor comes from

The metaphor traces to Ward Cunningham, who introduced it in a 1992 OOPSLA experience report describing his team's work on a portfolio management system called WyCash. Cunningham used it to explain to non-technical stakeholders why shipping a first, imperfect implementation and reworking it later made sense, the way a loan lets you act now and settle up once you understand the problem properly. The framing caught on because borrowing against future speed is intuitive. The loan comparison is weaker, though. A bank loan's amount and terms are agreed before anyone spends the money. Most technical debt has nothing agreed in advance; the team finds it later, in code, instead of choosing it out loud.

Types of technical debt: deliberate versus inadvertent

Martin Fowler's technical debt quadrant sorts the types of technical debt along two axes. Deliberate versus inadvertent asks whether the team chose the shortcut on purpose or backed into it without realizing. Prudent versus reckless asks whether anyone weighed what the shortcut would cost.

PrudentReckless
DeliberateSkip a permissions system to ship a pilot, knowing what's missing"No time for design," with no plan to revisit
InadvertentLearn the better structure only after building the first versionNever knew a better structure existed

Deliberate, prudent debt is a legitimate tool. A startup that skips a permissions system it doesn't need yet knows exactly what got left out and why. Reckless debt is the kind where nobody did that weighing. The bigger risk is debt nobody recorded. A shortcut written down stays visible enough to prioritize later. One nobody noted just looks like normal code, until a change built on top of it breaks for reasons nobody can trace.

How the interest shows up

Interest shows up as friction long before anyone calls it debt. Say an estimate that used to take three days stretches to two weeks, for a feature no more complicated than the last one. A single business rule gets copy-pasted into a dozen places, so a pricing change means editing all twelve, and someone always misses one. New engineers take months to get productive because the code doesn't behave the way its structure suggests. None of these feels serious on its own, and teams lower their expectations slowly enough that nobody names the slowdown. Industry-wide, the Consortium for Information and Software Quality estimated the accumulated principal of US technical debt at $1.52 trillion in its 2022 report, reported as its own component of the cost of poor software quality.

How technical debt is measured

No single number captures it, but a few signals are useful inside one codebase. Static analyzers estimate remediation effort in hours. SonarQube's technical debt ratio compares the cost to fix maintainability issues with the cost to develop the code. Those figures work as a trend over months, not as a benchmark against another team. Delivery data often says more: cycle time on the modules people edit most, and how often estimates in those areas slip.

How to prioritize technical debt

Repay debt in code the team is already touching, and leave stable code alone. That rule covers most cases. A shortcut in a feature nobody has changed in two years isn't costing anyone anything right now, however rough it looks, so it can wait. A shortcut in the integration layer between two services, or in whatever file gets edited every sprint, is worth clearing quickly, since every future visit gets easier once it's gone. The practical way to reduce technical debt is to pair repayment with a change already planned instead of opening a file purely to tidy it. The fix stays small, reviewable, and tied to something the business asked for.

How technical debt repayment goes wrong

The way a team pays debt down causes more failures than the debt itself.

  • A refactoring sprint with no product outcome attached. Two weeks of cleanup nobody outside engineering can see is the first thing cut when a deadline slips. It usually gets cancelled halfway, leaving two competing patterns instead of one finished version.
  • Reaching for a rewrite instead of paying debt down in pieces. A rewrite freezes feature work and assumes the team can leave out every old shortcut this time. In practice the new codebase often grows its own debt before the old one retires.
  • Tracking a tooling score nobody acts on. A static analyzer reports a maintainability number, someone glances at it monthly, and no ticket ever gets filed against it.
  • Calling every shortcut debt. Once the word covers any code someone dislikes, it stops helping anyone decide what to fix first.

Bringing in help to pay it down

Delivery speed has visibly dropped and nobody inside agrees on why. A team working in the code daily loses the distance to tell a shortcut that slows every change from one that's merely ugly, and an outside review gives the discussion some evidence. The harder version is a codebase whose authors have all left: nothing in the code says whether a shortcut was prudent under a deadline or reckless from the start, and that difference decides whether it gets repaid or replaced. Technical debt that far along sits closer to legacy modernization than to ordinary cleanup.

Software development consulting is the usual starting point for that assessment; product development and custom software development carry out the repayment once priorities are clear.

Frequently asked questions

  • No. A shortcut taken on purpose, with its cost weighed and written down somewhere findable, is a normal tradeoff rather than a failure. The damaging kind is the shortcut whose cost nobody weighed, especially when nobody wrote it down, because then nobody comes back to it.

  • A bug is broken behavior the code was never meant to have. Technical debt is a working decision, made under time pressure, whose cost shows up later as slower changes rather than incorrect output. A system can ship with zero open bugs and still carry enough debt to make the next six months harder than they need to be.

  • Only within one codebase. Static analyzers can estimate remediation effort in hours or count code smells, and that figure is useful as a trend inside one codebase watched over months. It tells you little when you compare teams, because the same tool run against two systems mostly reflects their language, age, and rule configuration rather than the debt either one actually carries. No industry standard exists to normalize it, so a score copied from someone else's dashboard is not a benchmark.

  • Not in the sense of reaching zero. New debt appears every time a team ships under a deadline, and most teams ship under deadlines, so the realistic goal is to keep the debt that's actively slowing the team down smaller than the team's capacity to address it. If a codebase really shows no debt at all, check whether anyone is shipping anything.

  • A business rule copy-pasted into several services instead of living in one place. A dependency left two major versions behind because upgrading it was never scheduled. A permissions check hardcoded for a pilot that became the production setup. Tests skipped to hit a release date and never written afterwards. Each one works today and makes the next change slower.

Still unanswered
Ask us directly

A senior engineer replies under 4 hours.