Skip to main content

Confusion Matrix Calculator

Math Calculators

Accuracy/precision/recall/F1 · 8 metrics

Quick Answer

Confusion Matrix Calculator: Accuracy/precision/recall/F1 · 8 metrics. Confusion Matrix Calculator uses standard math formulas to compute accurate results instantly.

Accuracy98.0%
Precision94.4%
Recall / Sensitivity85.0%
F1 score89.5%
Specificity99.4%
FPR (false positive rate)0.6%
NPV98.4%
Total samples1000

How these metrics work

  1. 1Rows = predicted class, columns = actual class. TP/TN are correct predictions; FP (Type I) and FN (Type II) are the two error types.
  2. 2Accuracy = (TP+TN)/total = (85+895)/1000 = 98.0%.
  3. 3Precision = TP/(TP+FP)(predicted positive correctness)= 94.4%; Recall = TP/(TP+FN)(actual positives found)= 85.0%.
  4. 4F1 = 2·P·R/(P+R) — harmonic mean punishes imbalance; here F1 = 89.5%.
  • Class-imbalance trap: with 99% negatives, a lazy model predicting "always negative" scores 99% accuracy but 0% recall — always report precision/recall too.
  • Precision vs recall trade-off: raising the classification threshold raises precision and lowers recall; F1 balances both, Fβ (β>1) weights recall more.
  • Sensitivity = recall (TP rate); specificity = TN rate. Medical screening favors high sensitivity (miss few patients), confirmatory tests favor high precision.
  • Confusion matrix extends beyond 2×2 to multi-class (N×N); per-class precision/recall plus macro/weighted averages are reported.

Was this tool helpful?

How to Use

  1. Enter values or expressions: type directly into the Confusion Matrix Calculator — keyboard friendly.
  2. Instant results: everything computes live as you type, no button needed.
  3. Follow the steps: the result panel shows full working and formula substitution.
  4. Copy or recompute: one-click copy; change any input to recalculate instantly.

Key Points

  • Confusion Matrix Calculator is a free online math tool — open and use, no sign-up.
  • All calculations run locally in your browser; your data never leaves the device.
  • Key capability: Accuracy/precision/recall/F1 · 8 metrics.
  • Results come with formulas and reference tables so you can verify every number.

Formula & How It Works

Confusion Matrix Calculator formula

Confusion Matrix Calculator uses standard math formulas to compute accurate results instantly.

FAQ

How do I use the Confusion Matrix Calculator?
Open the page and fill in the input fields — results update automatically. Accuracy/precision/recall/F1 · 8 metrics.
Are the results accurate?
Yes. All calculations use standard mathematical formulas and are verified for accuracy.
Is it free? Do I need to sign up?
Completely free. No registration, login or download required — just open and use.
Does it work on mobile?
Yes. The responsive design works on phones, tablets and desktops.
Is my data saved?
No. All calculations run locally in your browser. Nothing is uploaded or stored.

Related Tools

Related Guides

Source & Updates

Standard mathematical formulas. All logic verified. Last updated: 2025-07

Last updated:

Formulas and content on this page are reviewed by the YiJianSuan team. For reference only — official sources prevail.

Maintained and periodically reviewed by the YiJianSuan editorial team — review process in ourEditorial Policy.

Cite this page: YiJianSuan. Confusion Matrix Calculator[EB/OL]. https://www.yijiansuan.com/en/c/math/confusion-matrix

Results provided by this tool are for reference only and do not constitute professional advice.