Skip to content

Confusion Matrix Calculator

Statistics
0.0(0)

Evaluates the performance of a classification model using metrics derived from a confusion matrix, including accuracy, precision, recall, and specificity.

How To Use

How to use this calculator

Start with your values, or try a preset.

Step 1

Enter True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN) in the units shown.

Step 2

Read Specificity, Recall (Sensitivity), Precision, Accuracy, and F1 Score in the results panel. Results update as you change the inputs.

Step 3

Choose a preset to load an example, then adjust the values for your situation.

Worked Examples

Example calculations

See the inputs and their calculated results.

Good Performance

True Positives (TP): 90 count; False Positives (FP): 10 count; True Negatives (TN): 85 count; False Negatives (FN): 5 count

Specificity: 0.8947368421 percentage; Recall (Sensitivity): 0.9473684211 percentage; Precision: 0.9 percentage; Accuracy: 0.9210526316 percentage; F1 Score: 0.9230769231 percentage

Moderate Performance

True Positives (TP): 60 count; False Positives (FP): 20 count; True Negatives (TN): 50 count; False Negatives (FN): 10 count

Specificity: 0.7142857143 percentage; Recall (Sensitivity): 0.8571428571 percentage; Precision: 0.75 percentage; Accuracy: 0.7857142857 percentage; F1 Score: 0.8 percentage

High False Positives

True Positives (TP): 70 count; False Positives (FP): 30 count; True Negatives (TN): 40 count; False Negatives (FN): 10 count

Specificity: 0.5714285714 percentage; Recall (Sensitivity): 0.875 percentage; Precision: 0.7 percentage; Accuracy: 0.7333333333 percentage; F1 Score: 0.7777777778 percentage

Inputs
Explore the topic

Explore More Math & Statistics Calculators

Use calculators for algebra, geometry, trigonometry, probability, statistics, averages, z-scores, tests, and graphing tasks.

Explore tools
People Also Calculate

Related Calculators

Continue with another tool on a related topic.

Statistics

T-Test Calculator

Runs a two-sided one-sample, independent Welch, or paired t-test. For paired data, enter the mean, standard deviation and count of within-pair differences as sample 1, and use the hypothesized mean difference (usually 0). Use 2 to 1,000,000 observations per active sample, means from −10¹² to 10¹², sample standard deviations from 10⁻¹² to 10¹², and 0 < alpha < 1. Observations or paired differences should be independent, and approximately normal in small samples. Very small probabilities can round to zero.

1,419 viewsOpen calculator
Statistics

Inverse Normal Distribution Calculator

Estimate the value at a cumulative percentile of a normal distribution using the Acklam rational inverse-normal approximation. Enter percentile from 0.0001% through 99.9999%, a finite mean from -1,000,000,000,000 through 1,000,000,000,000, and a positive standard deviation from 0.000001 through 1,000,000,000,000. Mean and standard deviation must use the same units, and the returned value uses that unit. The probability tails are intentionally bounded away from 0% and 100%; exact endpoints have no finite normal quantile. Results are approximations using binary64 arithmetic, not exact quantiles.

1,341 viewsOpen calculator
Statistics

Chi-Square Goodness-of-Fit Calculator

Pearson goodness-of-fit test for 2 to 10 mutually exclusive categories. Enter observed counts and expected counts for each category; set the category count to the number actually used. The active observed and expected totals must match within 1e-8 relative tolerance. Expected counts must each be at least 5; observed counts may be zero. Expected values are fixed before sampling and no distribution parameters are estimated. Assumes independent categorical observations. The statistic is Σ(O−E)²/E and degrees of freedom are k−1. The upper-tail p-value uses a chi-square approximation; for odd degrees of freedom it uses a stable erfc approximation. Against an independent gamma-tail reference, the 81 checked combinations of df 1–9 and χ² values 0, 0.2, 1, 4, 5, 10, 20, 25, 50 and 100 had maximum relative error 8.9e-8; this describes that tested grid, not a universal bound. P-values are supported for chi-square statistics from 0 through 100; above 100 the calculator reports unsupported instead of underflowing. P-values display in compact scientific notation to 7 significant digits. The p-value is not the probability that the null model is true. This tests goodness-of-fit, not contingency-table independence.

1,266 viewsOpen calculator
Statistics

Outlier Calculator

Identifies potential outliers in a dataset using the IQR * 1.5 rule (calculating fences).

1,214 viewsOpen calculator