Odds Ratios and Relative Risks

This interactive page will compute odds ratios and relative risks based on your entries into the following 2 x 2 table:


a b

c d



Case-control: Odds ratio = (a/b)/(c/d)

95% confidence interval: to

Cohort: Relative risk = (a/(a+b)/(c/(c+d)

95% confidence interval: to

Cohort: Attributable risk (%):= 100*[(a/(a+b))-(c/(c+d))]

Cohort: Population attributable risk (%): = 100*((c/(c+d))*(odds-1.0)/(1.0 + (c/(c+d))*(odds-1.0)))

Case-control: Population attributable risk (%): = 100*((a+b)/(a+b+c+d))*(rr-1.0)/(1.0 + ((a+b)/(a+b+c+d))*(rr-1.0))

Credit: Modelled on a Javascript web page at this site
Written by Daniel E. Weeks