
A square four-compartment tray with two colors of sample tokens. Original AI-generated artwork produced for GreenCalc; not a measured diagram or empirical data display.
Define “positive” before placing a count
A binary confusion matrix cross-classifies actual labels and predicted labels. Choose the positive class explicitly: defective, spam or another named category. True positive means actual positive and predicted positive. False positive means actual negative but predicted positive. The word “false” describes disagreement, not whether the actual item belongs to the positive class.
| Actual / predicted | Predicted positive | Predicted negative |
|---|---|---|
| Actual positive | TP | FN |
| Actual negative | FP | TN |
Do not infer orientation from appearance
Some software places actual classes in rows, while a report may transpose the table or reverse class order. A two-by-two grid without labels is ambiguous. Enter the semantic counts into the Confusion Matrix Calculator, rather than copying four cells left to right without checking the headings. The output repeats actual and predicted signs to make the convention visible.
Verify totals before interpreting rates
TP + FN is the number of actual positives; TN + FP is the number of actual negatives. TP + FP is the number of predicted positives. All four cells should sum to the evaluation sample size. For TP = 80, FP = 10, FN = 20 and TN = 90, there are 200 observations, 100 actual positives and 90 predicted positives. Recall is 80%, while precision is 80/90, about 88.8889%.
Preserve undefined quantities
If a model predicts no positives, precision has a zero denominator. The tool reports it as undefined rather than silently substituting zero. State the evaluation population, decision threshold and class convention with the report. Reversing the positive label exchanges several metrics even when accuracy stays the same. Read MCC, F1 and specificity tradeoffs for interpretation beyond one score. For a shorter agreement-focused result, use the Accuracy Calculator, whose purpose is the accuracy and class-balance comparison.
Check the model behind your result
Use the Confusion Matrix Calculator for the supported calculation and review its stated assumptions before interpreting the output. Find related tools in the Statistics category, or browse the GreenCalc homepage for other calculation topics.
By GreenCalc Editorial Team · Updated 2026-10-26
