CareerByteCode

Confusion Matrix Calculator

For data science students, interview candidates and ML engineers evaluating a classifier. You get accuracy, precision, recall, specificity, F1 and the total sample count from the four confusion matrix cells.

FreeRuns in your browserNothing uploadedNo sign-up neededAll 10 tools in the ML Toolbox
Keep this resultSign in to email it to yourself or save it to your profile. The tool itself never needs an account.

ByteLabs

Close the gaps with real-world projects

Build industry projects on ByteLabs and add verified proof of your skills to your public profile.

Explore ByteLabs
How to use

How to use the Confusion Matrix Calculator

  1. Enter True Positives (TP) and False Positives (FP).
  2. Enter False Negatives (FN) and True Negatives (TN).
  3. Click Compute metrics.
  4. Read accuracy, precision, recall, specificity and F1 score.
Worked example

An example, step by step

You enter

TP 90, FP 10, FN 5, TN 95

The tool shows

Accuracy 0.925 (92.5%), precision 0.9, recall 0.9474, specificity 0.9048, F1 0.9231, 200 samples

FAQ

Questions about the Confusion Matrix Calculator

What is the difference between precision and recall?

Precision is TP divided by TP plus FP: of everything predicted positive, how much was right. Recall is TP divided by TP plus FN: of all real positives, how many were found.

When is F1 score better than accuracy?

On imbalanced data. If 95 percent of samples are negative, a model that always says negative gets 95 percent accuracy but an F1 of 0, so F1 shows the real performance on the positive class.

What is specificity in a confusion matrix?

Specificity, or true negative rate, is TN divided by TN plus FP: the share of real negatives the model correctly rejected.

Is the Confusion Matrix Calculator free and private?

Yes. It is free, needs no sign-up and runs entirely in your browser, so what you type is not uploaded. You only sign in if you want to email a result to yourself or save it to your CareerByteCode profile.

Copied