Categorical › Contingency / proportions

2×2 RR / OR / RD / NNT calculator

The 2 × 2 calculator turns the four cell counts of an exposure × outcome table into every standard effect measure — RD, RR, OR and NNT with CIs — plus χ² and Fisher's exact p.

What is 2×2 RR / OR / RD / NNT calculator?

For any binary exposure × binary outcome study, the 2 × 2 table contains all the information. Different communities prefer different effect summaries: epidemiology favours RR, case-control studies use OR, clinical trials report RD + NNT. This calculator gives all four so you can match the convention of your field.

When the outcome is common (> 10% incidence), OR overstates RR — this is the famous 'OR ≠ RR' pitfall in observational research. For common outcomes, prefer RR / RD over OR. For rare outcomes, OR ≈ RR.

When should I use 2×2 RR / OR / RD / NNT calculator?

  • Quick effect-size summary from raw cell counts (you don't need the raw data).
  • Re-analysing a 2 × 2 table from a published paper.
  • Sanity-checking a logistic regression's OR against the unadjusted 2 × 2 OR.

What data does it need?

Four cell counts: a (exposed + event), b (exposed + no event), c (unexposed + event), d (unexposed + no event).

What does it report?

Risk difference, risk ratio, odds ratio, number needed to treat — each with a CI. χ² and Fisher's exact p.

Formula

RD = a/(a+b) − c/(c+d)
RR = [a/(a+b)] / [c/(c+d)]
OR = (a·d) / (b·c)
NNT = 1 / |RD|

How do I interpret the result?

NNT is the number you'd need to treat to prevent one event — but only meaningful when the treatment is genuinely beneficial (RD < 0 when 'event' is bad).

When any cell is 0, OR and RR break down; the calculator adds 0.5 to each cell (Haldane-Anscombe correction) before computing.

See also