Skip to content
Omnikalc

Attributable risk calculator: how much of the risk is due to the exposure?

Enter the risk in an exposed and an unexposed group and the exposed share of the population to get the risk difference, the relative risk, the attributable fractions and the number needed to harm.

Updated on

Educational tool, not medical advice: this page does not diagnose and does not replace a doctor, nurse or pharmacist. It has not been reviewed by a healthcare professional. Editorial and medical policy

Your inputs
%

Value out of range

%

Value out of range

%

Value out of range

Results

Attributable fraction among the exposed

66.7%

Attributable risk (risk difference)
8.0 points
Relative risk
3.00
Population attributable fraction
37.5%
Number needed to harm
12.5

This calculator is for general information and education. It is not medical advice and does not replace the advice of your doctor or a registered dietitian.

Attributable risk tells how much of the risk of an outcome can be linked to an exposure, such as smoking or a workplace hazard. The attributable risk calculator takes the risk in an exposed group, the risk in an unexposed group and the share of the population exposed and gives the risk difference, the relative risk, the attributable fraction among the exposed, the population attributable fraction and the number needed to harm.

How the calculation works

  • Attributable risk = risk in the exposed group − risk in the unexposed group. It is the excess risk linked to the exposure, in percentage points.
  • Relative risk = risk in the exposed ÷ risk in the unexposed.
  • Attributable fraction among the exposed = (risk exposed − risk unexposed) ÷ risk exposed, the share of the cases in the exposed group that would not occur without the exposure.
  • Population attributable fraction = p × (RR − 1) ÷ (1 + p × (RR − 1)), where p is the share of the population exposed. The number needed to harm is 100 ÷ attributable risk (in points).

Example

If 12% of an exposed group and 4% of an unexposed group develop a condition, the attributable risk is 12 − 4 = 8 percentage points and the relative risk is 12 ÷ 4 = 3.00. Among the exposed, (12 − 4) ÷ 12 = 66.7% of the cases are attributable to the exposure. If 30% of the population is exposed, the population attributable fraction is 0.3 × 2 ÷ (1 + 0.3 × 2) = 37.5%, and one extra case occurs for every 12.5 people exposed.

Why it matters

Relative risk alone can mislead, since a high ratio on a rare outcome means few extra cases. The attributable measures turn a study result into a count of cases and a share of the burden, which is what public health decisions need.

Good to know

The calculation is simple arithmetic and assumes that the numbers come from a sound study and that the exposure causes the outcome. It does not account for confounding, follow-up time or the precision of the estimates. Confidence intervals are not given. Take medical decisions with a professional.

The relative risk calculator gives the ratio of two risks and the number needed to treat calculator translates a risk reduction into people treated.

Frequently asked questions

What is the difference between relative risk and attributable risk?

Relative risk is a ratio and tells how many times more likely the outcome is with the exposure. Attributable risk is a difference and tells how many extra cases there are. A relative risk of 3 can be a small public health issue if the outcome is rare, and a large one if it is common.

What does the population attributable fraction mean?

It is the share of all cases in the population that would be avoided if the exposure were removed, assuming the link is causal. It depends on both the strength of the link and how common the exposure is. A weak risk factor that is very common can matter more than a strong but rare one.

Can I use odds ratios instead of risks?

For rare outcomes, odds ratios from case-control studies approximate the relative risk, and the formulas can be used as an estimate. For common outcomes the odds ratio overstates the relative risk, and it is better to work from the risks directly or from an adjusted estimate.

Does attributable mean caused?

Only if the association is causal, with no confounding or bias. The attributable fraction describes what the numbers imply if the exposure is the cause. In an observational study, other differences between the groups may explain part of the gap, so the figures should be read with that caution.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.