Calculator Inputs
Use observed counts or directly entered standardized risks.
Example Data Table
This example matches the sample values loaded by the example button.
| Group | Total participants | Outcome events | No event | Observed risk |
|---|---|---|---|---|
| Exposed | 320 | 68 | 252 | 21.25% |
| Unexposed | 340 | 37 | 303 | 10.88% |
Formula Used
Core risk ratio: RR = Risk(exposed) / Risk(unexposed)
Group risks: Risk(exposed) = a / (a + b) and Risk(unexposed) = c / (c + d)
Risk difference: RD = Risk(exposed) - Risk(unexposed)
Odds ratio: OR = (a × d) / (b × c)
Attributable fraction among exposed: AFe = (RR - 1) / RR
Population attributable fraction: PAF = (Population risk - Risk(unexposed)) / Population risk
Confidence interval: log(RR) ± z × SE(log(RR)), then exponentiated back to the RR scale.
For count data, the standard error is estimated with SE(log(RR)) = √[(1/a) - (1/n1) + (1/c) - (1/n0)].
If a zero cell appears and correction is enabled, the calculator adds 0.5 to each cell before interval estimation.
A causal interpretation needs more than arithmetic. It assumes consistency, exchangeability, positivity, accurate outcome definition, and careful handling of confounding, selection bias, and measurement error.
How to Use This Calculator
- Choose 2×2 count data when you have exposed and unexposed totals with event counts.
- Choose Direct risk entry when you already have adjusted risks from standardization or modeling.
- Set the confidence level and decimal precision you want in the output.
- Turn on continuity correction if zero events or zero non-events may appear.
- Click Calculate Risk Ratio to show results above the form.
- Review relative and absolute measures together, not only the ratio.
- Download the results as CSV or PDF when you need reporting files.
- Use the estimate cautiously unless study design supports a causal claim.
Frequently Asked Questions
1) What does a causal risk ratio mean?
It compares outcome risk under exposure with outcome risk without exposure. It becomes causal only when study design and assumptions support a valid counterfactual comparison.
2) How is this different from an ordinary association?
An association may reflect confounding, bias, or chance. A causal risk ratio tries to isolate the exposure effect after meeting stronger identification assumptions.
3) When should I use count mode?
Use count mode for cohort summaries, trials, and simple two-group tables where you know total participants and observed events in each group.
4) When is direct risk mode helpful?
Use it when you already have standardized or model-based risks, such as marginal probabilities from inverse probability weighting or g-computation.
5) Why would I apply a continuity correction?
Zero cells can break logarithms and interval formulas. A small correction stabilizes estimation, especially in sparse data, though it slightly changes the estimate.
6) What does a risk ratio below one indicate?
It indicates lower risk in the exposed group than in the unexposed group. In some contexts, that may suggest a protective effect.
7) Should I focus only on the confidence interval?
No. Review the point estimate, interval width, absolute risk difference, study quality, and possible bias before drawing a scientific conclusion.
8) Can this tool prove causation by itself?
No. The calculator summarizes evidence numerically. Causation depends on design quality, subject knowledge, assumptions, and bias control beyond the calculation.