Skip to main content
All posts
Software Engineering7 min read

Technical Debt Quantification: How to Put a Euro Amount on Your Legacy Code

A practical framework for quantifying technical debt in euros — turning vague complaints about code quality into board-ready investment cases for refactoring.

Published

Every engineering team knows they have technical debt. Few can answer the question a CFO actually cares about: "How much is this costing us per year, and what is the ROI of fixing it?"

Vague statements like "the code is hard to maintain" do not unlock budget. A statement like "technical debt in the payments module costs us EUR 340,000 annually in slower delivery and incident recovery — a EUR 200,000 refactoring investment pays back in 7 months" does.

This post provides a practical framework for putting a euro amount on technical debt and building a business case that survives scrutiny.

Why Quantification Matters

Technical debt is not inherently bad. Taking on debt to ship faster is a valid business decision — just like financial debt. The problem is unmanaged debt: accumulated without awareness, never measured, and never paid down.

Quantification serves three purposes:

  1. Investment prioritisation — Limited refactoring budget goes where the ROI is highest
  2. Communication with business stakeholders — Finance and executive teams understand euros, not code smells
  3. Trend tracking — Is debt growing or shrinking? Are we accumulating faster than we are paying down?

The Three Cost Categories

Category 1: Velocity Tax (Direct Cost)

The daily cost of working around technical debt.

How to measure:

Loading diagram...

Concrete metrics:

  • Sprint overhead — What percentage of sprint capacity goes to maintenance vs. new features? Track over 6 sprints. If 35% goes to maintenance and your target is 15%, the 20% gap is your velocity tax.
  • Cycle time inflation — Compare cycle time (commit to production) for changes in high-debt areas vs. clean areas. The delta times the number of changes per quarter gives you hours lost.
  • Onboarding time — If new developers take 4 months to become productive instead of 6 weeks, the extra 2.5 months × fully-loaded cost is debt-driven.

Example calculation:

MetricValue
Team size8 developers
Blended annual cost per developerEUR 95,000
Sprint capacity lost to debt (above target)20%
Annual velocity tax8 × EUR 95,000 × 0.20 = EUR 152,000

Category 2: Opportunity Cost (Indirect Cost)

Revenue or market position lost because debt slows feature delivery.

How to measure:

This is harder but not impossible:

  • Delayed feature revenue — If a feature expected to generate EUR 500K/year is delayed 3 months by debt, the opportunity cost is EUR 125,000
  • Lost competitive deals — If sales reports losing deals due to missing features that were delayed by engineering constraints, quantify at average deal value
  • Customer churn from quality issues — If debt causes bugs that drive churn, assign the revenue impact

Approach: Work with product management to identify the top 3 features delayed by technical constraints. Estimate revenue impact of the delay. Even conservative estimates create compelling numbers.

Category 3: Risk Cost (Probabilistic Cost)

The expected cost of debt-related incidents and failures.

How to measure:

Loading diagram...
RiskProbabilityImpactAnnual frequencyExpected annual cost
Payment processing outage15%EUR 50,0004 triggers/yearEUR 30,000
Data corruption from race condition5%EUR 200,0002 triggers/yearEUR 20,000
Security breach via unpatched dependency3%EUR 500,0001 trigger/yearEUR 15,000
Total risk costEUR 65,000

Pull incident data from your ITSM system. Map incidents to code areas. High-debt areas with recurring incidents have quantifiable risk.

Building the Business Case

The One-Pager Format

Loading diagram...

Payback period: 10 months | Three-year ROI: 254%

Making It Credible

  1. Use ranges, not point estimates — "EUR 300K–450K annual cost" is more credible than "EUR 372,412"
  2. Cite specific incidents — "The March outage that cost EUR 47,000 was caused by the exact coupling this refactoring addresses"
  3. Show the trend — "Maintenance percentage has grown from 20% to 35% over 18 months. Without intervention, we project 45% by year-end"
  4. Benchmark externally — DORA metrics provide industry benchmarks for deployment frequency and change failure rate

The Debt Quadrant: Prioritising What to Fix

Not all debt is equal. Use Ward Cunningham's debt quadrant:

DeliberateInadvertent
Prudent"We know this is coupled, but shipping now and refactoring next quarter is the right trade-off""Now we understand the domain better, we see that these should be separate modules"
Reckless"We don't have time for tests""What is a design pattern?"

Priority order:

  1. Reckless deliberate — This is where incidents live. Fix first.
  2. Prudent deliberate — Pay down on schedule. These have known fix plans.
  3. Prudent inadvertent — Address when you touch the area. Natural part of learning.
  4. Reckless inadvertent — Often requires team capability investment, not just refactoring.

Tools for Continuous Measurement

SonarQube Technical Debt Rating

SonarQube calculates a "technical debt" metric based on the estimated time to fix all code smells. While imperfect (it measures code-level issues, not architectural debt), it provides a continuous trend line.

Convert to euros: SonarQube debt days × daily developer cost = EUR technical debt

Custom Metrics Dashboard

Track quarterly:

  • Deployment frequency (target: daily or weekly)
  • Change failure rate (target: < 15%)
  • Mean time to recovery (target: < 1 hour)
  • Maintenance percentage of sprint capacity
  • Incident count by code area
  • New developer time-to-productivity

Architecture Fitness Functions

Automated tests that verify architectural properties:

Csharp
[Fact]
public void Cyclomatic_Complexity_Should_Not_Exceed_Threshold()
{
    var violations = GetAllMethods()
        .Where(m => m.CyclomaticComplexity > 15)
        .ToList();

    violations.Should().BeEmpty(
        $"Found {violations.Count} methods exceeding complexity threshold");
}

Communicating with Non-Technical Stakeholders

Do not say: "Our codebase has high cyclomatic complexity and tight coupling between modules."

Do say: "Every new feature takes 40% longer than it should because of accumulated shortcuts. This costs us EUR 150,000 per year in developer time and delays revenue-generating features by 2-3 months."

Do not say: "We need to refactor the payment service."

Do say: "A EUR 80,000 investment in the payment module eliminates the root cause of last quarter's three outages and accelerates the subscription billing feature by 6 weeks."

Translate every technical statement into business impact: euros, time, risk, or competitive position.

Loading diagram...

A Pragmatic Approach

Not all technical debt needs to be paid. Some debt is cheap to carry — it exists in stable, rarely-changed code and causes no incidents. Focus measurement and remediation on:

  1. Hot spots — Code changed frequently that also has high complexity
  2. Critical paths — Components in the revenue-generating flow
  3. Planned feature areas — Debt that blocks the next quarter's roadmap
  4. Incident-prone areas — Where debt has already caused production failures

The goal is not zero debt. The goal is managed debt with a known cost and a conscious decision about what to pay and what to carry.


Need help quantifying your technical debt and building the business case for refactoring? Contact us — we help engineering teams communicate architectural investment in language that unlocks budget.

Topics

technical debt quantificationlegacy code costrefactoring business casesoftware maintainabilityengineering productivity metrics

Frequently Asked Questions

Measure the velocity tax (time spent on workarounds, longer onboarding, incident resolution), the opportunity cost (features not shipped due to slow delivery), and the risk cost (probability × impact of debt-related outages). Sum these to get an annual EUR figure that justifies refactoring investment.

Expert engagement

Need expert guidance?

Our team specializes in cloud architecture, security, AI platforms, and DevSecOps. Let's discuss how we can help your organization.

Get in touchNo commitment · No sales pressure

Related articles

All posts