Confusion Matrix Metrics Calculator
Calculate explicitly oriented binary or multiclass prediction metrics from a whole-count confusion table.
Loading tool…
How to use Confusion Matrix Metrics Calculator
Rows are actual classes and columns predicted classes. Each diagonal cell is one-vs-rest TP; row/column totals give FN/FP. Precision,recall,specificity and F1 retain undefined zero-denominator states. Macro F1 requires every class F1 to be defined.
- Enter json actual-row/predicted-column counts, positive class number for binary mode.
- Choose the stated convention and check the units and supported model.
- Calculate, inspect the result, then copy or download it.
Good to know
- Square2–20class JSON count table, whole cells0–1e12. Binary mode requires2classes and selects a positive class. Single-label counts only; no fairness, causal or model-quality certification.
- Runs locally. Text/JSON fields are capped at30,000 characters; stricter page-specific and numeric-string limits also apply. Numeric inputs are bounded to magnitude1e15 and nonzero magnitude at least1e-100 unless an exact-string mode states otherwise. Approximate summaries use12 significant digits; CSV numeric cells retain the complete stored value and potentially formula-like string cells gain a protective apostrophe; unsupported, non-finite or detected underflow states return an error.
Common questions
Does a high accuracy prove that all classes perform well?
No. Class imbalance and different error types can hide behind accuracy. Review the per-class metrics and the observation design.
Is the input uploaded or saved?
No. The tool calculates inside this browser tab and provides a local download; it does not persist your input.
Keep going with related tools
All math →Two-proportion A/B Test Calculator
Compare two independent success rates with an explicitly approximate two-sided pooled z test.
MathChi-square Independence Calculator
Inspect a two-way count table with Pearson’s statistic, expected counts, and a conditional approximate p value.
CalculatorsPercentage Calculator
Calculate a percentage of any amount, then see the totals after adding or subtracting that percentage.
DataRanked Retrieval Evaluation Workbench
Evaluate supplied document rankings against graded judgments with traceable cutoff metrics and NDCG.
MathTwo-rater Agreement and Kappa Review
Separate observed agreement from marginal-chance agreement with exact unweighted or ordinal weighted Cohen kappa.
MathObserved Probability Calibration Review
Audit supplied binary probabilities through exact Brier score, calibration bins, AUC and explicit zero-probability log penalties.