Technical DebtOct 24, 2024
Technical Debt in Agile and Scrum: How to Manage It
What technical debt means in Agile and Scrum, who owns it, how much sprint capacity to budget, and 8 practices that keep debt visible and paid without a debt sprint.
Hire
Hire by role
Hire Front-end developers
Hire Back-end developers
Hire Full-stack developers
Hire Android developers
Hire iOS developers
Hire Mobile developers
Hire AI engineers
Hire by skill
Hire JavaScript developers
Hire React Native developers
Hire React.js developers
Hire .NET developers
Hire TypeScript developers
Hire Flutter developers
Hire Golang developers
Hire by country
Devs in Ukraine
Expirienced engineers with strong product focus and fast integration.
Devs in Poland
EU-based developers with reliable delivery and high standards.
Devs in Argentina
Senior engineers with strong technical depth and timezone alignment.
You measure technical debt by combining three kinds of data: code-level metrics from static analysis, delivery metrics from your engineering workflow, and the share of engineering time that goes to maintenance instead of new work.
No single number captures it. The technical debt ratio tells you how much it would cost to fix the code relative to building it; cycle time and change failure rate tell you how much the debt slows you down; and maintenance share tells you what it costs in people. Tracked together over time, these metrics show whether debt is growing or shrinking and where to pay it down first.
This guide explains the eight metrics that matter, how to turn them into KPIs leadership will act on, how to run a technical debt assessment, and which tools to use.
Technical debt that is not measured is not managed. It gets paid down only when something breaks, and it never gets budget because nobody can show what it costs. McKinsey compared technical debt to dark matter: everyone knows it is there, but few can see or size it.
In its survey, 30% of CIOs at high-revenue companies said more than 20% of their budget for new products was being diverted to resolving technical debt. CISQ estimated the cost of poor software quality in the US at USD 2.41 trillion in 2022, with accumulated technical debt as the largest component. Measuring debt turns these abstractions into numbers you can prioritize and defend. For what technical debt is and why it accumulates, see our guide to what technical debt is and how it affects your business.
A good measurement system uses one or two metrics from each level and tracks them per release or per quarter.
The technical debt ratio (TDR) is the estimated cost of fixing code quality issues divided by the estimated cost of developing the code, expressed as a percentage.
TDR = remediation cost ÷ development cost × 100
SonarQube, the most common tool for this metric, calculates remediation cost by assigning an effort in minutes to each detected issue, and development cost as a fixed cost per line of code, 30 minutes by default, multiplied by the number of lines. Its default maintainability rating bands are:
How to use it: TDR is best as a trend and a comparison between modules, not as an absolute truth. The thresholds depend on the rule set and the per-line cost model, and the metric ignores architecture, infrastructure, and documentation debt. A rating of A on a system with a poorly chosen architecture tells you little. Still, a rising TDR on the modules that change most often is a reliable warning sign.
Code quality metrics measure how hard code is to understand and change: cyclomatic and cognitive complexity, duplication, function and file size, and the density of code smells.
These are the raw materials of the debt ratio, and they are worth tracking on their own because they point to specific files. CodeScene's Code Health metric combines them into a single score per file, and its research on 39 production codebases, published at the 2022 International Conference on Technical Debt, found that changes to unhealthy code took more than twice as long on average as changes to healthy code and carried up to 15 times more defects.
How to use it: set thresholds in CI so that new code cannot make the numbers worse, and target the worst files that also change often. Perfectly refactoring code nobody touches is wasted effort.
Test coverage is the share of code executed by automated tests. Low coverage is test debt: every change in uncovered code is a change you cannot verify quickly, which slows delivery and raises the risk of regressions.
How to use it: coverage is a floor, not a goal. 100% coverage of trivial code proves nothing, and 60% coverage that includes every critical path can be enough. Track coverage on new code separately, so the team stops adding untested code even before the backlog is cleaned up, and pair the number with the flaky test rate, which is a debt metric of its own.
Dependency debt is measured by how far your libraries, frameworks, and runtimes are behind their current versions, and how many known vulnerabilities they carry.
This is the form of debt most likely to become a security incident. The 2017 Equifax breach, which exposed the data of about 147 million people and cost the company more than USD 700 million in settlements, came from a known vulnerability in a web framework that had a patch available for months.
How to use it: track the number of dependencies more than one major version behind, the number of unsupported runtimes, and open critical and high vulnerabilities. Automated tools such as Dependabot, Renovate, Snyk, or Mend report all three continuously.
Code churn measures how often files change; hotspots are files that change often and have low code health.
High churn in a module is not debt by itself. High churn combined with high complexity is, because it means the team keeps paying interest on the same code. Hotspot analysis combines version control history with code quality to find the handful of files where most of the cost is concentrated.
How to use it: sort files by churn multiplied by complexity. In most systems, a small number of files account for most of the pain. Those are where refactoring pays back fastest.
Delivery metrics show how technical debt slows the team down: cycle time, lead time for changes, deployment frequency, change failure rate, and time to restore service.
The four DORA metrics were designed to measure delivery performance, and technical debt is one of the main things that degrades them. A system with heavy debt has longer lead times because changes touch more code, a higher change failure rate because of hidden coupling, and slower recovery because of poor observability. The DORA team's 2025 research also tracks rework rate, the share of deployments that are unplanned fixes for earlier deployments, which is a direct measure of interest paid on debt.
How to use it: track these per team and per service, and look for the services where lead time and change failure rate are worst. Those usually map to the highest-debt parts of the system.
New bugs versus closed bugs shows whether quality is improving or decaying; escaped defects count the bugs found in production rather than before release.
If bugs are opened faster than they are closed quarter after quarter, the team is losing to debt. If the share of defects found in production rises, test and review debt is growing.
How to use it: track the ratio of new to closed bugs per sprint and the number of escaped defects per release, and break them down by module. A module with rising escaped defects is a candidate for both refactoring and test investment.
The maintenance share is the percentage of engineering time spent on bug fixes, workarounds, upgrades, and firefighting rather than new features. It is the metric that translates debt into money, because engineering time has a cost.
Stripe's Developer Coefficient study found developers spending about 42% of their week on maintenance and bad code. If your team of 20 engineers spends 40% of its time on maintenance at a fully loaded cost of USD 150,000 per engineer, debt costs about USD 1.2 million a year. That is a number a CFO understands.
How to use it: tag work in your issue tracker as feature, maintenance, or debt reduction, and report the split quarterly. Our financial analysis of the cost of technical debt shows how to build the full calculation.
Two people-side metrics are worth tracking. Code ownership shows which modules have a clear owner and which have none; unowned code accumulates debt fastest. The bus factor is the number of people who would have to leave before a module becomes unmaintainable. A bus factor of one on a critical service is knowledge debt, and it belongs in your register alongside code debt.
Engineers need the detailed metrics above. Leadership needs a handful of KPIs that connect debt to delivery and cost. A practical set:
Present these as trends, not snapshots, and attach a business consequence to each: a slower lead time means a later launch; a higher change failure rate means more incidents. Our guide on how to communicate technical debt to non-technical stakeholders covers the framing.
A technical debt assessment is a structured snapshot of the debt in a system, usually done before a modernization decision, a funding request, or an acquisition. The steps:
An internal team can do this in a few weeks. An external assessment adds an independent view and benchmarks from other systems, which helps when the result has to convince leadership. Devico's technical debt management services start with exactly this kind of assessment.
No single tool covers all three levels. A typical setup is SonarQube or CodeScene for code, dependency scanning in CI, and delivery analytics from your existing workflow tools.
Measure code-level metrics on every build, so that quality gates stop new debt. Review delivery metrics monthly. Report the leadership KPIs per release or per quarter, and re-run a full assessment once a year or before major decisions. Measuring per release is the most useful cadence for tracking debt over time, because it ties each change in the numbers to a known set of changes in the code. Our article on strategic technical debt management covers how to turn the measurements into a reduction plan.
Technical debt becomes manageable the moment it becomes measurable. Start with the technical debt ratio and code health from static analysis, add cycle time and change failure rate from your delivery data, and track the share of engineering time that goes to maintenance. Report a handful of these as trends to leadership, tie them to business outcomes, and use hotspot analysis to decide where to pay debt down first. The numbers will never be perfect, but a consistent set of imperfect numbers beats an accurate feeling that something is wrong.
Combine code-level metrics from static analysis (technical debt ratio, complexity, duplication, test coverage, dependency age), delivery metrics (cycle time, change failure rate, escaped defects), and the share of engineering time spent on maintenance. Track them per release or per quarter and compare modules to find where debt is concentrated.
The technical debt ratio is the estimated cost of fixing code quality issues divided by the estimated cost of developing the code, as a percentage. In SonarQube's default scale, a ratio under 5% earns an A rating, 5–10% a B, 10–20% a C, 20–50% a D, and over 50% an E.
The most useful are the technical debt ratio, code complexity and duplication, test coverage, dependency age and vulnerabilities, code churn in hotspots, cycle time and change failure rate, new versus closed bugs, and the maintenance share of engineering time. Use a mix of code, delivery, and business metrics rather than any one of them.
Maintenance share of engineering time, technical debt ratio on core services, change failure and rework rate, lead time for changes, open critical vulnerabilities, and debt items closed versus opened. Report them as trends and tie each to a business outcome such as launch dates or incidents.
Multiply the share of engineering time spent on maintenance by the fully loaded cost of the team, then add the cost of incidents and delayed features. For example, 40% maintenance time on a team of 20 engineers at USD 150,000 each is about USD 1.2 million a year.
A structured snapshot of the debt in a system: static analysis, delivery data, and team interviews combined into a prioritized register with estimated remediation effort and business impact. It is usually done before a modernization decision, a funding request, or an acquisition, either by the internal team or by an external partner for an independent view.
Still have a question?
Talk to us