Skip to content
ENExplore Calculators

Precision And Recall Calculator

Work out precision and recall instantly with clear inputs, formula shown and shareable results.

About Precision And Recall Calculator

Precision answers how many flagged items were genuinely positive (TP / (TP + FP)), while recall answers how many genuine positives were caught (TP / (TP + FN)). They trade off against each other as the decision threshold moves, and F1 is their harmonic mean, which punishes a model that wins on one metric by sacrificing the other. Specificity completes the picture from the negative class.

Formula

Confusion-matrix metrics

precision = TP / (TP + FP); recall = TP / (TP + FN); F1 = 2PR / (P + R); specificity = TN / (TN + FP)

Worked example

With the default values below, Precision And Recall Calculator returns Precision of 80.00%. Change any input above and every figure here is recalculated in your browser.

Inputs used

True positivesminimum 0
80
False positivesminimum 0
20
False negativesminimum 0
15
True negativesminimum 0
885

Results

Precision
80.00%
Recall (sensitivity)
84.21%
F1 score
0.8205
Specificity
97.79%

Step by step

  1. 1Values used
  2. 2Confusion-matrix metrics
  3. 3Precision= 80.00
  4. 4Recall (sensitivity)= 84.21
  5. 5F1 score= 0.8205
  6. 6Specificity= 97.79

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Which metric matters more?

It depends on the cost of each error. Screening for a serious disease favours recall because a missed case is expensive; blocking content or sending sales outreach favours precision because false alarms annoy real users.

Why use the harmonic mean for F1?

The harmonic mean is dominated by the smaller value, so F1 only rises when precision and recall are both reasonable. An arithmetic mean would reward a model with 100 percent precision and 2 percent recall.

Precision And Recall Calculator | Calcrivo