Glossary
F1 score
The harmonic mean of precision and recall, giving a single score that balances both when neither error type is clearly more costly.
Also called: F-measure, F1
The F1 score combines precision and recall into a single number using the harmonic mean: F1 = 2 * (precision * recall) / (precision + recall). It ranges from 0 to 1, where 1 means perfect precision and recall together, and it is calculated from the same confusion matrix that produces precision and recall individually.
The harmonic mean, rather than a simple average, is used deliberately: it penalizes a large imbalance between precision and recall more heavily than an arithmetic average would, so a model cannot score well on F1 by being extreme on one measure while ignoring the other, for example flagging almost everything as positive to chase perfect recall. This makes F1 useful specifically when a single number is needed and neither false positives nor false negatives are clearly more costly than the other.
F1 is common in classification tasks with imbalanced classes, such as fraud or defect detection, where plain accuracy is misleading. Its main limitation is that same balance: F1 treats precision and recall as equally important, which is not always true in practice, and variants such as the F-beta score let practitioners weight recall or precision more heavily when the costs of the two error types genuinely differ. It says nothing about performance across other thresholds, unlike ROC AUC.
Last reviewed September 22, 2026