Defect Rate Calculator Formula

Understand the math behind the defect rate calculator. Each variable explained with a worked example.

Formulas Used

Defect Rate

defect_rate = total_units > 0 ? (defective_units / total_units) * 100 : 0

Yield Rate (First Pass)

yield_rate = total_units > 0 ? ((total_units - defective_units) / total_units) * 100 : 0

Defects Per Million (DPMO)

dpmo = total_units > 0 ? (defective_units / total_units) * 1000000 : 0

Variables

VariableDescriptionDefault
defective_unitsDefective Units25
total_unitsTotal Units Produced5000

How It Works

How to Calculate Defect Rate

Formula

Defect Rate = (Defective Units / Total Units Produced) x 100 DPMO = (Defective Units / Total Units) x 1,000,000

Defect rate directly measures quality. Lower is better. Manufacturing excellence programs like Six Sigma aim for 3.4 DPMO (defects per million opportunities), which equates to a defect rate of 0.00034%. Even in less rigorous environments, tracking defect rates identifies process problems and drives continuous improvement.

Worked Example

A production run of 5,000 units yields 25 defective pieces.

defective_units = 25total_units = 5000
  1. 01Defect Rate = (25 / 5,000) x 100 = 0.5%
  2. 02Yield Rate = (4,975 / 5,000) x 100 = 99.5%
  3. 03DPMO = (25 / 5,000) x 1,000,000 = 5,000

Ready to run the numbers?

Open Defect Rate Calculator