Cloud, SaaS & IT Spend Build, Buy & Migration Discounted cash flow (payback and NPV)

Technical Debt Interest Calculator

Technical debt costs money continuously and gets paid down in lumps, which is exactly the shape of a loan. This calculator prices the recurring part — the share of your team's capacity that goes into working around the debt rather than delivering — and sets it against the one-off effort of removing it. You get the annual interest in dollars, the cost of the payoff, the payback period, the net present value over your horizon, and the closed-form cost of postponing the work by one year. It turns an argument about code quality into the same arithmetic finance already uses for every other capital decision.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Engineers affectedHow many full-time engineers work in the codebase or system carrying the debt. Count only those whose work actually touches it.8 FTE
Fully loaded cost per engineerSalary plus benefits and overhead, not base pay. Derive it in the fully loaded engineering hour calculator if you do not have the figure.245000 $/yr
Project weeks per engineer per yearWeeks of delivery each engineer provides after leave and holidays. This converts the refactor estimate from engineer-weeks into money.46 wk
Capacity lost to the debtShare of total team capacity spent working around the debt: slower changes, rework, failed deploys, manual steps and defect fixes traceable to it.25 %
Capacity still lost after the workThe drag you expect to remain once the refactor is done. Setting this to zero claims a perfect outcome and almost always overstates the case.8 %
Refactor effortTotal engineer-weeks to pay the debt down: six engineers for ten weeks is 60 engineer-weeks, not 10.60 eng-wk
Planning horizonHow long you expect this system to stay in service. Do not use a horizon longer than the system's realistic remaining life.5 yr
Discount rateThe hurdle rate finance applies to internal projects, usually cost of capital plus a margin for execution risk.10 %

It returns

  • Annual cost of the debt — Team capacity lost to the debt each year, valued at fully loaded cost.
  • Cost to pay it down
  • Annual saving after the work
  • Payback period
  • Net present value
  • Cost of postponing one year — Present value given up by starting a year later: a year of savings forgone, less a year of interest earned on the deferred cost.

The formula

Iyr=NLg
NPV=C+St=1H(1+d)t
W1=SCd1+d

In plain text: Annual interest = N · L · g, Payoff = w · L / W, Payback (months) = 12 · Payoff / [N · L · (g − r)]

  • I_yrAnnual interest — capacity lost to the debt, valued in money ($/yr)
  • NEngineers working in the affected system (FTE)
  • LFully loaded annual cost per engineer ($/yr)
  • gShare of total team capacity lost to the debt (decimal)
  • rShare still lost after the work is done (decimal)
  • wRefactor effort (engineer-weeks)
  • WProject weeks per engineer per year (weeks)
  • dDiscount rate (decimal)

Payback exists only when g exceeds r. When the residual drag equals or exceeds the current drag, the calculator returns no payback period rather than a negative one.

Updated Category Build, Buy & Migration Verified against published test cases Reading time 12 min

Why technical debt behaves like a loan

Ward Cunningham's original metaphor was precise about one thing that later retellings blur: debt is not the messy code, it is the interest the messy code charges on every future change. The principal is what it would cost to clean it up. The interest is what you pay every sprint whether or not you ever clean it up, in slower changes, rework, failed deployments and defects that trace back to the same structural cause.

That distinction is what makes the decision calculable. Interest is a recurring cost measured in capacity — a share of your team's total capacity that produces no delivery. Multiply that share by the fully loaded cost of the team and you have an annual dollar figure that sits alongside every other line in the engineering budget. The principal is a one-off effort in engineer-weeks, priced the same way any project is priced.

Once both are in dollars, the question stops being a values argument between engineers and managers and becomes an ordinary capital decision: does a one-off payment of C that removes a recurring cost of S per year clear the hurdle rate over the system's remaining life? That is the same question the cloud migration payback calculator asks about a data centre exit, with the same arithmetic.

The metaphor also warns you where it breaks. Real debt has a contractual interest rate; this one is an estimate, and it is the input with by far the widest uncertainty. Everything below is only as good as your evidence for the drag percentage.

Measuring the drag, then pricing it

The drag percentage is the share of total team capacity consumed by the debt — not the share of a single change that goes wrong, and not a productivity score. Four sources make it measurable rather than guessed. Cycle-time comparison: how long an equivalent change takes in the affected area versus a clean one. Rework rate: the proportion of changes that require a follow-up fix. Change failure rate and the recovery time behind it, which the DORA research programme defines and measures directly. And the standing tax: manual steps, environment fiddling and coordination that a healthier design would not require.

Value it at fully loaded cost, not salary. An engineer's true annual cost includes benefits and overhead, and if you do not have that figure the fully loaded engineering hour calculator derives it. Using base salary understates the interest by whatever your load factor is: at a load factor of 1.53, salary is 1 ÷ 1.53 = 65.4% of loaded cost, so the interest comes out about a third too low.

The payoff is priced in engineer-weeks, converted through the same loaded cost. Six engineers for ten weeks is 60 engineer-weeks, and at $245,000 per engineer over 46 delivery weeks a year, each engineer-week costs $5,326. Dividing by delivery weeks rather than by 52 is deliberate: leave weeks are paid but produce nothing, so an engineer-week of actual work carries their cost.

Residual drag is where most cases are won or lost. A refactor rarely returns a system to zero friction; it moves it to a lower level. The saving is the difference between the two drag levels, not the whole of the current drag, and a case built on the whole of it will be roughly one residual-percentage-point too optimistic for every year of the horizon.

The last output has a closed form worth knowing. Postponing the work by a year forgoes one year of saving but lets you keep the payoff cost for another year, earning the discount rate on it. The present value given up is (S − C·d) / (1 + d), and the horizon cancels out entirely — the cost of a year's delay is the same whether you are planning over five years or ten. It is negative when the annual saving is smaller than the interest on the payoff cost, which is the mathematical statement of "this is genuinely not urgent yet".

Worked example: eight engineers, 25% drag, 60 engineer-weeks to fix

Take the defaults: eight engineers at $245,000 fully loaded, 46 delivery weeks each, 25% of capacity lost to the debt, 8% expected to remain afterwards, 60 engineer-weeks of work, a five-year horizon and a 10% discount rate.

  1. Total the team. 8 × $245,000 = $1,960,000 a year.
  2. Price the interest. $1,960,000 × 25% = $490,000 a year of capacity lost to the debt.
  3. Price what remains after the work. $1,960,000 × 8% = $156,800.
  4. Take the saving. $490,000 − $156,800 = $333,200 a year.
  5. Cost one engineer-week. $245,000 ÷ 46 = $5,326.09.
  6. Price the payoff. 60 × $5,326.09 = $319,565.
  7. Divide for payback. $319,565 ÷ $333,200 = 0.959 years, and 0.959 × 12 = 11.5 months.
  8. Discount the savings. The five-year annuity factor at 10% is (1 − 1.10⁻⁵) ÷ 0.10 = 3.790787, so $333,200 × 3.790787 = $1,263,090.
  9. Net it off. $1,263,090 − $319,565 = $943,525 of net present value.
  10. Price a year's delay. ($333,200 − $319,565 × 0.10) ÷ 1.10 = ($333,200 − $31,957) ÷ 1.10 = $273,858.

Read the last figure carefully, because it is the one that changes conversations. Deferring this work by a single quarterly planning cycle is not free and not cheap: a full year's postponement destroys $273,858 of present value, which is more than eight tenths of what the work costs to do.

How to read the result

Compare the annual interest against the payoff cost first. When the interest exceeds the payoff — as it does in the worked example, $490,000 against $319,565 — the work repays itself in under a year, and the case is close to unarguable provided the drag estimate holds. When the payoff is several times the annual interest, the case depends heavily on the horizon, and the horizon depends on how long the system will really live.

Treat the horizon as the honest constraint it is. A five-year NPV on a system slated for replacement in two years is fiction. Set the horizon to the remaining life you would defend in front of the person who owns the roadmap, and if the answer is under two years the right move is usually to contain the debt rather than repay it.

Watch the residual assumption. Re-run the case with the residual set a few points higher than your estimate. If the NPV survives, you have a robust case. If it collapses, what you have is a case that depends on a refactor going perfectly, and refactors that go perfectly are not the modal outcome.

Do not use the annual interest as a productivity target. The figure says how much capacity is consumed by structural friction; it does not say the team would deliver 25% more features tomorrow if the debt vanished. Some of the recovered capacity goes into the next thing that was being deferred. Quote it as the cost of the friction, which is defensible, rather than as a promised throughput gain, which is not.

Annual interest by team size and drag level

Annual cost of the debt in dollars, at a fully loaded cost of $245,000 per engineer. Each cell is engineers × $245,000 × drag.
Engineers affected10% drag20% drag30% drag
4$98,000$196,000$294,000
6$147,000$294,000$441,000
8$196,000$392,000$588,000
12$294,000$588,000$882,000
20$490,000$980,000$1,470,000

The worked example sits between the 20% and 30% columns on the eight-engineer row: at 25% it is $490,000, the same figure the twenty-engineer team reaches at 10% drag. Debt in a large team is expensive at any severity.

Where these cases go wrong

  • Guessing the drag percentage. It is the input the whole result scales with, and an unevidenced number invites the reviewer to substitute their own. Bring cycle-time or rework data, or present a range and show the NPV at both ends.
  • Setting residual drag to zero. This claims a perfect refactor and inflates the saving by the residual amount every year of the horizon. A few points of residual is realistic and makes the case credible rather than weaker.
  • Confusing engineer-weeks with calendar weeks. Six people for ten weeks is 60 engineer-weeks. Entering 10 understates the payoff cost sixfold and produces a payback period nobody will believe once they check it.
  • Using base salary instead of loaded cost. Both the interest and the payoff scale with the same figure, so the payback period survives the error — but the NPV and the annual interest, which are what get quoted, do not.
  • Counting engineers who never touch the system. The drag applies to the capacity working in the affected code. Counting the whole department inflates the interest without inflating the payoff, which quietly doubles the apparent return.
  • Assuming the debt stays constant while you wait. This model holds drag flat. In an actively changing system it usually grows, which means the cost of postponing is a floor rather than a central estimate.

Not all debt is worth repaying

Debt in a system with two years left, low change frequency and no incident history is debt you should keep servicing rather than repay. The interest is small because the capacity flowing through it is small, and the payoff cost is unchanged. This calculator will tell you that directly through a negative NPV or a payback period beyond the horizon, and that is a legitimate answer, not a failed case. The strategic error is not carrying debt — it is carrying it without knowing what the interest is.

How this fits alongside the other engineering cost cases

Technical debt shows up in three budgets at once, and this calculator only measures one of them. The delivery cost is here. The reliability cost — debt that causes outages — belongs in the incident response cost calculator, and if the same structural cause drives repeated incidents you should count it once in each place but never add the two into one headline figure without saying so. The opportunity cost, work not started because capacity was consumed, is real but not reliably quantifiable, and it is better argued than estimated.

If you run service-level objectives, the error budget is a useful cross-check on the drag estimate: a system that consistently burns its budget is telling you the friction is real. The error budget calculator converts an availability target into the minutes you can actually spend.

Finally, when the payoff cost approaches the cost of replacing the system entirely, stop and run the replacement case instead. The build versus buy calculator and the software TCO calculator price that alternative properly. Paying down debt in a system you should be retiring is the most expensive form of diligence there is.

Key terms

Interest (in the debt metaphor)
The recurring cost the debt imposes on every future change, whether or not it is ever repaid. Measured here as team capacity lost per year.
Principal
The one-off effort required to remove the debt, priced in engineer-weeks at fully loaded cost.
Residual drag
The friction expected to remain after the work. The saving is the difference between current and residual drag, not the whole of the current drag.
Engineer-week
One engineer working for one week. Six engineers for ten weeks is sixty engineer-weeks.

Frequently asked questions

How do I estimate the drag percentage credibly?

Measure it rather than assert it. Compare cycle time for similar changes inside and outside the affected area, count the proportion of changes that need follow-up rework, and add the time spent on manual steps the system requires. The DORA metrics — change failure rate and time to restore in particular — give you a published, defensible frame for the incident-driven part. Present the result as a range and show the NPV at both ends; a case that survives its own lower bound is much harder to dismiss.

Is the drag a share of the team or a share of each change?

A share of total team capacity, which is the denominator this calculator uses throughout. If your evidence is per-change — say each affected change takes 40% longer — convert it before entering: multiply the per-change penalty by the fraction of work that touches the affected area, then express it as a share of the time you actually spend. Forty percent longer on a third of the work adds 0.4 × ⅓ = 0.1333 to a clean baseline of 1, so the wasted share of real capacity is 0.1333 ÷ 1.1333 = 11.8% — not 40%.

What discount rate should I use?

Whatever finance applies to internal projects, which is usually cost of capital plus a margin for execution risk. If nobody has given you one, run the case at 10% and again at 20%; refactoring cases are less rate-sensitive than long-horizon infrastructure cases because the savings arrive early. Setting the rate to zero is a legitimate sanity check — it shows the undiscounted total, which should always be the larger figure when savings are positive.

Why is the cost of waiting independent of the planning horizon?

Because delaying by a year shifts both the cost and the whole stream of savings by one year, and the algebra reduces to (S − C·d) ÷ (1 + d) with the horizon cancelling out. That makes it a clean number to quote in a planning discussion: it does not depend on an assumption about system lifetime that someone can argue with. It does assume the drag stays constant during the year you wait, which in an actively changing system makes it a lower bound.

Can the cost of waiting be negative?

Yes, and the calculator says so plainly when it happens. It goes negative when the annual saving is smaller than the discount rate applied to the payoff cost — that is, when holding the money is worth more than the friction it would remove. That is the honest signal that the work is not yet urgent. It is also a warning that the case is marginal, because the same condition means the payback period is longer than 1 ÷ d years.

Should I include the cost of the risk that the refactor fails?

Handle it through the residual drag rather than a separate risk line. A refactor that half works leaves higher residual drag, and raising that input is a direct, arguable representation of the risk. If the failure mode is not partial success but an outage during the change, price that separately as an incident and add it to the payoff cost as an expected value.

How does this differ from a code-quality score?

A quality score measures the code; this measures the money. Static analysis debt ratios and maintainability indices are useful for finding where the debt is and for tracking whether it is growing, but they cannot tell you whether repaying it clears a hurdle rate, because they contain no cost of capacity and no system lifetime. Use the scores to locate the debt and this calculation to decide what to do about it.

What if the team would not actually deliver more after the refactor?

Then the saving is not real and you should lower the drag figure until it is. This calculation prices capacity returned to the team, and the claim only holds if that capacity has somewhere to go. In a team with no backlog pressure the honest framing is different: the work reduces incident load and change risk, which is a reliability case rather than a delivery one, and belongs in the incident cost calculation instead.

References

  • Ward Cunningham, "The WyCash Portfolio Management System" (OOPSLA '92 Experience Report) — origin of the debt metaphor — ACM
  • Accelerate: The Science of Lean Software and DevOps (DORA metrics) — IT Revolution Press
  • Principles of Corporate Finance, 13th ed. (NPV, payback and annuity factors) — McGraw-Hill Education