Free · Probability and classification
Binary Classification Counts and Performance Rates
Calculate accuracy, precision, recall and related rates from a binary classification matrix.
- Formula & worked example
- Private in your browser
- No signup
Calculator inputs
Loading calculator…
How to use this calculator
- Enter the known values in the units shown. Results update as you type.
- Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
- Use the worked example to check the method. Reset restores the starting fields.
Private by default
Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.
Formula and method
The example has 75% accuracy, 80% precision and approximately 66.67% recall.
Accuracy = correct / total; precision = TP / (TP + FP); recall = TP / (TP + FN); F1 = 2TP / (2TP + FP + FN); MCC = (TP·TN − FP·FN) / √[(TP+FP)(TN+FN)(TP+FN)(TN+FP)].
Worked example
Enter these known values and leave the other values blank.
- True positive
- 40
- True negative
- 50
- False positive
- 10
- False negative
- 20
- Accuracy
- 0.75 .
- Precision
- 0.8 .
- Recall
- 0.6667 .
- F1 score
- 0.7273 .
- True positive rate
- 0.6667 .
- False negative rate
- 0.3333 .
- False positive rate
- 0.16667 .
- True negative rate
- 0.8333 .
- False discovery rate
- 0.2 .
- Matthews correlation coefficient
- 0.5071
Assumptions and limitations
- The four inputs are nonnegative counts or nonnegative weighted frequencies for the same binary-classification population. They must use consistent weights and class definitions.
- The standard Matthews coefficient uses a fixed square root of the four marginal totals. The unused hidden captured exponent does not change this coefficient.
- A rate with a zero denominator is undefined. MCC also needs positive marginal products. Undefined rates remain incomplete rather than receiving an arbitrary value.
- Changing the positive-class convention exchanges roles of counts and rates. These descriptive metrics do not establish causal performance or significance.
Common questions
How are percentages entered?
Use the selected percentage or decimal unit. A displayed value of 40% is the probability 0.4.
Can I solve for a missing input?
Yes, where the relationship has a finite, determined inverse. Clear the unknown and lock known controls; singular cases can remain incomplete.
References
Bookify adds explicit model-domain checks: A classification rate cannot exceed 100%. The standard Matthews coefficient must lie between minus one and one. Bookify calculates the standard Matthews correlation coefficient with a fixed square root, replacing the hidden adjustable exponent and its logarithmic inverse that could erase the coefficient during clearing. Bookify replaces the captured explanatory diagram with original accessible text preserving its probability or classification relationships.
Related calculators
Explore probability and classification or browse all statistics calculators.