Skip to content

How to Estimate and Reduce Technical Debt in an Existing Product

A practical method for finding technical debt through real work, estimating its delivery and operational cost, and reducing it without pausing product development.

Technical debt is not old code. It is a known design or delivery compromise that makes future change, reliability, security, or support more expensive. Treat it as a product risk with evidence, not a moral judgement about whoever wrote the original implementation. Most debt was a reasonable decision under the constraints of its time.

When I review an existing product, the useful question is not “how much debt is there?” Every system has debt. The useful questions are: which debt is costing us now, which debt blocks what we want to build next, and what is the smallest change that reduces that cost? This article is a method for answering those questions and turning the answers into work that ships alongside product features.

Separate debt from preference

Engineers new to a codebase often label everything unfamiliar as debt. That produces a long list that the business cannot prioritize and does not trust.

Looks like debtIs it debt?Test
Older framework versionOnly if it blocks security updates, hiring, or required featuresWhat breaks or becomes impossible if we stay?
Inconsistent code styleRarelyDoes it cause bugs or slow reviews measurably?
Missing tests on a stable moduleSometimesDoes anyone need to change this module soon?
Duplicated authorization checksUsuallyHave the copies already drifted apart?
Manual deployment stepsUsuallyHow often do releases fail or wait on one person?
Imports that cannot be retried safelyYesWhat happens when one times out halfway?

A useful debt item names a cost. “The backend is messy” does not. “Membership checks are duplicated in six endpoints, and two of them already allow a removed member to read project data” does.

Find debt through real work

Do not start with a code-quality scan. Start where the product already hurts:

  • Incidents. What failed in production recently, and what made it hard to detect or fix?
  • Slow features. Which recent features took much longer than expected, and why?
  • Recurring support issues. Which problems are fixed by hand, again and again?
  • Manual repairs. Which database corrections, scripts, or re-runs happen regularly?
  • Failed or delayed releases. Which steps break, need a specific person, or require downtime?
  • Onboarding friction. What does every new engineer get stuck on?

For each painful area, trace one real request path through the code: the route, the authorization decision, the business logic, the data writes, the jobs, and the integrations. Debt becomes concrete when you can point at the exact step where change becomes expensive.

Record each item with:

  • Symptom: what people experience.
  • Root constraint: the design or delivery compromise underneath.
  • Affected capability: which product area or team it slows down.
  • Evidence: incidents, support tickets, review comments, cycle time on related changes, or code-path coupling.
  • Owner: who can decide whether to address it.

If you have just inherited the product, the 30-day existing-codebase checklist gives a structured way to collect this evidence before prioritizing anything.

Estimate impact, not just effort

Most debt estimates only answer “how long will the fix take?” That is half of the decision. The other half is “what does it cost to leave it?”

Score each item on a simple scale, such as 1 to 3, for:

FactorQuestion
User impactIf this fails, do users lose data, access, money, or time?
LikelihoodHow often does the problem actually occur or nearly occur?
Cost of delayDoes it get more expensive the longer we wait, for example as data grows?
Security or data riskCould it expose data or corrupt durable state?
Roadmap frictionHow much planned work touches this area?
Fix effortWhat is the smallest safe intervention?

Keep the scoring rough. Its purpose is to make tradeoffs visible in a conversation with product owners, not to produce false precision. A spreadsheet with ten well-evidenced items is more useful than a tool report with hundreds of warnings.

Three kinds of response

After scoring, each item usually falls into one of three groups:

  1. Urgent guardrail. High security, data, or user impact. Add a constraint, a test, a monitor, or a permission check now, even if the deeper redesign waits.
  2. Pay down with the next feature. The area is on the roadmap. Include the cleanup in the feature estimate, because changing it without the cleanup will be slower anyway.
  3. Document and accept. Low impact, stable code, no planned work. Write down the tradeoff and move on.

The third group matters. Accepting debt deliberately is a legitimate decision. A short architecture decision record explaining why a known compromise stays in place saves the next engineer from rediscovering and re-debating it.

Pay it down incrementally

Large cleanup projects compete with product work and often lose. Incremental pay-down survives because it ships value continuously.

A sequence that works for most debt:

  1. Characterize current behavior. Add tests or monitoring around what the code does today, including the odd cases users depend on.
  2. Create a narrow boundary. Introduce one interface, module, or compatibility layer that new code uses instead of the tangled path.
  3. Move one caller or data path at a time. Each move is a small, reviewable, reversible change.
  4. Measure the new path. Confirm errors, latency, and behavior match or improve.
  5. Remove the old path. Delete dead code only after usage has reached zero and the team is confident.
flowchart LR
  accTitle: Incremental technical debt reduction loop
  accDescr: The team finds debt through incidents and slow features, scores impact and effort, chooses a response, then characterizes behavior, adds a boundary, moves callers one at a time, measures, and removes the old path. Learning feeds back into finding the next item.
  F["Find debt in real work"] --> S["Score impact and effort"]
  S --> R{"Response"}
  R -->|"Guardrail"| G["Test, constraint, or monitor"]
  R -->|"With next feature"| C["Characterize behavior"]
  R -->|"Accept"| D["Document the tradeoff"]
  C --> B["Add a narrow boundary"]
  B --> M["Move callers one at a time"]
  M --> V["Measure the new path"]
  V --> X["Remove the old path"]
  X -.-> F
  G -.-> F

This approach is often called the strangler pattern when applied to whole systems, but it works just as well at the scale of one module or one table.

Common debt patterns and first moves

PatternTypical symptomFirst safe move
Duplicated business rulesTwo screens show different results for the same ruleExtract one function or service method and route one caller through it
Authorization scattered across the UIHidden buttons, but the API still accepts the actionAdd a server-side policy check and an API test for the forbidden case
No database constraintsDuplicate or orphaned records found by supportClean existing data, then add the unique or foreign key constraint
Fragile deploymentReleases need one specific person or manual stepsScript the steps and run them in CI, keeping the manual runbook as backup
Unsafe imports and jobsRe-running a failed import creates duplicatesAdd an idempotency key or source-row constraint before changing the job logic
Missing observabilityIncidents are reported by customers firstAdd structured logs and one alert on the critical path

Notice that the first move is usually small. Each one reduces risk immediately and makes the larger change safer.

When a larger restructuring is justified

Sometimes incremental work is not enough. A capability may need a separate deployment, a different scaling profile, or a stricter security boundary. Before splitting anything out, read how to choose between a monolith and microservices; extracting a service to escape debt often moves the debt into a network boundary.

Consider a rewrite only when evidence shows that incremental migration cannot meet a required constraint, and compare both options against:

  • the product changes that must ship during the transition;
  • data migration complexity and historical data;
  • the time both systems must run in parallel;
  • the team’s capacity to support both;
  • rollback and customer transition requirements.

A rewrite does not remove domain complexity. It re-implements it, usually while the original system still needs fixes.

Make debt work visible to the business

Debt reduction survives when stakeholders can see what it bought. Report it in product terms:

  • “Imports can now be retried safely; the manual cleanup task is gone.”
  • “Permission checks now run on the server for all project endpoints.”
  • “Releases no longer require downtime or a specific engineer.”

Avoid reporting it as “refactored the service layer.” That is an activity, not an outcome.

A periodic full-stack architecture review is a good point to revisit the debt register, close items that were resolved, and re-score items whose context has changed.

Technical debt reduction checklist

  • Debt items name a symptom, root constraint, affected capability, and evidence.
  • Style preferences are separated from items with measurable cost.
  • Each item is scored for impact, likelihood, cost of delay, risk, roadmap friction, and effort.
  • High-risk items have an immediate guardrail.
  • Debt in areas on the roadmap is included in feature estimates.
  • Accepted debt is documented with its reason.
  • Pay-down happens behind a boundary, one caller or data path at a time.
  • Old paths are removed only after measurement shows they are unused.
  • Results are reported as product outcomes.
  • The debt register is reviewed and re-scored periodically.

Reducing technical debt is not a separate phase of the product. It is part of making each next change cheaper and safer than the last one.

Frequently asked questions

What counts as technical debt?

Technical debt is a known design or delivery compromise that makes future change, reliability, security, or support more expensive. Old code, unfamiliar style, or an older framework is not debt by itself unless it creates a measurable cost or risk.

How do you estimate technical debt?

Estimate the cost of keeping it as well as the cost of fixing it. Score each item on user impact, likelihood, cost of delay, security or data risk, and how much planned work it blocks. Then estimate the smallest safe intervention rather than a complete cleanup.

How much time should a team spend reducing technical debt?

There is no universal percentage. Tie debt work to the product roadmap: pay down debt in the areas the next features will touch, add guardrails for high-risk items immediately, and leave stable, rarely changed code alone unless it creates a security or data risk.

Should we rewrite the product to remove technical debt?

Usually not as a first step. A rewrite moves domain complexity, data, and integrations into a second implementation while the first still needs support. Prefer incremental migration behind a boundary, and reserve rewrites for cases where evidence shows the current system cannot meet a required constraint.

[NL] Newsletter

Practical notes for building work that lasts.

Occasional field notes on product engineering, architecture, and delivery. No recycled growth hacks.

Start with the free production readiness checklist

Check your inbox to confirm your subscription.

Processed by Brevo