Precision Recall Calculator

Enter TP, FP, TN, FN from your confusion matrix and instantly get precision, recall, F1 score, accuracy, and more.

Use the Precision Recall Calculator

Confusion Matrix Inputs

Enter the four values from your binary classifier's confusion matrix.

Correctly predicted positive

Negative predicted as positive

Positive predicted as negative

Correctly predicted negative

Confusion Matrix
Predicted Positive Predicted Negative
Actual Positive 90 5
Actual Negative 10 795

Classification Metrics

N = 900

F-Beta Score

Adjust beta to weight recall (beta > 1) or precision (beta < 1) more heavily.

F-Beta = 0.9231
Copied!

Summary

This tool computes the core binary classification metrics — precision, recall, F1 score, accuracy, and specificity — from the four values of a confusion matrix. It accepts True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN) and derives all metrics client-side with no data sent to any server. Results update live as you type.

How it works

  1. Enter the number of True Positives (TP) — correctly predicted positive cases.
  2. Enter the number of False Positives (FP) — negative cases incorrectly predicted as positive.
  3. Enter the number of True Negatives (TN) — correctly predicted negative cases.
  4. Enter the number of False Negatives (FN) — positive cases incorrectly predicted as negative.
  5. All classification metrics are computed instantly in your browser.
  6. Use the copy button next to any metric to copy its value to the clipboard.

Use cases

  • Evaluate the performance of a binary classification ML model.
  • Compare precision vs. recall trade-offs when tuning a decision threshold.
  • Report F1 score for imbalanced datasets where accuracy is misleading.
  • Verify hand-calculated confusion matrix metrics during coursework.
  • Assess spam filter performance using TP/FP/TN/FN counts.
  • Benchmark object detection or anomaly detection models.
  • Debug model results by checking which metric is underperforming.
  • Compute Matthews Correlation Coefficient (MCC) for balanced evaluation.

Frequently Asked Questions

Last updated: 2026-05-23 · Reviewed by Nham Vu