# Relative Risk and Odds Ratio Calculator

URL: https://speedycalculator.com/calculators/statistics/relative-risk/
Last updated: 2026-10-25

> This calculator finds the relative risk, odds ratio, absolute risk difference and number needed to treat from a 2×2 table of exposed and unexposed groups.

## Inputs

- Exposed with outcome (a)
- Exposed without outcome (b)
- Unexposed with outcome (c)
- Unexposed without outcome (d)

## Results

- Risk in exposed
- Risk in unexposed
- Relative risk
- Odds ratio
- Absolute risk difference
- Number needed to treat/harm

## Formula

```
RR = (a ÷ (a + b)) ÷ (c ÷ (c + d))
OR = (a × d) ÷ (b × c)
NNT = 1 ÷ |risk difference|
```

## Explanation

These measures are the language of clinical trials and epidemiology.

### How to use the Relative Risk and Odds Ratio Calculator

- **Exposed with outcome (a)**
- **Exposed without outcome (b)**
- **Unexposed with outcome (c)**
- **Unexposed without outcome (d)**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Risks are computed in each group from the table; the ratios and differences follow directly.

### Inputs explained

FieldWhat to enterExposed with outcome (a)A numberExposed without outcome (b)A numberUnexposed with outcome (c)A numberUnexposed without outcome (d)A number

### What each result means

- **Risk in exposed** = [Exposed with outcome (a)]÷([Exposed with outcome (a)] + [Exposed without outcome (b)])×100
- **Risk in unexposed** = [Unexposed with outcome (c)]÷([Unexposed with outcome (c)] + [Unexposed without outcome (d)])×100
- **Relative risk** = [Risk in exposed]÷[Risk in unexposed]
- **Odds ratio** = [Exposed with outcome (a)]×[Unexposed without outcome (d)]÷([Exposed without outcome (b)]×[Unexposed with outcome (c)])
- **Absolute risk difference** = [Risk in exposed] - [Risk in unexposed]
- **Number needed to treat/harm** = 100÷abs([Absolute risk difference])

### Example values

How the main result changes when **Exposed with outcome** changes and everything else stays at the example values above:

Exposed with outcome (a)Relative risk101.1111151.5789202252.381302.7273403.3333

## Worked example

Inputs — Exposed with outcome (a): 20; Exposed without outcome (b): 80; Unexposed with outcome (c): 10; Unexposed without outcome (d): 90.

Results — Risk in exposed = 20 %; Risk in unexposed = 10 %; **Relative risk = 2**; Odds ratio = 2.25; Absolute risk difference = 10 percentage points; Number needed to treat/harm = 10.

## FAQ

**When is the odds ratio close to the relative risk?**
When the outcome is rare.

**What does NNT = 10 mean?**
Ten people need the treatment for one extra person to benefit.

**What formula does the Relative Risk and Odds Ratio Calculator use?**
RR = (a ÷ (a + b)) ÷ (c ÷ (c + d)).

