Accuracy Calculator

Use this free Accuracy Calculator to calculate classification accuracy, sensitivity, specificity, and percent error. Choose the method that matches your data, enter the required values, and get your results automatically. It is useful for checking classification models, test results, and measurement accuracy.

Choose Calculation Method

Confusion Matrix Values

Correctly predicted positives.
Correctly predicted negatives.
Incorrectly predicted positives.
Missed actual positives.

Results update automatically when you change an input or select a different calculation method.

Calculation Results

Classification Accuracy
85.00%
The proportion of all predictions that are correct.
Correct Predictions
170
Total Predictions
200
Sensitivity
80.00%
Specificity
90.00%
Formula: Accuracy = (TP + TN) ÷ (TP + TN + FP + FN) × 100
Enter your values to calculate the result.

How to Use the Accuracy Calculator

Using the Accuracy Calculator is simple. Choose one of the three methods and enter the required values. The calculator updates your results automatically.

  • Standard Method: Enter true positives, false positives, false negatives, and true negatives to calculate accuracy, sensitivity, and specificity.
  • Prevalence Method: Enter sensitivity, specificity, and prevalence to estimate overall accuracy.
  • Percent Error Method: Enter the observed value and accepted value to calculate percent error and the corresponding accuracy estimate.

Click Clear All to remove the current inputs while keeping your selected method. Use Reload Calculator to reset the calculator and return to the Standard Method.

Accuracy Calculator Example

Suppose a classification model produces these results:

InputValue
True Positive (TP)80
False Positive (FP)10
False Negative (FN)5
True Negative (TN)105

The calculator uses these values to find the following results:

ResultCalculationAnswer
Accuracy(TP + TN) ÷ Total × 10092.50%
SensitivityTP ÷ (TP + FN) × 10094.12%
SpecificityTN ÷ (TN + FP) × 10091.30%

In this example, the model correctly classifies 92.50% of all cases. Sensitivity shows how well it identifies positive cases, while specificity shows how well it identifies negative cases.

Accuracy Calculator Formulas

1. Standard Accuracy Formula

Accuracy = (TP + TN) ÷ (TP + TN + FP + FN) × 100

2. Sensitivity Formula

Sensitivity = TP ÷ (TP + FN) × 100

3. Specificity Formula

Specificity = TN ÷ (TN + FP) × 100

4. Prevalence-Based Accuracy Formula

Accuracy = (Sensitivity × Prevalence) + (Specificity × (1 − Prevalence))

For this formula, sensitivity, specificity, and prevalence are converted from percentages to decimal values before calculation.

5. Percent Error Formula

Percent Error = |Observed Value − Accepted Value| ÷ |Accepted Value| × 100

The calculator also estimates accuracy as 100% minus percent error. This is a useful comparison measure, but it is not the same as classification accuracy.

Frequently Asked Questions

What is accuracy?

Accuracy is the percentage of predictions or classifications that are correct out of all cases evaluated. It is commonly used to assess classification models and test results.

What is the difference between accuracy, sensitivity, and specificity?

Accuracy measures the proportion of all predictions that are correct. Sensitivity measures how well positive cases are identified, while specificity measures how well negative cases are identified.

Can accuracy be misleading?

Yes. A model can have high accuracy when most cases belong to one class, even if it performs poorly on the less common class. Sensitivity, specificity, and other performance measures can provide a more complete picture.

When should I use the percent error method?

Use it when you want to compare an observed measurement with an accepted or reference value. It measures the relative difference between those two values rather than the performance of a classification model.

Note: This calculator is intended for general educational and analytical use. Results depend on the values entered and the selected method.

Related Tools

Scroll to Top