Advertisement
Advertisement
HEALTH

Relative Risk Calculator — with the absolute risk it hides

Enter a two-by-two table and get the relative risk, the odds ratio and their confidence intervals alongside the absolute risks the ratio is built from.

Cell a. People in the exposed or treated group who had the outcome.
Cell b. The rest of the exposed group.
Cell c. People in the unexposed or control group who had the outcome.
Cell d. The rest of the control group.
Natural frequencies are read more accurately than percentages. Per 10,000 suits rare outcomes.
Relative risk (risk ratio)
 
Absolute risk, exposed
Absolute risk, control
Absolute risk difference
Number needed to treat
Exposed
Control
Tip: read the relative figure and the absolute figure together, always. A relative risk of 1.5 is the same ratio whether the underlying risk moves from 2 to 3 in 10,000 or from 20 to 30 in 100, and those two situations are nothing like each other.
Advertisement

A relative risk calculator turns a two-by-two table into a single ratio, and that ratio is the most frequently misread number in health reporting. "Fifty per cent higher risk" is a relative statement. It says nothing at all about how common the outcome was to begin with, and without that starting point it cannot tell you whether the change matters. The same headline covers a shift from two cases in ten thousand people to three cases in ten thousand, and a shift from twenty cases in a hundred to thirty in a hundred. One of those is a rounding error in most people's lives. The other is enormous.

So this page is built the other way round from most. It computes the relative risk and the odds ratio properly, with confidence intervals, because those are the numbers published studies report. But it puts the absolute risks next to the ratio every time, in natural frequencies you can picture. Arb Digital builds free calculators for people who interpret numbers rather than produce them, and this one exists because the ratio alone is not an answer.

What This Relative Risk Calculator Does

You enter the four cells of a two-by-two contingency table: how many people in the exposed group had the outcome, how many did not, and the same two counts for the control group. From those four numbers it produces the absolute risk in each group, the relative risk, the absolute risk difference in percentage points, the odds ratio, and a confidence interval for both ratios.

It also produces the number needed to treat, or the number needed to harm when the exposure increases risk. That figure is the reciprocal of the absolute risk difference, and it answers the question the ratio cannot: how many people must be exposed for one additional outcome to appear.

The page is deliberately narrow in one respect. The companion absolute risk reduction calculator starts from two event rates you already know and concentrates on the reduction and the number needed to treat as its main output. This page starts from raw counts, and its main output is the ratio with the absolute figures shown as context. Use whichever matches the form your data arrives in.

How to Use It

  1. Identify the two groups. One is exposed, treated, or carries the characteristic being studied. The other is the comparison group. Which one you call "exposed" determines whether the ratio comes out above or below one.
  2. Enter the outcome counts. For each group, enter how many people had the outcome and how many did not. These are counts of people, not percentages, and the two cells for a group must add up to that group's total.
  3. Pick a frequency scale. Cases per ten thousand suits rare outcomes; per hundred is fine when the outcome is common. Choose the one that keeps the numbers readable without decimals.
  4. Choose a confidence level. Ninety-five per cent is the convention in published medicine. Ninety is wider in its claims, ninety-nine is more conservative.
  5. Read both numbers together. Note the ratio, then look at the two absolute risks underneath it. If they are both tiny, the ratio is describing a small change in a small number.

The Formula — How It's Calculated

Label the table cells a, b, c and d. Cell a is the exposed group with the outcome, b is the exposed group without it, c is the control group with the outcome, and d is the control group without it. The risk in the exposed group is a divided by (a + b). The risk in the control group is c divided by (c + d). The relative risk is the first divided by the second.

The absolute risk difference is the exposed risk minus the control risk, in percentage points. The number needed to treat or harm is one divided by the absolute value of that difference, rounded up to a whole person.

The odds ratio is a different construction: (a × d) divided by (b × c). Because odds divide events by non-events rather than by everybody, the odds ratio always sits further from one than the risk ratio for the same data, converging only when the outcome is rare.

Confidence intervals are computed on the natural logarithm of the ratio, because ratios are not symmetric around one while their logarithms are. For the relative risk, the standard error of the log is the square root of (1/a − 1/(a+b) + 1/c − 1/(c+d)). For the odds ratio it is the square root of (1/a + 1/b + 1/c + 1/d). The interval is the log ratio plus and minus the chosen multiplier times that standard error, then exponentiated back.

Worked example, using the values the page loads with. Ten thousand people in each group. Thirty outcomes among the exposed, twenty among the controls. The exposed risk is 30 ÷ 10,000 = 0.30 per cent, or 30 in 10,000. The control risk is 20 ÷ 10,000 = 0.20 per cent, or 20 in 10,000. The relative risk is 0.0030 ÷ 0.0020 = 1.50 — the "fifty per cent higher" of the headline. The absolute risk difference is 0.0030 − 0.0020 = 0.0010, which is 0.1 percentage points, or ten extra cases per ten thousand people. The number needed to harm is 1 ÷ 0.0010 = 1,000: a thousand people have to be exposed for one extra outcome to occur. Both descriptions are accurate. Only one of them is informative on its own.

Advertisement

Why the Same Ratio Can Mean Two Different Worlds

A ratio deliberately throws away the scale of the thing it describes. That is its purpose — it makes an effect comparable across studies. But it also means the ratio stays stable while the practical consequence does not.

Take a relative risk of 2.0. If the control risk is 1 in 100,000, the exposed risk is 2 in 100,000 — one extra case per hundred thousand people. If the control risk is 30 in 100, the exposed risk is 60 in 100 — thirty extra cases per hundred. The ratio is identical; the number of affected people differs thirty-thousand-fold. "Risk doubled" is compatible with both, and the reader cannot tell which.

This is why the calculator never shows a ratio without the two risks that produced it, and why the frequency scale defaults to per ten thousand: natural frequencies are read more accurately than percentages with leading zeros after the decimal point. The percentage change calculator handles relative change outside a risk context.

Relative Risk Versus Odds Ratio, and When the Gap Matters

These two are treated as interchangeable constantly, and they are not. Risk divides events by the whole group; odds divides events by non-events. When four people in ten have an outcome the risk is 0.40 but the odds are 0.67. The rarer the outcome, the smaller that gap.

The consequence is that an odds ratio always overstates a risk ratio when the outcome is common. An odds ratio of 3.0 for an outcome that occurs in forty per cent of controls corresponds to a risk ratio nearer 1.7. If a study of a common outcome reports an odds ratio and a summary reads it aloud as "three times more likely", the summary has inflated the effect substantially. The odds probability converter shows the conversion in both directions for a single figure.

Why report odds ratios at all, then? Because some designs cannot produce a risk ratio. In a case-control study the researchers choose how many cases and controls to recruit, so the proportion with the outcome is an artefact of sampling. The odds ratio survives that; the risk ratio does not. If your data came from a case-control design, treat the risk figures here as describing your sample, not a population.

Reading the Confidence Interval Properly

The interval is not a range of plausible true values in the intuitive sense, though it is read that way almost universally. It is a range produced by a procedure that, repeated across many studies, captures the true value the stated proportion of the time. Two features matter more than the philosophy.

First, whether the interval crosses 1.0. A relative risk of 1.4 with an interval from 0.9 to 2.2 is consistent with a modest reduction as well as a substantial increase, and calling that a "forty per cent increase" is not defensible. Second, the width: intervals of 1.45–1.55 and 1.02–2.20 share a point estimate of 1.5 and carry different weight entirely. Width is driven mostly by the number of events, not participants. The confidence interval calculator covers means and proportions, and the sample size calculator works the relationship in reverse.

Number Needed to Treat: the Figure That Ends Arguments

NNT converts a statistical effect into a headcount. If an intervention drops the outcome rate from 5 per cent to 4 per cent, the absolute reduction is 1 percentage point and the NNT is 100: a hundred people take it for one of them to avoid the outcome.

The NCBI Bookshelf chapter on relative risk, absolute risk reduction, number needed to treat and confidence intervals sets out the relationship between these measures and explains why the absolute reduction is the more useful presentation for decision-making. Its worked illustration is the same shape as the one above: a benefit affecting eight children in a hundred corresponds to an NNT of roughly thirteen.

NNT depends on baseline risk, so it does not transfer between populations even when the relative risk does. A stable relative risk of 0.75 gives an NNT of 40 where baseline risk is 10 per cent and an NNT of 400 where it is 1 per cent. That is why a therapy clearly worthwhile for a high-risk group can be marginal for a low-risk one, with no disagreement about the evidence.

Where the Ratio Can Mislead Even When It Is Correct

Confounding is the first hazard. A raw table compares two groups that may differ in many ways besides the exposure, and the ratio attributes the whole difference to it. Published analyses adjust for measured confounders; a hand-built table does not.

Second, the choice of which group is the numerator. Swap the two groups and a relative risk of 1.5 becomes 0.67. Both are correct; they read very differently. Consistency about direction matters more than it looks.

Third, composite outcomes. A ratio computed over a bundle of outcomes of very different severity can be driven almost entirely by its least serious component while being described in language that implies the most serious one. The arithmetic is fine; the interpretation is not. The probability calculator and the p-value calculator answer related questions, but no calculation here detects a badly chosen outcome definition.

The StatPearls entry on relative risk from the National Library of Medicine covers the formal definitions, the distinction from absolute risk, and the study designs each measure belongs to.

Need to present numbers people will actually read correctly?

Arb Digital's free tools library covers the statistical and reporting maths behind clear communication, and our team is happy to talk through anything the tools cannot answer.

Browse Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Quoting the ratio without the baseline — "fifty per cent higher" is meaningless until you know whether the starting risk was 2 in 10,000 or 20 in 100.
  • Reading an odds ratio as a risk ratio — they only converge when the outcome is rare, and the odds ratio always exaggerates for common outcomes.
  • Ignoring an interval that crosses 1.0 — a point estimate above one with an interval spanning one is compatible with no effect at all.
  • Transplanting an NNT to a different population — NNT depends on baseline risk, so it changes even when the relative risk does not.
  • Treating an unadjusted table as causal — a two-by-two table measures association between two groups that may differ in dozens of unmeasured ways.

Related Free Tools From Arb Digital

Use the absolute risk reduction calculator when you already have two event rates and want the reduction and NNT as the headline, the odds probability converter to move a single figure between odds and probability, the confidence interval calculator for intervals around means and proportions, the sample size calculator when you are planning rather than interpreting, and the standard deviation calculator for the spread of a dataset. Everything else is in the free online tools hub.

Frequently Asked Questions

What is the difference between relative risk and absolute risk?

Absolute risk is how likely the outcome is in one group, such as 30 cases in 10,000 people. Relative risk is the ratio between the absolute risks of two groups. A relative risk of 1.5 tells you one group's risk is half again as large as the other's, but not whether either risk was large to begin with.

Why does a 50% higher risk sometimes mean almost nothing?

Because fifty per cent higher describes a proportional change, not a quantity. If the baseline risk is 2 in 10,000, a fifty per cent increase takes it to 3 in 10,000 — one extra case per ten thousand people. The same ratio applied to a baseline of 20 in 100 produces ten extra cases per hundred people.

When should I use the odds ratio instead of the relative risk?

Use the odds ratio when the study design cannot produce a valid risk, which is the case for case-control studies where the researchers chose how many cases and controls to recruit. In that design the proportion with the outcome is an artefact of sampling, so an absolute risk cannot be computed from it.

What does number needed to treat mean?

It is the reciprocal of the absolute risk difference and it states how many people must be exposed or treated for one additional outcome to occur or be prevented. An absolute difference of one percentage point gives a number needed to treat of one hundred.

Can I use this number needed to treat figure for a different group of people?

No. Number needed to treat depends on the baseline risk of the group it was calculated in. The same relative risk produces a very different number needed to treat in a high-risk population and a low-risk one, which is why a worthwhile treatment for one group can be marginal for another.

What happens if one of the four cells is zero?

The logarithm used for the confidence interval is undefined when a cell is zero, so the calculator adds 0.5 to every cell and notes that it has done so. The resulting interval is an approximation and should be treated as indicative rather than exact.

Does a confidence interval that crosses 1.0 mean there is no effect?

It means the data are compatible with no effect as well as with an effect in either direction. It is not proof that no effect exists, and a wide interval usually reflects a small number of events rather than a well-established null result.

Does this calculator prove that the exposure caused the outcome?

No. It measures an association between two groups from the counts you enter. Those groups may differ in many ways besides the exposure, and an unadjusted two-by-two table cannot separate the exposure from anything else that differs between them.

This tool performs epidemiological arithmetic on figures you supply. It is not medical advice, it does not assess any individual's risk, and it cannot interpret a study on your behalf. Any question about your own health or about what a published result means for you should go to a qualified clinician.

Advertisement
Advertisement

Take it further