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.
Sample Summary
TP
FP
FN
TN
Classification 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
- Enter the number of True Positives (TP) — correct positive predictions.
- Enter False Positives (FP) — negatives incorrectly predicted as positive.
- Enter False Negatives (FN) — positives incorrectly predicted as negative.
- Enter True Negatives (TN) — correct negative predictions.
- Click "Calculate" (or edit any field) to see all five metrics update instantly.
- 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