Accuracy Calculator

Calculate accuracy using three methods: the confusion matrix method (enter True Positives, True Negatives, False Positives, and False Negatives), the sensitivity/specificity method (enter Sensitivity, Specificity, and Prevalence), or the percent error method (enter Observed Value and True Value). You get back the Accuracy percentage along with supporting metrics like Sensitivity, Specificity, and Percent Error.

Number of correctly predicted positive cases.

Number of correctly predicted negative cases.

Number of negative cases incorrectly predicted as positive.

Number of positive cases incorrectly predicted as negative.

%

Percentage of actual positives correctly identified.

%

Percentage of actual negatives correctly identified.

%

Proportion of the population that has the condition.

The value you measured or obtained experimentally.

The known or accepted reference value.

Results

Accuracy

--

Sensitivity

--

Specificity

--

Percent Error

--

Total Samples

--

Prediction Breakdown

Frequently Asked Questions

How do you calculate accuracy percentage?

Accuracy percentage is calculated as (True Positives + True Negatives) / (True Positives + True Negatives + False Positives + False Negatives) × 100. This gives the proportion of all predictions that were correct. A higher accuracy percentage means the model or test performs better overall.

What is accuracy in statistics and machine learning?

In statistics and machine learning, accuracy measures how often a classifier or diagnostic test produces the correct result. It is the ratio of correct predictions (both true positives and true negatives) to the total number of observations. While useful, accuracy can be misleading with imbalanced datasets where one class heavily dominates.

What is the difference between accuracy and precision?

Accuracy refers to how close a measured or predicted value is to the true value, while precision refers to how consistent or repeatable measurements are. A highly precise measurement can still be inaccurate if there is a systematic bias. In machine learning, precision specifically means TP / (TP + FP), which is different from overall accuracy.

What is accuracy in chemistry?

In chemistry, accuracy describes how close an experimental measurement is to the accepted or true value. It is commonly expressed as percent error: |Observed − True| / True × 100. A lower percent error indicates a more accurate measurement.

What is the accuracy if the sensitivity is 80% and the prevalence is 50%?

Using the formula Accuracy = (Sensitivity × Prevalence) + (Specificity × (1 − Prevalence)), with Sensitivity = 80%, Specificity = 90%, and Prevalence = 50%, the accuracy = (0.80 × 0.50) + (0.90 × 0.50) = 0.40 + 0.45 = 0.85, or 85%.

Can accuracy be negative?

No, accuracy cannot be negative. In the confusion matrix method, accuracy is always between 0% and 100% since it is a ratio of counts. Percent error, while not the same as accuracy, is also expressed as an absolute value and is always non-negative.

Can accuracy be used for imbalanced datasets?

Accuracy can be misleading for highly imbalanced datasets. For example, if 95% of samples belong to one class, a model that always predicts that class achieves 95% accuracy without learning anything useful. In such cases, metrics like F1 score, precision, recall, or the Matthews correlation coefficient are more informative.

How do I calculate accuracy from a confusion matrix?

From a confusion matrix, identify the four values: True Positives (TP), True Negatives (TN), False Positives (FP), and False Negatives (FN). Then apply: Accuracy = (TP + TN) / (TP + TN + FP + FN). Multiply by 100 to express as a percentage.

More Statistics Tools