Skip to content
Query Feedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  1. Home /
  2. AI Glossaries /
  3. Machine Learning /
  4. What is F1 Score in Machine Learning?
Machine Learning

What is F1 Score in Machine Learning?

Updated October 2, 2026 Read 3 min

The F1 score combines precision and recall into a single number using their harmonic mean, which penalises models that perform well on one measure and badly on the other.

Contents 12
  1. 01Key takeaways
  2. 02F1 explained in simple terms
  3. 03Why the harmonic mean
  4. 04A worked example
  5. 05F-beta: weighting one side
  6. 06Multi-class averaging
  7. 07When F1 is the wrong metric
  8. 08Practical guidance
  9. 09Limitations
  10. 10Common Use Cases
  11. 11Frequently Asked Questions
  12. 12Related Terms

The F1 score combines precision and recall into a single number using their harmonic mean. It is useful when you need one metric to compare models and both error types matter. Its defining property is that it punishes imbalance: a model with excellent precision and terrible recall scores poorly, which a simple average would hide.

Key takeaways

  • F1 = 2 × (precision × recall) ÷ (precision + recall).
  • It ranges from 0 to 1, where 1 means perfect precision and recall.
  • The harmonic mean is used because it is dominated by the smaller value.
  • F-beta variants let you weight recall or precision more heavily.
  • F1 ignores true negatives and depends on the chosen threshold.

F1 explained in simple terms

Two sales candidates: one makes many calls but closes nothing, the other closes everything but calls almost no one. Averaging their scores makes both look mediocre-to-fine. The harmonic mean says both are poor, because performance requires doing both. F1 applies that logic to precision and recall.

Why the harmonic mean

Compare a model with precision 0.9 and recall 0.1:

Mean typeCalculationResult
Arithmetic(0.9 + 0.1) ÷ 20.50
Harmonic (F1)2 × (0.9 × 0.1) ÷ (0.9 + 0.1)0.18

The arithmetic mean suggests a middling model. F1 correctly reports that it is nearly useless, because it finds only a tenth of real cases. The harmonic mean is always pulled towards the lower value, which is exactly the behaviour you want.

A worked example

A support ticket classifier for the “urgent” category:

  • TP = 80, FP = 40, FN = 20
  • Precision = 80 ÷ 120 = 0.667
  • Recall = 80 ÷ 100 = 0.800
  • F1 = 2 × (0.667 × 0.800) ÷ (0.667 + 0.800) = 1.067 ÷ 1.467 = 0.727

Now compare two models:

ModelPrecisionRecallArithmetic meanF1
A0.950.550.750.70
B0.730.720.7250.72

By arithmetic mean A looks better; by F1 B wins, because it is balanced. Whether that is the right conclusion depends on your costs, which is the key caveat below.

F-beta: weighting one side

When one error type matters more, use F-beta:

Fβ = (1 + β²) × (precision × recall) ÷ (β² × precision + recall)

VariantβEffectUse when
F0.50.5Weights precision twice as muchFalse alarms are expensive
F11Equal weightBoth matter similarly
F22Weights recall twice as muchMissing cases is expensive

Medical screening often uses F2; spam filtering often uses F0.5.

Multi-class averaging

AverageHow it worksUse when
Macro F1Mean of per-class F1 scores, unweightedRare classes matter as much as common ones
Weighted F1Weighted by class supportYou want overall performance reflecting class sizes
Micro F1Pools TP, FP and FN across classesEquivalent to accuracy in single-label problems

Macro F1 is usually the honest choice for imbalanced business problems, because it refuses to let a large easy class hide failure on a small important one.

When F1 is the wrong metric

  • The error costs are unequal. F1 assumes precision and recall matter equally. If a missed fraud costs ₹8,000 and a false alarm costs ₹500, a cost-weighted metric is better.
  • True negatives matter. F1 ignores them entirely; consider the Matthews correlation coefficient (MCC), which uses all four confusion matrix cells.
  • You want threshold-independent comparison. Use PR-AUC or ROC-AUC instead.
  • You need calibrated probabilities. Use log loss or calibration plots.
  • Regression problems. F1 does not apply; use MAE or RMSE.

Practical guidance

  • Report precision, recall and F1, never F1 alone.
  • State the threshold and the averaging method used.
  • Use F-beta when costs are clearly asymmetric.
  • Compare against a sensible baseline, such as always predicting the majority class.
  • Compute F1 per subgroup to check for uneven performance.

Limitations

  • Assumes equal importance of precision and recall.
  • Ignores true negatives, so it cannot express the value of correct rejections.
  • Tied to a single threshold.
  • A single number inevitably hides where a model fails.

Common Use Cases

01

Imbalanced classification

Summarise performance where accuracy misleads.

02

Model comparison

Rank candidate models on one balanced metric.

03

Information extraction

Measure entity and field extraction quality.

04

Search and retrieval

Evaluate relevance at a fixed cut-off.

05

Content moderation

Track detection quality across categories with macro F1.

06

Threshold selection

Find the operating point maximising F1 or F-beta.

Frequently Asked Questions

The harmonic mean of precision and recall, giving a single balanced measure of classification performance.

It depends on the task and baseline. Compare against a majority-class baseline rather than using a fixed target.

Because it is dominated by the lower value, so a model that fails on precision or recall cannot score well.

Macro averages per-class F1 equally; micro pools counts across classes and equals accuracy in single-label tasks.

When error costs differ substantially, when true negatives matter, or when you need threshold-independent comparison.

Related Terms

  • Precision and Recall
  • Confusion Matrix
  • Classification
  • AI Classification
  • Model Evaluation
  • AI Benchmarking

Related AI Terms

What is Hyperparameter Tuning?Hyperparameter tuning is the process of systematically searching for the configuration values that make a model perform best…What is L2 Regularization?L2 regularization adds a penalty equal to the sum of the squared weights, shrinking all weights smoothly towards…What is L1 Regularization?L1 regularization, known as lasso in linear models, adds a penalty equal to the sum of the absolute…What is Cross-Validation in Machine Learning?Cross-validation is a technique that repeatedly splits data into training and validation parts, rotating which part is held…What is Stochastic Gradient Descent (SGD)?Stochastic gradient descent (SGD) updates a model's weights using one example or a small batch at a time…What is the Bias-Variance Tradeoff?The bias-variance tradeoff describes how a model's error splits into bias from overly simple assumptions and variance from…

Contents

  1. 01Key takeaways
  2. 02F1 explained in simple terms
  3. 03Why the harmonic mean
  4. 04A worked example
  5. 05F-beta: weighting one side
  6. 06Multi-class averaging
  7. 07When F1 is the wrong metric
  8. 08Practical guidance
  9. 09Limitations
  10. 10Common Use Cases
  11. 11Frequently Asked Questions
  12. 12Related Terms

AI Topic

  • Machine Learning

Related Terms

  • What is Hyperparameter Tuning?
  • What is L2 Regularization?
  • What is L1 Regularization?
  • What is Cross-Validation in Machine Learning?
  • What is Stochastic Gradient Descent (SGD)?
  • What is the Bias-Variance Tradeoff?

Quick Navigation

  • Common Use Cases
  • Frequently Asked Questions
  • Related Terms
  • Back to top

Details

Updated
October 2, 2026
Read
3 min
  • Forum
  • Submit a tool
  • Submit Guest Post
  • List Your Startup
  • Privacy Policy
  • Editorial Policy
  • Account
  • Contact
  • AI Productivity
  • AI Video
  • AI Coding
  • AI Chatbots
  • Sales
  • AI Business
  • View All Tools

Subscribe our Newsletter

Get weekly exclusive content - No spam.

Copyright © 2026 -  Query Feedz

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}