Matthews Correlation Coefficient (MCC) Calculator
MCC from a confusion matrix — the balanced classifier metric that stays honest on imbalanced data — with F1, accuracy, Cohen’s kappa and informedness alongside.
How it works
MCC = (TP·TN − FP·FN) ÷ √[(TP+FP)(TP+FN)(TN+FP)(TN+FN)]
MCC is the Pearson correlation between predicted and actual labels, ranging from −1 (perfectly wrong) through 0 (chance) to +1 (perfect). Unlike accuracy or F1, it uses all four cells symmetrically, so a classifier cannot look good by handling only the majority class well. It is the recommended single number for binary classification, especially on imbalanced datasets.
Worked example
TP 90, FP 5, FN 10, TN 5: F1 = 0.92 and accuracy 86% look fine, but MCC = 0.14 reveals the model barely beats chance on the rare negative class.
Frequently asked questions
How does MCC relate to kappa?
They are close for balanced tables and identical when the marginal totals match; MCC is the geometric-mean form and is preferred for classifiers.
What is a good MCC?
Above 0.7 is strong; between 0.4 and 0.7 moderate. Compare against a baseline model rather than a fixed rule.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.