Skip to content
ENExplore Calculators

Coverage Gap Calculator

Work out coverage gap instantly with clear inputs, formula shown and shareable results.

About Coverage Gap Calculator

Coverage percentage on its own does not tell you what closing the gap costs. Converting the shortfall into lines and then into developer days makes the trade-off explicit, and it usually reveals that the last ten percentage points cost more than the first fifty — because what remains is error handling, generated code and defensive branches that are hard to exercise.

Formula

Coverage gap

current = covered / total; lines to cover = ceil(total x target - covered); effort = lines to cover / lines per day

Worked example

With the default values below, Coverage Gap Calculator returns Current line coverage of 72.62%. Change any input above and every figure here is recalculated in your browser.

Inputs used

Executable linesminimum 1
84,000
Lines covered by testsminimum 0
61,000
Coverage targetaccepts 1–100 %
80 %
Lines a developer can cover per dayminimum 1
350

Results

Current line coverage
72.62%
Lines to cover to reach the target
6,200
Estimated effort
17.7 days
Total uncovered lines
23,000

Step by step

  1. 1Values used
  2. 2Coverage gap
  3. 3Current line coverage= 72.62
  4. 4Lines to cover to reach the target= 6,200
  5. 5Estimated effort= 17.7 days
  6. 6Total uncovered lines= 23,000

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Is a high coverage target always worthwhile?

No. Coverage measures execution, not assertion quality. Chasing 100 percent produces tests that run code without checking behaviour, which adds maintenance cost and no safety.

What is a better metric than line coverage?

Branch coverage is stricter, and mutation score is stricter still because it checks whether tests actually detect changed behaviour.

Coverage Gap Calculator – Calculate Current line coverage