Please verify you are human to use the calculator.
Enter the four counts — true positives, false positives, false negatives, and true negatives — or paste raw predictions to have them computed automatically.
Precision measures how many predicted positives are correct. Recall measures how many actual positives are found. F1 balances both via the harmonic mean.
These metrics account for class imbalance. MCC uses all four matrix cells; Cohen's kappa measures agreement beyond chance. Both are more robust than accuracy alone.
The colour-coded confusion matrix heatmap shows the distribution of predictions at a glance, while the bar chart makes it easy to compare all metrics side by side.
Evaluating a classifier goes far beyond a single accuracy number. Different metrics illuminate different aspects of model performance, and the right choice depends on the problem domain and the relative cost of errors.
In medical diagnosis, missing a true positive (low recall) could be life-threatening, so recall is paramount. In spam filtering, marking a legitimate email as spam (low precision) is highly disruptive, so precision matters more. The F1 score offers a balanced view, while MCC and Cohen's kappa provide single numbers that are robust to class imbalance.
These metrics are fundamental to machine learning workflows. For a hands-on example of building a text classifier and evaluating it with a confusion matrix, see our tutorial on text classification with TF-IDF and Naive Bayes.
Frequentist and Bayesian A/B test analysis. Z-test for proportions, Beta posterior distributions, probability of winning, and expected loss.
Try itFree calculators for t-tests, chi-square, ANOVA, Mann-Whitney U, confidence intervals, sample size, power analysis, and effect size.
Try itStep-by-step convolution animation with heatmap grids. Watch a kernel slide across input, see element-wise multiplication, and adjust stride, padding, and dilation.
Try itCompare live 2026 pricing across 300+ LLM APIs. Estimate monthly costs for GPT-4o, Claude, Gemini, Llama, and more.
Try itGet notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.
Common questions about confusion matrices and classification evaluation