The short answer: technical debt is the cost of the shortcuts already inside your software — unclear code, missing tests, old dependencies, undocumented decisions — that you pay again on every future change. It is not a moral failing and not always bad: some debt buys speed you needed. It becomes a problem when nobody tracks it, because untracked debt compounds until a routine change takes three weeks.
The useful question is not "is there debt?" Every system older than a year has some. It is "what is it costing per month, and what would it cost to stop paying?"
What counts as technical debt, and what is just a bug
A bug is behaviour that is wrong right now. Debt is a structure that makes correct behaviour harder to change later. Bugs get fixed from a support budget while debt is deferred forever — so a slow codebase is often treated as a bug nobody can reproduce.
- Code debt. One 900-line function that calculates pricing, tax and discounts together. Nothing is broken, but every pricing change means reading all of it.
- Test debt. Nothing automated near the payment path, so every release is verified by someone clicking through with a real card.
- Dependency debt. A framework two major versions behind, because each upgrade risks breaking code with no tests. This is the debt that becomes an emergency when a security advisory lands.
- Knowledge debt. One person knows how the nightly import works. That is not a documentation annoyance; it is a single point of failure with a resignation date.
Not all debt is the same: the four-quadrant view
Debt is best judged on two axes: did we take it on purpose, and was that sensible at the time. The framing is usually credited to Martin Fowler's technical debt quadrant, and its four cells call for four responses.
| Quadrant | Looks like | What to do |
|---|---|---|
| Deliberate and prudent | "Ship invoicing single-currency; six customers, one currency." | Record the condition that retires it. |
| Deliberate and reckless | "No tests, we'll move fast." | Cover that area before the next feature touches it. |
| Inadvertent and prudent | You could not know the payment provider would change its API. | Refactor when the area is next opened for real work. |
| Inadvertent and reckless | Nobody noticed the reporting query scanning a whole table. | Fix on discovery; it quietly sets your performance ceiling. |
Where the cost actually shows up
Debt is paid in four places, each measurable without reading code. If you cannot point to a symptom, the debt is theoretical: keep it on the list, not on the plan.
| Symptom | What it looks like | How to measure it |
|---|---|---|
| Slower changes | A small feature eats a quarter of the sprint. | Days taken by the last ten tickets in one area. |
| Regression rate | Each release fixes one thing and breaks another. | Tickets reopened within two weeks, or hotfixes per release. |
| Onboarding cost | Months before a new developer can change anything safely. | Time to first production change, and reviews that change needed. |
| Incident load | The same outage returns under a different cause. | Incidents grouped by subsystem over two quarters. |
How to measure debt without commissioning an audit
Five signals, all available from a project tracker and a dependency report, give a usable picture in a day:
- Hotspots. The ten files that change most often. Constantly changing, hard-to-read code charges the most interest, because interest is per change.
- Dependency age. How many packages are more than one major version behind, and which sit in the payment or login path.
- Coverage on critical paths. High overall coverage means little; coverage on money and identity means everything.
- Deploy duration. If a release needs a manual checklist and a two-hour window, the pipeline is debt too.
- Escaped defects. Bugs customers found before the team did — a direct reading of how much you are trusting luck.
How to budget for it
Budget debt as a standing share of delivery capacity, not as a project. Projects need a business case, a start and an end; debt work has none of those, which is why funding it as a project means it never gets funded. Pick the share from what the debt costs, then hold it — many teams land between one day a week and one sprint in six.
- Tie every item to a roadmap item. "Refactor the pricing module" is unfundable. "Make adding a pricing tier a two-day job before the Q2 launch" is fundable.
- Write the exit condition first. A measurable end state — deploys back under fifteen minutes, coverage on the payment path — stops debt work becoming an open-ended rewrite.
- Report the interest, not the principal. A monthly line on days lost, incidents and delayed features survives a budget review. A list of code smells does not.
When to pay down debt and when to leave it
Most debt should be left alone. Pay it when it is charging interest on work you are about to do; leave it when it is not.
- Pay now: the debt sits under the next three roadmap items, or a security advisory makes an old dependency urgent.
- Pay as you go: the area is open for a feature anyway. Clean the file you are editing, not the one next door.
- Leave it: the module is stable, rarely touched and due for replacement. Refactoring code scheduled for retirement is the most expensive way to do nothing.
- Rebuild instead: when the cost of change is structural — the data model cannot represent what the business now needs. That is a separate decision, covered in whether to refactor, rebuild or replace legacy software.
Putting debt in writing
Debt is only managed when it appears in the documents that govern the work. A statement of work should name the technical baseline it builds on and what it will not fix. A maintenance retainer should state the capacity reserved for it and whether dependency upgrades count as maintenance or as a change request.
Keep a register of ten to twenty entries, each with the symptom it causes, the roadmap item it threatens and an estimate. Review it monthly. Anything that has caused no measurable cost in a year is a preference, not debt.
Frequently asked questions
How much technical debt is normal?
Every system in production for more than a year carries some. The amount matters less than whether it is tracked and whether change speed is stable. Debt that is known, dated and attached to a decision is normal; debt found during an incident is a warning sign.
Can you measure technical debt in money?
Partly. You can cost the days lost to slow changes, hours spent on repeat incidents and launch delay, at your own rates. You cannot produce one honest figure for a whole codebase, and a vendor offering one is selling a model, not a measurement.
Does rewriting the software clear the debt?
No. A rewrite trades old debt for new debt and usually adds a period where both systems must be maintained. It is right when the structure cannot represent what the business needs, and wrong when the code is merely untidy.
How do we stop new debt accumulating?
Definition of done and review, not policy documents. A change that ships without a test on a critical path, or with a dependency left behind on purpose, is debt from the moment it is approved — review it alongside the old entries.