Confusion Matrix Metrics Calculator
Calculate precision, recall, specificity, F1, accuracy, balanced accuracy and MCC from a declared positive-class count table.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Use the appropriate actual/predicted margins for each binary classification metric and preserve undefined zero denominators.
F1=2TP/(2TP+FP+FN); MCC=(TP×TN−FP×FN)/√[(TP+FP)(TP+FN)(TN+FP)(TN+FN)]
Worked example
TP=40, FP=10, FN=5, TN=45 give accuracy 85%, precision 80%, recall about 88.8889% and F1 about 0.8421053.
Assumptions and input details
Nonnegative whole counts up to 1e9 per cell, with a positive total. Declare a consistent positive class. Empty denominators remain undefined instead of being silently set to zero. Metrics summarize the entered sample only; prevalence, bias, threshold choice, uncertainty and clinical or deployment utility are not inferred. Binary counts are separate from multi-class and agreement-kappa analyses.
References: scikit-learn: classification-metric definitions
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Calculate observed agreement, marginal chance agreement and unweighted Cohen’s kappa from a paired binary rating table.
Compare two conversion proportions, percentage-point difference, relative lift, a pooled z statistic and a clearly labelled normal-approximation interval.
Analyze matched binary outcomes using an exact discordant-pair binomial test and two chi-square approximation conventions.
Reserved advertising space.