Every engineering leader knows their tech debt is expensive. Very few can turn that feeling into a number their finance team will accept. This guide is the playbook I wish I had walked into my first budget meeting carrying.
Why a score isn't enough
SonarQube will give you a score. Code Climate will give you a letter grade. Codacy will give you a percentage. None of these translate into a euro figure, which means none of them are usable in a forecast or a budget discussion.
The CFO's mental model is simple: does this cost money? Show me the line item. Anything that isn't a line item is background noise.
The job of this guide is to give you three numbers, in euros, that you can put on a slide and defend.
The baseline assumption
Every cost calculation starts with the fully-loaded daily cost of a software engineer. This is not the gross salary — it includes employer social charges, equipment, tooling licences, office/remote allowance, management overhead, and a fair share of corporate indirects.
A reasonable European average is €450 per day. Adjust for your geography:
- €250–€350 in Warsaw, Bucharest, Lisbon
- €400–€550 in Paris, Brussels, Berlin
- €600–€900 in Zurich, London, Dublin
A team of ten engineers working twenty billable days a month has a monthly engineering cost of roughly €90,000. That's the denominator. The question is: what fraction is being spent on debt?
Cost dimension 1: Firefighting
Firefighting is the time your team spends reacting to defects instead of building features. It's directly measurable from your commit history.
Formula:
Firefighting cost = developers × daily_rate × working_days × bug_fix_ratio
How to compute bug_fix_ratio: look at the last three months of commits and classify each as one of feature, bug fix, refactor, chore based on commit-message prefixes. fix:, bugfix:, hotfix:, and similar patterns count as bug fixes. The ratio is the share of total commits.
A healthy team lands between 10% and 18%. A firefighting team sits above 25%. If you're at 40%, you're not shipping — you're maintaining.
Worked example: 10 developers × €450/day × 20 days × 22% bug ratio = €19,800/month, or €237k/year of firefighting.
Cost dimension 2: Debt servicing
Debt servicing is the time spent maintaining the debt without reducing it: config churn, superficial refactoring, dependency upgrades that don't change the architecture, workaround code that adds complexity. It's real work — it ships — but it does not move the product forward.
Formula:
Debt servicing = developers × daily_rate × working_days × non_feature_ratio
where non_feature_ratio = max(0, 1 − feature_ratio − bug_fix_ratio)
Classify your commits the same way as for firefighting. Everything that isn't a clear feat: counts as non-feature.
For most teams, debt servicing is 15%–30% of capacity. If yours is above 35%, you have an architectural problem that cleanup alone won't solve.
Cost dimension 3: Recovery investment
Recovery investment is the one-time cost to actually clean up. Unlike the first two, it is not recurring — it's a budget you approve once, spend over a quarter or two, and then reap the returns from for years.
Formula:
Recovery = critical_hotspots × 2 days × daily_rate
+ knowledge_silos × 1 day × daily_rate
+ dead_files × 0.5 hours × (daily_rate / 8)
The coefficients are estimates — adjust them to your context. A hotspot in a payment gateway is not the same as a hotspot in a config file. A silo held by your founding engineer is not the same as a silo in a utility module.
For a mid-sized codebase (say 500 files, 30k commits), recovery typically lands between €30,000 and €100,000.
Putting it together
For our 10-developer team with a 22% bug ratio, 55% feature ratio, 3 critical hotspots, 8 knowledge silos, and 42 dead files:
- Firefighting: €19,800/month
- Debt servicing: 23% non-feature → €20,700/month
- Recovery: (3 × 2 + 8 × 1) × €450 + 42 × 0.5 × €56 = €7,476
Total recurring cost: €40,500/month, or €486k/year.
One-time investment to clean up: €7,476.
Break-even math: €7,476 ÷ (€40,500 × 0.5 assumed reduction) = 0.4 months to recoup the investment if the cleanup eliminates even half of the recurring drag.
That's the slide. That's the number. That's the conversation you want to have with your CFO.
What to do next
You can compute these three figures by hand from git log, a commit classifier, and a few SQL queries. Or you can run DebtLens on your repo and get them in 60 seconds, complete with a Claude-written narrative ready to forward to finance.
The formulas are the same either way. What DebtLens gives you is consistency, a delta over time, and a PDF that looks like it was written for a board meeting.