Relative Risk Calculator
This relative risk calculator takes the four cells of a cohort study. Example: 30 of 100 exposed and 15 of 100 unexposed people fall ill, which gives RR = 2 with a 95% confidence interval of 1.149 to 3.482.
Example: Exposed with event (a) 30 · Exposed without event (b) 70 · Unexposed with event (c) 15 · Unexposed without event (d) 85 → Result: Relative risk RR = 2 (95% CI: 1.149 to 3.482). Source: Wikipedia – Relative risk. Updated: .
How it is calculated
The relative risk (risk ratio) compares how likely an event is in two groups: it divides the risk in the exposed group by the risk in the unexposed group.
Formula and working
From the 2×2 table, R₁ = a / (a + b) and R₀ = c / (c + d). The relative risk is RR = R₁ / R₀. The confidence interval is built on the log scale because ln(RR) is approximately normal: SE = √(1/a − 1/(a + b) + 1/c − 1/(c + d)), limits = exp(ln RR ± 1.96 · SE). Converting back with the exponential makes the interval asymmetric.
Worked example
In a cohort, 30 of 100 exposed people fall ill (R₁ = 0.3) and 15 of 100 unexposed people (R₀ = 0.15). So RR = 0.3 / 0.15 = 2. The standard error is √(1/30 − 1/100 + 1/15 − 1/100) = √0.08 = 0.282843, and ln 2 = 0.693147. The interval runs from exp(0.693147 − 0.554372) = 1.149 to exp(0.693147 + 0.554372) = 3.482. Because 1 lies outside it, the data point to a raised risk.
How to read the result
RR = 1 means equal risk, above 1 a higher and below 1 a lower risk in the exposed group. The relative risk needs group sizes that were truly observed, as in cohort studies or trials. In case-control studies the number of cases is fixed by design, so only the odds ratio is valid.
- The risk difference 0.15 and the NNT 6.66667 show the absolute effect: about 7 people must be exposed for one extra case.
- Small cells (below 5) make the interval unreliable; exact methods are better then.
Frequently asked questions
How do you calculate relative risk?
Divide the risk in the exposed group, a / (a + b), by the risk in the unexposed group, c / (c + d). With 30 of 100 against 15 of 100 this gives 0.3 / 0.15 = 2.
What does the 95% confidence interval tell me?
It shows how uncertain RR is because of sampling. If it contains 1, a difference is not established; if it lies entirely above 1 (here 1.149 to 3.482), the risk is clearly raised.
How does it differ from the odds ratio?
The odds ratio compares odds a/b and c/d, the relative risk compares probabilities. For rare events the two are close; for common events the odds ratio exaggerates.
Sources and legal basis
As of: · Editorial policy
Related tools
- Chi Square Test CalculatorChi square test calculator for contingency tables and goodness of fit: chi², degrees of freedom, p-value, expected counts and Cramér’s V, with all steps.
- Confidence Interval CalculatorConfidence interval calculator for a mean (t or z) and a proportion (Wilson): with margin of error, critical value, steps and a 90, 95 or 99 percent level.
- Probability calculatorProbability calculator: favourable over possible outcomes, two events, repeated trials (binomial) and drawing without replacement, like a lottery.
- P-Value CalculatorP-value calculator from a z-score, t-score or chi-square, or straight from a t-test with means, SDs and n – plus critical value and confidence interval.
- Percentage CalculatorFree percentage calculator: find X% of a number, what percent one number is of another, percentage change, increase and discount – with formula and steps.
- Standard deviation calculatorStandard deviation calculator for a list or frequency table: switch between sample (s) and population (σ), see every step in a table, plus a box plot.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Dependency ratio calculatorDependency ratio calculator: young and older people per 100 people of working age – total, youth and old-age dependency ratio with formulas and examples.
- Easy grader for teachersEasy grader for teachers: enter the number of questions and how many were wrong to get the percentage and letter grade, plus a full grading chart to print.