When to use this calculator
Summarize a binary confusion matrix using Matthews correlation. Every marginal product factor must be positive for this formula; perfect single-class sets are undefined.
Explore the descriptive statistics calculators for other questions in this topic. For a related calculation, use the Coefficient of Variation Calculator: Express a standard deviation relative to a positive mean.
Understand the matthews correlation coefficient result
Summarize a binary confusion matrix using Matthews correlation. For the example inputs Integer true positives = 40, Integer true negatives = 40, Integer false positives = 10, Integer false negatives = 10, the result is 0.6 correlation. Every marginal product factor must be positive for this formula; perfect single-class sets are undefined.
PUTTING IT INTO PRACTICE
Matthews Correlation Coefficient: a worked example
The values below are an illustrative example, not a recommendation. Replace them with measurements or assumptions that match your question.
| Input | Example value |
|---|---|
| Integer true positives | 40 |
| Integer true negatives | 40 |
| Integer false positives | 10 |
| Integer false negatives | 10 |
| Result | 0.6 correlation |
- Check the input labels and enter the example values above.
- Apply the relationship: MCC = (TP TN−FP FN)/sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)).
- The result is 0.6 correlation, rounded for display.
How to interpret your result
Every marginal product factor must be positive for this formula; perfect single-class sets are undefined. Counts must come from the same binary classification evaluation set. Positive and negative labels must be defined consistently.
The result is expressed in correlation. Every marginal product factor must be positive for this formula; perfect single-class sets are undefined.
Frequently asked questions
Which assumptions matter for matthews correlation coefficient?
Every marginal product factor must be positive for this formula; perfect single-class sets are undefined. Counts must come from the same binary classification evaluation set. Positive and negative labels must be defined consistently.
When is the matthews correlation coefficient calculator useful?
Summarize a binary confusion matrix using Matthews correlation. Every marginal product factor must be positive for this formula; perfect single-class sets are undefined.
How do I use the matthews correlation coefficient calculator?
Enter integer true positives, integer true negatives, integer false positives, integer false negatives. The result updates automatically. Use the units shown beside each input; the example values illustrate the method.
Which formula does this calculator use?
MCC = (TP TN−FP FN)/sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)).
What should I check before using the result?
Every marginal product factor must be positive for this formula; perfect single-class sets are undefined. Counts must come from the same binary classification evaluation set. Positive and negative labels must be defined consistently.
How are results rounded?
Scalar numbers display up to six decimal places, with scientific notation for very large or small values. Text, fraction, date and schedule outputs use the format described on the tool. Intermediate calculations use JavaScript floating-point arithmetic. Keep sensible precision for your measurements.
Further reading
For background on this topic, see Scikit-learn: classification evaluation metrics ↗. This is a topic reference, not an external review or endorsement of this tool.
Calculators Map editorial process · Updated · Methods and limitations