Technical debt

Hand-drawn five hatched terracotta beams with small wedges at their feet lean diagonally across a dense wall of sagging sand, linen, umber and moss hatched blocks, one short beam bracing the longest.

Technical debt is the software engineering metaphor for design or implementation shortcuts that help in the short term but make future changes more costly, or impossible (Perera et al., 2023). The term has an expert consensus definition, but most of what is known about its costs rests on practitioners’ own estimates and on correlations, not on tests of cause (Besker et al., 2019a; Tornhill & Borg, 2022). Researchers and practitioners dispute what counts as debt, whether the debt image fits at all, whether deadlines are its main cause, and whether AI coding assistants add to it (Fowler, 2009; Stephens, 2017; Edbert et al., 2025; He et al., 2025c; Borg et al., 2026).

Origin and definition

Ward Cunningham introduced the image in 1992: shipping first-time code is like going into debt, which speeds development so long as it is paid back promptly with a rewrite (Cunningham, 1992). The interest, in his account, is the time spent working on not-quite-right code, and unpaid debt can stall whole engineering organisations (Cunningham, 1992).

Cunningham later said the debt arises when a program no longer matches what the team has learned about the problem (Cunningham, 2009). He favoured code that reflects current, even partial, understanding, and said bloggers had confused the metaphor with deliberately writing poor code, which he does not endorse (Cunningham, 2009).

A 2016 Dagstuhl seminar of researchers produced the definition the research community now uses. It calls technical debt design or implementation constructs that are expedient in the short term but can make future change more costly or impossible. Their impact is limited to internal qualities such as maintainability (Perera et al., 2023). Before it, the lack of a shared definition was seen as a barrier to research (Izurieta et al., 2016).

The definition has held. A 2025 manifesto from a second Dagstuhl workshop did not redefine the term; it adopted the 2016 definition, which it says stood the test of time through consensus (Avgeriou et al., 2025). In its terms, the principal is what a better solution would cost now. The interest is the extra cost of reduced velocity, induced defects and lost quality, which accumulates until the debt is resolved or the environment changes (Avgeriou et al., 2025).

What counts as debt Contested: studies disagree on this

The consensus definition leaves its boundary disputed: authors disagree on whether unintended flaws, messy code and defects count. Steve McConnell splits debt into unintentional and intentional kinds, and treats intentional debt as a conscious choice to optimise for the present, either short-term (tactical) or long-term (strategic) (McConnell, 2008).

Robert Martin holds that messy code written out of ignorance is not debt, because debt should be a considered decision (Fowler, 2009). Martin Fowler calls this the wrong question: what matters is whether the metaphor is useful. He sorts debt along two axes: prudent or reckless, and deliberate or inadvertent. Even a clean project, he holds, incurs debt as the team learns what the design should have been (Fowler, 2009).

Defects sit on the contested edge. The Technical Debt Landscape of Philippe Kruchten and colleagues excludes visible issues such as defects and new features, since an organisation already sees them. It counts mostly invisible ones, such as architecture, test and documentation debt (Holvitie et al., 2018). Earlier work treated accumulated defects as “defect debt” (Holvitie et al., 2018). The Dagstuhl community left social, documentation, process and infrastructure debt at the periphery, and says most debt is incurred unintentionally and found later (Izurieta et al., 2016).

In use, the term is broad and ambiguous. A mapping study of 94 papers found it used in different ways by different people (Li et al., 2015). An analysis of GitHub issues found practitioners’ readings often diverge from the original metaphor (Cavalcante & Santos, 2025). The 2025 manifesto warns that not every problem a tool or stakeholder finds is technical debt (Avgeriou et al., 2025).

Practitioners agree on the broad idea but not on its detail. In a survey of 1,831 practitioners in three large organisations, they defined debt as a shortcut for expediency, in practice bad code or inadequate refactoring. Of them, 71% agreed it involves both principal and interest (Ernst, 2015). The same report says developers and managers did not share a clear understanding of what the metaphor means for their project (Ernst, 2015).

Critiques of the metaphor Weak evidence: few or small studies support this

Critics argue the financial image breaks down at several points, though the critiques are mostly practitioner essays rather than studies. The first is interest: Fowler notes it is triggered by touching the code, not by the passage of time (Fowler, 2019b). Academic authors add that principal can be defined and quantified, while interest has controversial definitions and cannot be measured straightforwardly (Ampatzoglou et al., 2015).

Repayment does not work like a loan. Financial debt is contractual and must be repaid, while technical debt need not be. Business partners expect a known amount, timeline and rate, which technical debt does not have (Stephens, 2017). It has no payment schedule and can be defaulted on (Ovid, 2011).

Debt resists a single price. Fowler says its costs cannot be measured objectively (Fowler, 2019b). Kevlin Henney argues that a single currency figure prices the wrong quantity: the debt is the cost of owning it, not of repaying it. A code smell, a pattern that signals a design problem, has no fixed value because smells depend on context (Henney, 2020). Equating principal with refactoring cost is also arguable, since refactoring can cost more than the time first saved (Perera et al., 2023).

Managers may think in risk rather than interest. Rachel Stephens, reporting a conference talk, argues managers care more about risk than interest payments (Stephens, 2017). Fowler adds that the image can lead teams to take on debt for speed because the dynamics differ from a loan (Fowler, 2019b).

The metaphor’s support comes mainly from opinion about communication. Respondents to the 1,831-person survey saw it as important for communication, though the authors say it is unclear whether practice takes it beyond that (Ernst et al., 2015). Later work describes communication about debt as challenging, especially with non-technical stakeholders (Wiese et al., 2025).

A few studies test the financial mapping itself. Classes with similar principal tended to have similar interest, in the first study to test that link (Ampatzoglou et al., 2020). In an industrial validation, the point at which accumulated interest exceeds principal correlated strongly with experts’ judgement of how sustainable modules were (Ampatzoglou et al., 2018).

Options and credit as alternatives Weak evidence: few or small studies support this

The main proposed alternative treats messy code as an option rather than a loan; its formal versions have been shown only on worked examples. Steve Freeman, crediting Chris Matts, argues that bad code is better described as an unhedged call option than as debt. Debt is predictable and manageable, he argues, while an option captures the unpredictability of bad code (Freeman, 2010). A commenter objected that options expire, while unpaid debt does not (Freeman, 2010). The option view of software design treats such choices more broadly.

Formal real-options models of debt exist in peer-reviewed work, each demonstrated on an illustrative example. A real option is a right, without an obligation, to make a future decision once uncertainty resolves (Shakeri Hossein Abad & Ruhe, 2015). Models cover cloud service selection (Alzaghoul & Bahsoon, 2013; Alzaghoul & Bahsoon, 2014) and requirements debt (Shakeri Hossein Abad & Ruhe, 2015). A 2026 preprint models deliberate early-stage debt as a call option on the validated product, with illustrative calibrations and two pre-registered tests (Azarang & Azarang Esfandiari, 2026). The 2025 manifesto notes that product managers rarely use such value methods (Avgeriou et al., 2025).

Another proposal adds “technical credit”, design investments that reduce future friction, as a complement to debt; its definition has limited consensus (Bucaioni et al., 2026).

Types of debt Strong evidence: many studies agree on this

Researchers sort debt into many types, and practitioners report no single type as dominant. The metaphor began with implementation and was extended to architecture, design, documentation, testing and requirements (Lenarduzzi & Fucci, 2019). A mapping of 94 studies found 10 types, and a later review lists 15, including people, build, process and versioning debt (Li et al., 2015; Adekunle et al., 2024).

Type of debtShare of practitioner reports
Design21.99%
Test19.94%
Code14.66%
Architecture10.7%
Documentation9.09%
Requirements8.80%

The table gives the types most often reported in the InsighTD surveys, a family of surveys with 653 valid responses from six countries (Ramač et al., 2021). In the 1,831-person survey, by contrast, architectural decisions were the most important source of debt (Ernst et al., 2015). Research has focused most on code debt (Li et al., 2015), though a 2023 update found studies now look beyond code (Murillo et al., 2023).

Why teams incur debt Contested: studies disagree on this

Practitioners name deadline pressure as the most common cause, but repository data do not confirm it. In the InsighTD surveys deadline pressure is the single most cited cause, and planning and management problems form the largest category of answers (Ramač et al., 2021). The authors read deadlines, skipped good practices and inexperience as symptoms of deeper causes such as inappropriate planning (Ramač et al., 2021). About 92% of the causes practitioners cited concerned issues other than code (Berenguer et al., 2021).

Studies of code history give a mixed picture. In eight open-source projects, debt rose as deadlines approached in some and stayed flat in others, with no evidence that deadlines caused it (Edbert et al., 2025). An earlier study found that time pressure did not correlate with the amount of debt developers flagged in comments, and that more experienced developers introduced most of it (Potdar & Shihab, 2014). Laboratory findings on time pressure and software quality are inconclusive (Basten et al., 2021).

Existing debt appears to breed more. In a controlled experiment with 29 developers, those working in a system with high debt density were more likely to re-implement code rather than reuse it. They also chose non-descriptive names and added other code smells (Levén et al., 2024).

What debt costs

Estimates of debt’s cost are large, but they rest on self-report or on correlations.

Developers report losing about a quarter of their working time to debt. In a longitudinal survey of 43 developers, the mean was 23% of time wasted. The spread was wide: the median was 17.13%, and six respondents reported more than half (Besker et al., 2019a). A replication by the same research team found a mean of 28.51% per work item (Besker et al., 2019a). The authors note that the figures are developers’ own estimates (Besker et al., 2019a).

One study of code links low code quality to many more defects and slower work. In 39 proprietary codebases, files scored as low quality by CodeScene’s Code Health metric had 15 times more defects than high-quality files. Issues in them took on average 124% more development time to resolve (Tornhill & Borg, 2022). The authors state that causality is unclear, since defects might produce low-quality code rather than the reverse, and all codebases came from CodeScene’s users (Tornhill & Borg, 2022). A later reanalysis by authors from the same group found the association varies across quality levels (Borg et al., 2024).

An industrial case study that used a different measure found no consistent effect. Across six components, debt measured with the SonarQube tool had a moderate positive effect on lead time in two, none in two and a moderate negative effect in two. It explained 5% to 41% of the variance in lead time (Paudel et al., 2024). Practitioners in the InsighTD surveys name delivery delay, low maintainability and rework as the main effects (Ramač et al., 2021).

Evidence on morale is thin. In a study of 43 developers, only one correlation between wasted time and morale was significant. More wasted time went with feeling that debt hinders progress, a moderate link (Spearman correlation 0.453 on a scale from −1 to 1, p = 0.007) (Besker et al., 2020). The authors note the link could run the other way, with developers who feel less progress or morale estimating more waste (Besker et al., 2020).

Tools that measure debt disagree with each other, even on size, complexity and cycles (Lefever et al., 2021). How these tools work and which signals locate costly code are covered in Code quality metrics.

Deliberate debt in start-ups Weak evidence: few or small studies support this

Start-ups report taking on debt on purpose to reach the market sooner, but the payoff is perceived rather than measured. Extreme time pressure and uncertainty push start-up decisions toward the short term (Besker et al., 2018). In interviews in seven start-ups, teams weighed speed to market and saved resources against the later cost of addressing debt, aiming at a “good enough” level (Besker et al., 2018). Junior developers were more likely to add debt unintentionally (Besker et al., 2018).

The outcome data are associations from respondents’ own estimates. In a case survey of 86 start-ups, those still active estimated their debt lower than start-ups that had closed or been acquired (Klotins et al., 2018). Code debt had the strongest association with productivity and quality problems (Klotins et al., 2018). The YAGNI debate covers the related choice of building only for today’s needs.

Tracking, prioritising and repaying debt

Most teams manage debt without a system, even though it takes a large share of their time. In 15 large organisations, developers spent on average 25% of development time on managing debt, yet 26% used a tool and 7.2% tracked debt methodically (Martini et al., 2018). Teams prioritise debt reactively, often in a “shadow backlog” outside the main list of work (Besker et al., 2019b). Repayment competes with feature work and bug fixing, which often take priority (Lenarduzzi et al., 2020).

Research offers no agreed way to choose which debt to repay first. A review of 44 prioritisation studies found the field preliminary, with no consensus on which factors matter or how to measure them, and few validated tools (Lenarduzzi et al., 2020). Open-source developers who decide to repay debt want to do so soon; when they decide not to, it is often because they took it on intentionally (Pina et al., 2022).

Business versus technical priorities Weak evidence: few or small studies support this

Technical and business rankings of debt diverge, in a small number of case studies by one group. In one company, a purely technical prioritisation matched only 48.7% of business-criticality priorities and 35% of urgency expectations, and an approach based on business processes aligned them better (Almeida et al., 2018). A five-month study of one team by the same authors saw debt affecting high-value business assets trend downward; both papers say their results cannot be generalised (Almeida et al., 2018; Almeida et al., 2020). The 2025 manifesto notes that debt quantification has focused on costs to code and often neglected value, such as the financial impact of features (Avgeriou et al., 2025).

Does repayment pay off? Weak evidence: few or small studies support this

The direct evidence that repaying debt pays off comes from one uncontrolled case. In one start-up’s platform, after a refactoring guided by an analysis of architectural debt, the average time to close issues fell 72% and build time more than 83% (Nayebi et al., 2018). The authors limit the study to one company’s Java platform with four interviewees (Nayebi et al., 2018).

Studies of refactoring, the restructuring of code without changing its behaviour, suggest sustained effort matters more than single changes. In six large industrial systems, single refactorings made little difference to maintainability and sometimes lowered it, while a whole refactoring period significantly raised it (Szőke et al., 2017). A mapping of 142 studies found academic settings reported more benefit than industrial ones, and effects varied by quality attribute (Kaur & Singh, 2019).

Self-admitted technical debt

Self-admitted technical debt is debt that developers flag themselves, usually in code comments. It appears in 2.4% to 31% of files in four large open-source projects (Potdar & Shihab, 2014). Developers say they use these comments to track future bugs and code that needs improvement (Maldonado et al., 2017).

Studies disagree on how much flagged debt is removed, and some of the removal is accidental. In five open-source projects, most of it was removed, mostly by the developer who added it, after a median of roughly 18 to 172 days depending on the project (Maldonado et al., 2017). An earlier study found only 26.3% to 63.5% removed (Potdar & Shihab, 2014). Between 20% and 50% of removals happened by accident, when whole classes or methods were deleted (Zampetti et al., 2018).

Self-admitted debt and defects Weak evidence: few or small studies support this

Whether self-admitted debt signals defects depends on the level studied. Earlier file- and class-level studies found no clear link: results on defects were mixed by project, and the comments did not affect complexity metrics (Chowdhury et al., 2024). In 774,051 methods from 49 open-source projects, methods carrying such comments were larger, more complex, less readable and more prone to bugs and changes (Chowdhury et al., 2024).

Debt in machine-learning systems Weak evidence: few or small studies support this

The idea that machine-learning systems accumulate special debt comes from an argument, which later studies test through the debt developers flag in comments rather than through the patterns themselves. D. Sculley and colleagues argue these systems carry all the maintenance problems of ordinary code plus system-level ones specific to machine learning (Sculley et al., 2015). One is entanglement, stated as “Changing Anything Changes Everything”, and they estimate a mature system may be at most 5% machine-learning code and at least 95% glue code (Sculley et al., 2015).

Studies of code repositories find more flagged debt in machine-learning projects. Across 318 machine-learning and 318 other open-source projects, the median share of self-admitted debt in machine-learning projects was twice as high, concentrated in data preprocessing and model generation (Bhatia et al., 2024). A study of refactorings in 26 machine-learning projects added seven debt categories specific to machine learning (Tang et al., 2021).

Debt in AI-generated code

Studies disagree on whether AI coding assistants add technical debt. Observational studies of repositories report lasting rises in warnings and complexity, while a randomised experiment found no difference in how easily others later changed the code. The broader effects of these tools are covered in productivity of AI coding tools and AI coding agents.

Repository studies find persistent quality costs. GitHub projects that adopted the Cursor editor were compared with matched projects that did not. Their velocity rose sharply for a short time, while static-analysis warnings rose about 30% and code complexity about 41%, and stayed higher (He et al., 2025c). The authors note that unobserved factors such as developer expertise may remain despite the matching (He et al., 2025c). In 302.6k AI-authored commits, 89.3% of the issues introduced were code smells, and 22.7% of issues survived to the latest version (Liu et al., 2026g).

The experiment detected no maintainability cost or benefit. A preregistered two-phase experiment had 151 participants, 95% of them professionals. Developers who later changed code written with or without an AI assistant showed no significant difference in completion time or code quality (Borg et al., 2026). It ran in late 2024 on one Java feature task, before autonomous coding agents (Borg et al., 2026).

The two sides measure different things. The repository studies count warnings and complexity in real projects, identified through traces of AI use such as configuration files or co-author lines in commits (He et al., 2025c; Liu et al., 2026g). The experiment measured the time and code quality of developers who changed the code afterwards (Borg et al., 2026). The 2025 manifesto holds that debt must be managed however code is created, including by AI (Avgeriou et al., 2025).

Further reading

  • Cunningham (1992): the short experience report that introduced the debt image.
  • Fowler (2009): the prudent/reckless and deliberate/inadvertent quadrant, and the argument that whether a flaw counts as debt is the wrong question.
  • Avgeriou et al. (2025): the 2025 Dagstuhl manifesto, which keeps the consensus definition and sets out principles for managing debt.
  • Ramač et al. (2021): the InsighTD survey family on how common debt is, its types, causes and effects.
  • Besker et al. (2019a): the source of the self-reported lost-time figures.
  • Sculley et al. (2015): the position paper on hidden debt in machine-learning systems.

Known gaps

What this article cannot tell you yet.

  1. No study measures the developer time lost to technical debt from logs or observation; the figures rest on developers’ own estimates.
  2. No evaluation of dedicated repayment time or debt sprints was found, and the architectural-debt repayment result has not been repeated in another company.
  3. No study weighs the speed gained by taking on debt deliberately against the later cost of reworking it.
  4. Which type of technical debt costs most was not found.
  5. The machine-learning debt patterns of Sculley and colleagues, such as entanglement and hidden feedback loops, have not been measured directly in real systems.
  6. No survey asks practitioners directly whether they count bugs or missing features as debt.
  7. The full text of the 2015 survey of 1,831 practitioners by Ernst and colleagues and the 2016 Dagstuhl seminar report were not read; their content here comes from the authors’ summaries and later papers.
  8. Replications of the InsighTD cause surveys in further countries and how developers use the term on Stack Overflow were not researched.

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 61 references