Enter your confusion matrix values - true positives, false positives, false negatives and true negatives - to instantly calculate accuracy, precision, recall, specificity, F1 score, MCC and a plain-language performance verdict.
Please enter valid non-negative numbers (total must be greater than zero).
Predicted → / Actual ↓
A confusion matrix is the starting point for evaluating any binary classification model. It records four counts that describe how well a model separates the positive class from the negative class, and from those four numbers every standard classification metric can be derived.
| Term | Symbol | Meaning |
|---|---|---|
| True Positives | TP | The model predicted positive and the actual label is positive. Correct positive predictions. |
| False Positives | FP | The model predicted positive but the actual label is negative. Also called Type I errors or false alarms. |
| False Negatives | FN | The model predicted negative but the actual label is positive. Also called Type II errors or misses. |
| True Negatives | TN | The model predicted negative and the actual label is negative. Correct negative predictions. |
| Metric | Formula | Interpretation |
|---|---|---|
| Accuracy | (TP + TN) / (TP + FP + FN + TN) | Proportion of all predictions that are correct. |
| Precision (PPV) | TP / (TP + FP) | Of all predicted positives, what fraction are actually positive. |
| Recall / Sensitivity (TPR) | TP / (TP + FN) | Of all actual positives, what fraction did the model detect. |
| Specificity (TNR) | TN / (TN + FP) | Of all actual negatives, what fraction did the model correctly reject. |
| F1 Score | 2 * (Precision * Recall) / (Precision + Recall) | Harmonic mean of precision and recall. Balances both metrics into one. |
| MCC | (TP*TN - FP*FN) / sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)) | A balanced measure even for imbalanced classes. Ranges from -1 to +1. |
| False Positive Rate (FPR) | FP / (FP + TN) | Proportion of actual negatives that are incorrectly classified as positive. |
| False Negative Rate (FNR) | FN / (FN + TP) | Proportion of actual positives that are incorrectly classified as negative. |
| Negative Predictive Value (NPV) | TN / (TN + FN) | Of all predicted negatives, what fraction are actually negative. |
Using the calculator defaults: TP = 50, FP = 10, FN = 5, TN = 35 (total = 100 observations).
Accuracy is intuitive but misleading when classes are imbalanced. For example, if 95% of samples are negative, a model that always predicts negative achieves 95% accuracy while being entirely useless for detecting positives.
Precision is critical when false positives are costly (for example, a spam filter that mistakenly blocks legitimate emails). Recall matters more when false negatives are costly (for example, a cancer screening test that misses actual cases). The F1 score balances the two. The MCC is widely considered the most reliable single-value summary for binary classification because it takes all four quadrants of the confusion matrix into account symmetrically.
Sources and method: Formulas sourced from Fawcett T. (2006), "An introduction to ROC analysis", Pattern Recognition Letters 27(8):861-874; Powers D.M.W. (2011), "Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness and Correlation", Journal of Machine Learning Technologies 2(1):37-63. MCC formula as defined by Matthews B.W. (1975), Biochimica et Biophysica Acta 405(2):442-451.
This calculator applies standard binary classification evaluation formulas to the values you enter. Results are valid for two-class (binary) problems only. For multi-class classification, an extended confusion matrix and macro/micro-averaged metrics are required.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.