Accuracy Calculator

Created by Łucja Zaborowska, MD, PhD candidate and Wei Bin Loo
Reviewed by Bogna Szyk and Jack Bowater
Last updated: Jan 18, 2024

Our accuracy calculator is a simple tool that allows you to compute accuracy using three different methods. While the first two methods are widely used in the evaluation of diagnostic tests, the third one can be applied to a wide range of sciences ⚗️

A few minutes spent on the article below will teach you the use of accuracy in statistics, the fundamental differences between accuracy and precision, as well as all the formulas used in accuracy calculations.

🙋 Following the topic, you may also find Omni's sensitivity and specificity calculator helpful.

How to use the accuracy calculator?

Calculating accuracy requires different solutions for different problems. Carefully read carefully the instruction below and decide which method is the best for your situation:

Take a look at your data:

  1. Are you calculating the accuracy of a diagnostic test?

    • If the ratio of patients with the disease and patients without the disease does reflect the prevalence of the illness, use the standard method #1.

    • If the ratio of patients with the disease and patients without the disease does not reflect the prevalence of the illness, use the prevalence method #2.

  2. Are you trying to find accuracy using simple percent error?

    • Use the percent error method #3.

💡 Our calculator will automatically calculate the sensitivity and specificity of a test needed for method #2 once you enter all the values of true negative/positive and false negative/positive for method #1.

Have you already found what you need? Try our other useful statistics tools:

How to calculate accuracy percentage?

Follow our simple tutorial to learn how to measure accuracy in all possible situations:

  1. Standard accuracy equation for a diagnostic test, used in method #1

    Used if the ratio of patients with the disease (true positive, false negative) and patients without the disease (true negative, false positive) reflects the prevalence of the illness.

    Accuracy = (TP + TN) / (TP + TN + FP + FN),


    • TP - true positive;
    • TN - true negative;
    • FP - false positive; and
    • FN - false negative.
  2. Formula for calculating accuracy based on prevalence - method #2

    Accuracy = ((Sensitivity) × (Prevalence)) + ((Specificity) × (1 - Prevalence)),


    • Sensitivity = TP / (TP + FN), given in %;
    • Specificity = TN / (FP + TN), given in %; and
    • Prevalence - the amount of population that has the disease at a specific time, given in %.
  3. Percent error/ percent accuracy formula - method #3

    Percent error = (|(Vo - Va)|/Va) × 100,


    • Vo - Observed value;
    • Va- Value accepted as truth; and
    • |(Vo - Va)| - is the absolute, non-negative value.

This informs us about the accuracy of a reading - how much the observed value derives from the truth.

The greater the error, the lower the accuracy.

Accuracy calculation example:

We're trying out our new thermometer. Our measured temperature is equal to 95°F. We know that our average temperature is equal to 97.8°F.

Let's use method #3:

  • Observed value: 95
  • Accepted value: 98.7

Percent error = (|95 - 97.8| / 97.8) × 100 = (2.8 / 97.8) × 100 = 0.0286 × 100 = 2.86%

Accuracy vs. precision

Accuracy measures how close a given value is to the truth (or the value agreed on and confirmed by many scientists).

Precision measures how close the given measurements are to each other. In other words, it describes how much a given result repeats - its reproducibility.

Chart for accuracy and precision.

What is accuracy in chemistry?

Accuracy in chemistry requires calibration. The analytic method has to be first compared against a known standard.

The standard of a given substance must be pure, must not contain any water molecules, and must be stable.

Calibration is the process of comparing the results obtained with our device against the device of known and confirmed quality. Titration can be a nice example of the calibration process.


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

The accuracy is 50%. You can calculate his using this formula: accuracy = (sensitivity × prevalence) + (specificity × (1 - prevalence)).

How can I calculate the accuracy based on values in the confusion matrix?

You can calculate the accuracy in five steps:

  1. Calculate the true positives (TP)
  2. Compute the true negatives (TN)
  3. Calculate the false positives (FP)
  4. Estimate the false negatives (FN)
  5. Apply the accuracy formula:
    accuracy = (TP + TN) / (TP + TN + FP + FN)

Can accuracy be negative?

No, the accuracy cannot be negative. It is a ratio of correct predictions to total predictions and will always fall within the 0% to 100% range.

Can accuracy be used for imbalanced datasets?

While accuracy can be used with imbalanced datasets, it might not provide an insightful measure if the classes are highly skewed. In such cases, metrics like precision, recall, or the F1 score might be more informative.

Łucja Zaborowska, MD, PhD candidate and Wei Bin Loo
Visit our sensitivity and specificity calculator for more detailed data and other types of calculations on diagnostic tests.
Standard method #1
True positive
False negative
False positive
True negative
Prevalence method #2
Percent error method #3
Observed value
Accepted value
Percent error
Check out 32 similar journalist's guide calculators
AveragePercentagePercentage change… 29 more
People also viewed…

Coefficient of variation

The coefficient of variation calculator is a convenient way to describe the standard deviation as a percentage of the mean.

Korean age

If you're wondering what would your age be from a Korean perspective, use this Korean age calculator to find out.


The mode calculator finds the modal value for your dataset.

Plant spacing

Optimize your garden layout with our garden spacing calculator. Perfect for precise plant spacing. Plan your dream garden effortlessly now!
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service