Estimate the time to refactor code and backfill tests.
Refactoring time scales with the code size, and any lines lacking test coverage add time to write the missing tests. Tech debt is only 'cheap' before it accrues; estimating the refactoring and test cost makes the investment concrete and comparable.
Refactoring Effort
Hours = lines/100 x minutes / 60 + uncovered lines x 0.5 min / 60
Hours = lines/100 x minutes / 60 + uncovered lines x 0.5 min / 60 Refactoring time scales with the code size, and any lines lacking test coverage add time to write the missing tests.
Tech debt is only 'cheap' before it accrues; estimating the refactoring and test cost makes the investment concrete and comparable.
This calculator takes 3 inputs: Lines of code, Minutes per 100 lines, Test coverage. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.