About this tool
Enter a binary confusion matrix and get precision, recall, F1, F-beta, specificity, MCC and Cohen's kappa.
Precision Recall F1 Calculator turns the four cells of a binary confusion matrix into every standard classification metric: precision as TP/(TP+FP), recall as TP/(TP+FN), F1 as their harmonic mean, and the F-beta generalisation that lets you weight recall above precision or the reverse. It also reports specificity, negative predictive value, balanced accuracy, the Matthews correlation coefficient and Cohen's kappa, which is what you need when accuracy alone is flattering an imbalanced dataset. Metrics with a zero denominator are labelled undefined rather than silently shown as zero.
Open Precision Recall F1 Calculator on AltFTool — it loads instantly in your browser.
Enter the values you already know.
Fine-tune the options to match your scenario.
Read the result and use it in your planning or reporting.
A model that predicts no positives has no precision at all, and reporting that as 0.00 hides a broken model.
MCC and Cohen's kappa both fall sharply on a majority-class predictor that accuracy would rate highly.
Set beta to 2 when a missed positive costs more than a false alarm, or 0.5 when the reverse is true.
F1 is the harmonic mean: 2 x precision x recall divided by (precision + recall). It is algebraically identical to 2TP/(2TP+FP+FN), which is the safer form to compute because it stays defined when precision itself is not. Precision 0.70 and recall 0.778 give an F1 of 0.7368.
Precision asks what share of your positive predictions were correct, so it is TP/(TP+FP) and it punishes false alarms. Recall asks what share of the real positives you caught, so it is TP/(TP+FN) and it punishes misses. Raising a decision threshold usually raises precision and lowers recall.
Use F2 when a missed positive is worse than a false alarm — screening, fraud detection, safety alerts. F-beta weights recall beta times as heavily as precision, so beta of 2 gives recall four times the weight in the denominator. With precision 0.70 and recall 0.778, F1 is 0.7368 but F2 rises to 0.7609.
Because accuracy counts true negatives, and a rare positive class makes them easy to collect. On 1,000 cases with only 90 real positives, predicting negative every time already scores 91%. Balanced accuracy, MCC and Cohen's kappa all correct for this: MCC and kappa sit near 0 for a model that has learned nothing, no matter how high its accuracy looks.
Add the Precision Recall F1 Calculatorwidget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/f1-precision-recall-calculator"
title="Precision Recall F1 Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/f1-precision-recall-calculator?utm_source=embed&utm_medium=widget">AltFTool — free online tools</a></p>