Machine Vision & Industrial Inspection AI calculator

Defect Classification Accuracy Calculator

Check whether known defects receive the right class before approving an inspection model. Enter correct assignments, total defective samples and the accuracy required by your quality plan.

What this calculator does

  • Measure how often known defects receive the correct class label.

Formula used

  • Defect Classification Accuracy (%) = correctly classified defects ÷ total defects × 100
  • Gap (points) = required rate − observed rate
  • Misclassified defects = total defects − correctly classified defects

Inputs explained

  • Defects Correctly Classified: Correct class assignments from the reviewed confusion matrix.
  • Total Defects in Sample: All known defective samples, including wrong class assignments.
  • Required Classification Accuracy: Minimum observed rate specified in your acceptance plan.

How to use the result

  • Best suited to defect class acceptance review, model comparison on labeled defects.
  • The observed percentage is not a confidence bound on production performance. Overall accuracy can conceal poor classification of rare defect classes.

Common questions

  • Does this include correctly accepted good parts? No. This score covers known defective samples only; including good parts would change the denominator and the question.
  • How do I count an unknown class? Count it as incorrect when your acceptance plan requires a specific defect class. Keep the scoring rule fixed across model versions.
  • Does meeting the target prove production performance? No. An overall class score can hide a weak rare-defect class. Review the confusion matrix and independent validation coverage for each defect family before approving production use.
  • Why can the gap be negative? The classifier assigned a larger share of defects correctly than your quality plan requires. For example, 97% observed against a 95% requirement gives a gap of −2 percentage points.

Last reviewed 2026-10-23.