🧮 Correlation Coefficient Calculator (Matthews)
Enter the four counts from your binary classification confusion matrix to calculate the Matthews Correlation Coefficient (MCC) and related accuracy metrics.
What this calculator does
The Matthews Correlation Coefficient (MCC) is a single-number summary of how well a binary classifier performs, using all four cells of a confusion matrix: true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN).
The formula
MCC is calculated as (TP×TN − FP×FN) divided by the square root of (TP+FP)(TP+FN)(TN+FP)(TN+FN). The result ranges from -1 (total disagreement between predictions and actual outcomes) through 0 (no better than random) to +1 (perfect prediction).
Why use MCC instead of accuracy alone
MCC is considered more informative than plain accuracy or F1 score when classes are imbalanced, because it only produces a high score when the classifier does well on all four confusion-matrix categories at once, not just the majority class.
- Accuracy: overall proportion of correct predictions
- Precision: of predicted positives, how many were correct
- Recall (Sensitivity): of actual positives, how many were caught
- Specificity: of actual negatives, how many were correctly identified
Note: this tool is for general educational and planning purposes.