Skip to content
CIC Prep

Free tool · CIC® exam topic

Relative risk calculator

Enter a cohort or outbreak 2×2 table to get the attack rate in each group, the relative risk with its 95% CI, and the risk difference.

Cohort / outbreak 2×2 table
IllNot ill
Exposed
Not exposed

Example: 30 of 100 people who ate the suspected food became ill, compared with 10 of 100 who did not.

Result

Relative risk (risk ratio)
3.00
95% confidence interval
1.55 – 5.80
Attack rate, exposed
30.0%
Attack rate, not exposed
10.0%
Risk difference
20.0 percentage points
Attributable fraction (exposed)
66.7%

The exposed group had 3.00 times the risk of illness of the unexposed group. The 95% confidence interval does not include 1, so the association is statistically significant at the 5% level.

What is relative risk?

Relative risk compares the risk of illness in an exposed group with the risk in an unexposed group. CDC defines the risk ratio as “risk of disease in group 1 ÷ risk of disease in group 2”. In an outbreak, each group’s risk is its attack rate.

Relative risk formula

IllNot illTotal
Exposedaba + b
Not exposedcdc + d

Relative risk = [a ÷ (a + b)] ÷ [c ÷ (c + d)]

The 95% confidence interval uses the log method: exp(ln RR ± 1.96 × √(1/a − 1/(a+b) + 1/c − 1/(c+d))).

Worked example

30 of 100 exposed people became ill (attack rate 30.0%) compared with 10 of 100 unexposed people (10.0%). The relative risk is 30% ÷ 10% = 3.00 (95% CI 1.55 – 5.80). The risk difference is 20.0 percentage points, and the attributable fraction among the exposed is 66.7%.

How to interpret it

  • RR = 1: identical risk in both groups — no association.
  • RR > 1: increased risk in the exposed group.
  • RR < 1: decreased risk in the exposed group (possibly protective).
  • A 95% confidence interval that excludes 1 indicates a statistically significant association.

Test yourself: a CIC-style question

During an outbreak investigation, the relative risk comparing exposed with unexposed patients is 4.2, with a 95% confidence interval of 1.8–9.7. What can you conclude?

  1. The exposure is not associated with illness because the interval is wide
  2. The exposure is significantly associated with illness; exposed patients had 4.2 times the risk
  3. The study must be repeated because the interval includes values above 1
  4. The association is moderate but not statistically significant
Show answer

B. The exposure is significantly associated with illness; exposed patients had 4.2 times the risk

A relative risk of 4.2 means the exposed group had 4.2 times the risk of the unexposed group. The 95% confidence interval (1.8–9.7) does not include 1.0, so the association is statistically significant.

Questions like this come up in the Surveillance and Epidemiologic Investigation domain of the CIC® exam. The 654 questions in the app each come with a written explanation.

FAQ

Is relative risk the same as risk ratio?
Yes. Relative risk (RR) and risk ratio are the same measure: the risk (attack rate) of illness in the exposed group divided by the risk in the unexposed group.
When can I calculate a relative risk?
When you know how many people were exposed and unexposed and how many in each group became ill — a cohort study, or an outbreak in a defined group such as a ward or a banquet. If you selected people because they were ill or well (a case-control study), use the odds ratio instead.
What is the attributable fraction?
The attributable fraction among the exposed, (RR − 1) ÷ RR, estimates the share of illness in the exposed group that is due to the exposure, assuming the association is causal. It is shown only when RR is above 1.

Sources

  1. CDC. Principles of Epidemiology (SS1978), Lesson 3, Section 5: Measures of Association
  2. CDC. Principles of Epidemiology in Public Health Practice (SS1978), Lesson 3: Measures of Risk

Checked against these sources on October 21, 2026. For education and CIC® exam preparation only — not a substitute for your facility’s policies, NHSN’s official reports, or clinical judgment. Calculations run in your browser; nothing you enter is sent anywhere.

* Pass Guarantee Program terms