Work out technical debt ratio instantly with clear inputs, formula shown and shareable results.
The technical debt ratio divides remediation cost by the cost of building the system, which is how SonarQube derives its maintainability rating: 5 percent or less is an A, and above 50 percent an E. Expressing the same debt per thousand lines makes it comparable across codebases of different sizes and highlights which modules are disproportionately bad.
Technical debt ratio
TDR = remediation cost / development cost; grades at 5%, 10%, 20% and 50%
It is a proxy. Static analysis remediation estimates are crude and miss architectural debt entirely, so use it as a trend line rather than an absolute figure.
Debt in code you change often. Debt in stable, rarely touched modules costs nothing until you touch them, so weight by change frequency.