F1 Score

Last Updated: July 29, 2026 | By Mihail Sebastian | AI Dictionary

The harmonic mean of precision and recall: a single score between 0 and 1 that stays high only when a classifier flags both carefully and thoroughly.

What is F1 Score?

The F1 score is the harmonic mean of a classification model’s precision and recall: a single number between 0 and 1 that is high only when both are high. It answers the question the two metrics leave open when they disagree.

Precision rewards a model for flagging carefully; recall rewards it for flagging thoroughly. The F1 score forces one verdict out of that tension, which makes it the default single metric for classifiers on imbalanced data.

How the F1 Score Works

\[ F_1 = 2 \cdot \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}} \]

The harmonic mean punishes imbalance in a way the ordinary average does not. A model with precision 1.0 and recall 0.02 averages to 0.51 arithmetically, but its F1 score is about 0.04. To score well, a model has to be good at both jobs at once.

This matters most when classes are skewed. If 1% of transactions are fraud, a model posts 99% accuracy by predicting “legitimate” every time, yet its F1 score on the fraud class is 0, because recall is 0. Precision, recall, and therefore F1 all come from the counts in the confusion matrix.

Example of F1 Score

A hospital screening model flags 80 of 1,000 patients. Of those flags, 40 are correct, and they cover 40 of the 50 patients who actually have the disease. Precision is 0.5; recall is 0.8.

\[ F_1 = 2 \cdot \frac{0.5 \times 0.8}{0.5 + 0.8} \approx 0.62 \]

The score lands below the simple average of 0.65 because the harmonic mean leans toward the weaker number. If the hospital raised precision to 0.8 with recall unchanged, F1 would rise to 0.8: the fastest way to improve F1 is always to fix the worse of the two metrics.

Related AI terms: Precision · Recall · Confusion Matrix · Imbalanced Data · Model Evaluation

Did you like the F1 Score gist?

Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.

Mihail Sebastian — Writes about AI governance, regulation, and the technology behind them. Placeholder bio — replace with a real credential line. About

Read the Governor's Letter

Stay ahead with Governor's Letter, the newsletter delivering expert insights, AI updates, and curated knowledge directly to your inbox.

By subscribing to the Governor's Letter, you consent to receive emails from AI Guv.
We respect your privacy - read our Privacy Policy to learn how we protect your information.

Browse All AI Terms A–Z

Every term in the dictionary, in alphabetical order. Jump to a letter or scroll the full list.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z