Enter the number of defects and the number of lines of code into the Calculator. The calculator will evaluate the Defect Density.

- Probability of Defect Detection Calculator
- Defect Removal Efficiency Calculator
- Defect Rate Calculator
- DPMO Calculator (Defects Per Million Opportunities)

## Defect Density Formula

DD = D / LC

Variables:

- DD is the Defect Density (defects/line)
- D is the number of defects
- LC is the number of lines of code

To calculate Defect Density, divide the number of defects by the number of lines of code.

## How to Calculate Defect Density?

The following steps outline how to calculate the Defect Density.

- First, determine the number of defects.
- Next, determine the number of lines of code.
- Next, gather the formula from above = DD = D / LC.
- Finally, calculate the Defect Density.
- After inserting the variables and calculating the result, check your answer with the calculator above.

**Example Problem : **

Use the following variables as an example problem to test your knowledge.

number of defects = 5

number of lines of code = 1000