Confusion Matrix Analyzer
Analyze classification model performance from confusion matrix values. Calculate precision, recall, F1 score, MCC, accuracy, specificity, and more.
Inputs
Results
Accuracy
0.9
Precision
0.83
Recall (Sensitivity)
0.91
F1 Score
0.87
How to Use This Calculator
- Enter the true positive, false positive, true negative, and false negative counts from your model.
- Review accuracy, precision, recall (sensitivity), and F1-score.
- Check specificity and AUC estimate for balanced evaluation.
- Identify whether false positives or false negatives are more costly for your use case.
- Adjust the classification threshold to trade off precision vs. recall based on business requirements.
What each input means
- True Positives (TP)
- Correctly predicted positive cases — the model said positive and it was positive.
- False Positives (FP)
- Incorrectly predicted positive cases — the model said positive but it was negative (Type I error).
- True Negatives (TN)
- Correctly predicted negative cases — the model said negative and it was negative.
- False Negatives (FN)
- Incorrectly predicted negative cases — the model said negative but it was positive (Type II error).
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersTrue Positives (TP) = 50, False Positives (FP) = 10, True Negatives (TN) = 80, False Negatives (FN) = 5 = 4 input(s) provided
- Calculate AccuracyAccuracy0.8966 = 0.8966
- Calculate PrecisionPrecision0.8333 = 0.8333
- Calculate RecallRecall0.9091 = 0.9091
- Calculate Matthews Correlation Coeff.Matthews Correlation Coeff.0.7862 = 0.7862
- Calculate SpecificitySpecificity0.8889 = 0.8889
Engine last updated . Checked against 1 independently-derived test — how we verify calculators.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Feature Scaling Calculator
Scale raw feature values using min-max normalization, z-score standardization, robust scaling, and max-abs normalization for machine learning preprocessing.
Data ScienceA/B Test Calculator
Determine statistical significance of A/B test results. Calculate z-score, p-value, conversion lift, and whether your variant beats the control at your chosen confidence level.
Machine Learning & AIModel Performance Calculator
Complete ML model evaluation. Classification metrics, regression analysis, cross-validation, ROC/AUC curves, and model comparison.
Machine Learning & AIModel Performance Metrics Calculator
Calculate accuracy, precision, recall, F1 score, MCC, AUC, and other classification performance metrics.
StatisticsROC Curve Calculator
Calculate sensitivity, specificity, PPV, NPV, accuracy, F1 score, and approximate AUC from a confusion matrix (TP, FP, TN, FN).
More in Math & Statistics.