Estimating bugs and technical debt

Last reviewed November 7, 2026

Bugs found while an item is still being built aren't estimated separately: fixing them is part of finishing the item. Bugs that escaped into a released Increment, and technical debt the team wants to pay down, go into the Product Backlog and are sized like any other item. The one exception is a bug whose cause is unknown. Size the investigation as a short, time-boxed task, and size the fix once the cause is found.

Whatever rule you choose, apply it consistently. Velocity can only forecast if the same kinds of work are counted the same way every Sprint.

Three kinds of bug

KindExampleHow to handle it
Found during the Sprint, in an unfinished itemA test fails on the new booking screenPart of the item. No separate estimate. The item isn't done until it is fixed
Escaped, cause knownCustomers in one time zone see the wrong timeA Product Backlog item, sized and ordered like any other
Escaped, cause unknownThe app crashes occasionally for some usersA time-boxed investigation first. Size the fix when the cause is known

The first kind is the most common source of confusion. A bug in work that isn't finished yet isn't a separate piece of work. The Definition of Done already requires the item to work, so the fix is part of the original estimate.

Should escaped bugs get points?

Teams disagree, and both choices can work.

Option 1: size bugs like other items. Velocity then includes bug fixing. Forecasts stay accurate as long as the share of bugs is steady. The risk is that a team fixing many bugs looks productive while delivering little new value.

Option 2: don't size bugs, and leave room for them. Velocity then counts only new value. The team reserves part of each Sprint, based on history, for bugs. The risk is that a sudden rise in bugs isn't visible in the numbers, only in a falling velocity.

Most teams find option 1 simpler, because it treats all work the same. Whichever you choose, track the number of escaped bugs separately. A rising count is a quality problem, and no estimation rule fixes it.

Sizing a bug with an unknown cause

Nobody can size the fix for a problem they don't understand. Instead:

Technical debt

Technical debt is the extra work created when code is built in a way that is quicker now but harder to change later. Martin Fowler describes it as debt with interest: every change to that part of the system costs a little more until the debt is paid.

Technical debt work comes in two forms:

  • Small improvements made while working nearby. Many teams include these in the estimate of the item that touches the code. A Developer who improves a messy function while adding a feature to it doesn't need a separate item.
  • Larger pieces of work. Rewriting a module or upgrading a framework becomes a Product Backlog item, sized by the Developers and ordered by the Product Owner.

The Developers must explain larger debt items in terms the Product Owner can weigh, such as "every change to payments takes twice as long because of this". Without that explanation, debt items lose to new features every time.

A worked example

Notice that sizing the debt and the bugs made the trade-off visible. The Product Owner could see exactly how much of the Sprint went into each, and decide.

Common pitfalls

Pointing in-Sprint bugs. If a team adds points for bugs in its own unfinished work, velocity rises every time the team makes a mistake.

Hiding debt inside feature estimates. Small cleanups can live inside items. Large rewrites hidden this way make features look mysteriously expensive and hide the real cost from the Product Owner.

A separate bug budget nobody reviews. Reserving 20% of every Sprint for bugs is fine, but check each Sprint whether that share is rising.

Sizing a guess. Giving an unknown bug a large number to be safe distorts the forecast. Investigate first.

Questions

Should bugs have story points?

Bugs that escaped into a released Increment can be sized like any other Product Backlog item, and many teams do. Bugs found in unfinished work during the Sprint shouldn't be sized, because fixing them is part of finishing the item.

How do you estimate a bug you don't understand yet?

Don't estimate the fix. Time-box an investigation, such as half a day, to find the cause. Once the cause is known, size the fix as a normal item.

Who decides when to work on technical debt?

The Product Owner orders the Product Backlog, including debt items. The Developers are accountable for explaining the cost of the debt clearly, so the Product Owner can weigh it against new features.

Does fixing bugs count toward velocity?

It does if the team sizes escaped bugs as Product Backlog items. It doesn't if the team reserves time for bugs instead. Both work, as long as the team picks one rule and keeps it.