ThisCalculator

Everyday

Rate Ratio Confidence Interval: How to Calculate

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Rate Ratio Confidence Interval: How to Calculate

This calculator computes a confidence interval for a rate ratio (also called relative risk) from two independent rates, such as event counts per person-time in an exposed and an unexposed group. You enter the number of events and the person-time (or population size) for each group, and you get the rate ratio, its 95% confidence interval, and the standard error. The calculation uses the standard log-based method, which assumes the log of the rate ratio is approximately normally distributed.

Formula

The rate ratio (RR) is the ratio of two incidence rates:

RR = (a / t1) / (b / t2)

where:

  • a = number of events in the exposed group (count)
  • t1 = person-time (or population) in the exposed group
  • b = number of events in the unexposed group (count)
  • t2 = person-time (or population) in the unexposed group

The standard error of the natural logarithm of the rate ratio is:

SE(log RR) = sqrt(1/a + 1/b)

The 95% confidence interval is then:

95% CI = exp(log RR ± 1.96 × SE(log RR))

This is the classic method described in epidemiology textbooks (e.g., Rothman’s Modern Epidemiology). The 1.96 is the 97.5th percentile of the standard normal distribution, giving a two-sided 95% interval.

Worked Example

Using the default values from the calculator:

  • Exposed: 15 events in 1000 person-years → rate = 15/1000 = 0.015 per person-year
  • Unexposed: 8 events in 1200 person-years → rate = 8/1200 = 0.006667 per person-year

Rate ratio = 0.015 / 0.006667 = 2.25

SE(log RR) = sqrt(1/15 + 1/8) = sqrt(0.0667 + 0.125) = sqrt(0.1917) = 0.4378

log(RR) = ln(2.25) = 0.8109

Lower bound: exp(0.8109 – 1.96×0.4378) = exp(0.8109 – 0.8581) = exp(-0.0472) = 0.954

Upper bound: exp(0.8109 + 0.8581) = exp(1.669) = 5.306

So the 95% confidence interval is approximately 0.95 to 5.31. The calculator rounds to three decimals, giving 0.954 and 5.306.

When to Use a Rate Ratio

A rate ratio is used in epidemiology and clinical research when you compare the rate of an event (disease, death, complication) between two groups over time. Unlike a risk ratio (which uses the proportion of people who get the event), a rate ratio accounts for different follow-up times or different population sizes. This makes it the preferred measure in cohort studies and clinical trials with varying follow-up.

Common examples:

  • Comparing incidence of lung cancer among smokers vs. non-smokers per 100,000 person-years
  • Comparing heart attack rates in a drug group vs. placebo group per 1,000 patient-years
  • Comparing infection rates in two hospitals per 10,000 patient-days

How to Read the Result

A rate ratio of 1.0 means the rates are identical in both groups. A value greater than 1.0 suggests a higher rate in the exposed group; less than 1.0 suggests a lower rate. The confidence interval tells you the precision of that estimate. If the 95% CI includes 1.0, the difference is not statistically significant at the 0.05 level. If both bounds are above 1.0, the exposed group has a significantly higher rate; if both are below, significantly lower.

For example, a rate ratio of 2.25 with 95% CI 0.95–5.31 includes 1.0, so you cannot conclude that the exposed rate differs from the unexposed rate in this sample. The wide interval reflects the small number of events.

Common Mistakes and Limitations

  • Confusing rate ratio with risk ratio: A risk ratio uses the number of people at risk as the denominator, not person-time. If follow-up is complete and equal for all, they coincide, but generally they differ.
  • Zero events: If either a or b is 0, the formula fails because you divide by zero or take log of zero. Some authors add 0.5 to each cell, but that is a crude fix; better to use exact methods.
  • Small counts: The normal approximation works poorly when events are fewer than about 5 in either group. The interval may be too narrow. In such cases, use exact methods (e.g., based on the Poisson distribution).
  • Unit mismatch: Person-time must be in the same units for both groups. If one is in person-years and the other in person-months, the ratio will be off by a factor of 12.
  • Ignoring confounding: This crude rate ratio does not adjust for age, sex, or other variables. Adjusted rate ratios require regression models (e.g., Poisson or Cox).

Alternatives to the Log Method

When the normal approximation is questionable, several alternatives exist:

  • Exact Poisson intervals: These use the Poisson distribution to compute confidence limits directly, providing better coverage for small counts.
  • Byar’s approximation: A quick approximation to the exact method, often used in cancer registry data.
  • Bootstrap: Resampling the data to estimate the interval, useful for complex sampling designs.
  • Poisson regression: Gives an adjusted rate ratio with a confidence interval while controlling for covariates.

For most practical purposes with moderate to large counts, the log method is sufficient and is what most statistical software reports by default.

Frequently Asked Questions

What is the difference between a rate ratio and an odds ratio?

A rate ratio compares incidence rates (events per person-time), while an odds ratio compares the odds of an event in two groups, typically from case-control studies. They measure different things and are not interchangeable. The rate ratio is more intuitive for cohort studies with time-to-event data.

Can I use this calculator for risk ratios?

No, this calculator is specifically for rate ratios where the denominator is person-time. For risk ratios, you would enter the number of people at risk, not person-time, and the formula for the standard error is different (it includes the probability of no event). Use a dedicated risk ratio calculator.

What if my person-time is in different units?

Convert them to the same unit before entering. For example, if one group has 500 person-years and the other has 6000 person-months, convert months to years (6000/12 = 500 person-years) or vice versa. The calculator does not handle units.

Why is the confidence interval so wide?

Wide intervals usually indicate a small number of events. The standard error is proportional to 1/sqrt(a) + 1/sqrt(b), so fewer events mean more uncertainty. For example, with 2 events in one group, the interval can be extremely wide. This is a real reflection of the limited information.

Is a 95% confidence interval the same as a 5% significance level?

Yes, in frequentist statistics, a 95% confidence interval that excludes the null value (1.0) corresponds to a two-sided p-value less than 0.05. However, the confidence interval conveys more information than a p-value because it shows the range of plausible effect sizes.

Related

Formula used
in a | Events in exposed | - | 15 | 0
in t1 | Person-time exposed | - | 1000 | 0
in b | Events in unexposed | - | 8 | 0
in t2 | Person-time unexposed | - | 1200 | 0
out rr | Rate ratio | - | a / t1 / (b / t2) | 3
out se | SE of log(RR) | - | sqrt(1 / a + 1 / b) | 4
out ci_lo | 95% CI lower | - | exp(log(a / t1 / (b / t2)) - 1.96 * sqrt(1 / a + 1 / b)) | 3
out ci_hi | 95% CI upper | - | exp(log(a / t1 / (b / t2)) + 1.96 * sqrt(1 / a + 1 / b)) | 3

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.