Accuracy Calculator

Enter TP, FP, FN, TN from a confusion matrix to instantly calculate accuracy, precision, recall, F1 score, and specificity.

Confusion Matrix

Enter counts from your 2×2 confusion matrix.

Correctly predicted positive
Negative predicted as positive
Positive predicted as negative
Correctly predicted negative

Enter your confusion matrix values
and click Calculate to see metrics.

Copied!

Summary

Enter TP, FP, FN, TN from a confusion matrix to instantly calculate accuracy, precision, recall, F1 score, and specificity.

How it works

  1. Enter the number of True Positives (TP) — correct positive predictions.
  2. Enter False Positives (FP) — negatives incorrectly predicted as positive.
  3. Enter False Negatives (FN) — positives incorrectly predicted as negative.
  4. Enter True Negatives (TN) — correct negative predictions.
  5. Click "Calculate" (or edit any field) to see all five metrics update instantly.
  6. Use the Reset button to clear all values and start over.

Use cases

  • Evaluate a machine learning classifier after training.
  • Compare model performance across different thresholds.
  • Report precision, recall, and F1 in an academic paper or presentation.
  • Diagnose whether a model is biased toward false positives or false negatives.
  • Compute specificity for medical test evaluation.
  • Quickly verify hand-calculated confusion matrix metrics.
  • Teach classification evaluation concepts in a data science course.
  • Audit model quality during code review or model review sessions.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu