Positive and Negative Predictive Values for a test

Input Values


Use this to calculate the positive and negative predictive values for a test of known sensitivity and specificity for a range of prior probabilities of infection.

Inputs required

  • Test unit sensitivity;
  • Test unit specificity; and
  • Prior probability of infection.


  • Positive (PPV) and negative (NPV) predictive values for given inputs; and
  • Table and plot of PPV and NPV for given sensitivity and specificity values and varying prior probability of infection.


PPV = p x Se/(p x Se + (1 - p) x (1 - Sp))
NPV = (1 - p) x Sp/((1 - p) x Sp + p x (1 - Se))

  • p = Prior probability of infection
  • Se = Test unit sensitivity
  • Sp = Test unit specificity


Sergeant & Perkins, 2016. Epidemiology for Field Veterinarians: an Introduction. CABI, Wallingford, UK. pp 95-98.
Thrusfield, 1995, Veterinary Epidemiology, 2nd ed. Blackwell Science Ltd, Oxford, UK. pp 277-279.


Excel example
R function
Validity and accuracy
Test sensitivity, test specificity and prior probability of infection:
  Sensitivity Specificity
Prior probability of infection (prevalence)


  Home  |   About this site  |   Glossary   |   References   |   Links   |  131 recent calculations

This site was created by Ausvet with funding from a range of sources.
It provides a range of epidemiological tools for the use of researchers and epidemiologists, particularly in animal health.
Please send any comments, questions or suggestions to Evan Sergeant
© 2017 Ausvet