Micro Average F1 Calculator

Measure model performance with micro-averaged precision and recall. Switch input modes for any dataset size. Download reports, compare totals, and improve experiments quickly now.

Calculator

Responsive inputs: 3 columns large, 2 columns small, 1 column mobile.
Choose the format that matches your evaluation output.
Use β>1 to emphasize recall; β<1 to emphasize precision.
Adds a small value to avoid division by zero.

Totals

Only used for accuracy here.

Per-class counts

Micro-averaging sums TP, FP, and FN across all rows.
Class TP FP FN Action
Multi-label tip: If each label is evaluated independently, per-label (binary) counts are a natural fit for micro-averaging.

Confusion matrix

Rows are actual classes; columns are predicted classes.
Note: For single-label multiclass, micro F1 equals accuracy because FP and FN match globally.
Clear

Example Data Table

Sample per-class counts show how micro-averaging aggregates decisions across classes.

ClassTPFPFN
Positive1201822
Neutral752015
Negative601225
Total (micro)2555062
Micro F1 (from totals): 2·TP / (2·TP + FP + FN) = 2·255 / (510 + 50 + 62) ≈ 0.820257

Formula Used

Micro Precision aggregates over all classes:

Pmicro = TP / (TP + FP + ε)

Micro Recall aggregates over all classes:

Rmicro = TP / (TP + FN + ε)

Micro F1 can be computed directly from totals:

F1micro = 2·TP / (2·TP + FP + FN + ε)

Micro Fβ (optional) changes the precision/recall tradeoff:

micro = (1+β²)·TP / ((1+β²)·TP + β²·FN + FP + ε)

Micro-averaging emphasizes overall decision quality, making it robust under class imbalance when you care about global performance.

How to Use This Calculator

  1. Select an input mode that matches your evaluation output.
  2. Enter counts for TP, FP, FN (and TN when you have it).
  3. Optionally set β and ε for advanced scoring.
  4. Press Calculate to view metrics above the form.
  5. Use Download CSV or Download PDF to export results.

FAQs

1) What does micro-averaged F1 measure?

It measures global balance between precision and recall by summing TP, FP, and FN across classes or labels before computing F1.

2) When should I use micro F1 instead of macro F1?

Use micro F1 when overall performance matters more than equal weighting per class, especially with strong class imbalance or many rare labels.

3) Why can micro F1 equal accuracy for multiclass?

In single-label multiclass, every mistake creates one FP and one FN globally. That makes micro F1 simplify to TP divided by total samples.

4) How do I get TP, FP, and FN for multilabel tasks?

Compute binary counts per label, then sum TP, FP, and FN across labels. The per-class mode is designed for this workflow.

5) What does beta change in Fβ?

β controls how much recall matters relative to precision. β>1 favors recall, β<1 favors precision, and β=1 gives standard F1.

6) What is epsilon smoothing used for?

Epsilon adds a tiny value to denominators to prevent division by zero when counts are missing or very small, stabilizing calculations.

7) Can I use fractional counts?

Yes. If you have weighted samples or probabilistic counting, fractional values still work because formulas operate on totals.

8) What should I do if all counts are zero?

The metrics are undefined in practice, but this calculator returns zeros. Provide real evaluation counts or apply smoothing carefully.

Related Calculators

precision recall tablefraud detection metricsprecision recall metricsroc precision recallmodel validation metricsclassifier performance metricsmacro average f1

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.