ThisCalculator

Everyday

Poisson Regression Calculator: Rate Ratios & CIs

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.

This Poisson regression calculator fits a Poisson model to your count data and returns the rate ratio (relative risk) for each predictor, along with its 95% confidence interval and p-value. You enter the observed counts and exposure times (or person-years) for up to two groups, and the calculator estimates the incidence rate ratio and its uncertainty using the standard normal approximation.

Formula

The Poisson regression model assumes the number of events Y for a given exposure time T follows a Poisson distribution with mean λ·T, where λ is the event rate per unit time. For a single binary predictor X (0 or 1), the model is written as:

log(λ) = β0 + β1·X

Here, β0 is the log rate in the reference group (X=0), and β1 is the log rate ratio comparing group 1 to group 0. Exponentiating β1 gives the rate ratio (RR) = exp(β1). The variance of β1 is approximately 1/μ1 + 1/μ0, where μ1 and μ0 are the expected counts in each group. In practice, we use the observed counts as estimates, so the standard error of the log rate ratio is sqrt(1/events1 + 1/events0). The 95% confidence interval for the rate ratio is then:

exp( log(RR) ± 1.96 × sqrt(1/events1 + 1/events0) )

Variables: events1, events0 = number of events in group 1 and 0; time1, time0 = person-time (years, months, days) in each group; RR = rate ratio (dimensionless); CI = confidence interval (dimensionless).

Worked Example

Using the defaults from the calculator: group 1 has 15 events over 1000 person-years, group 0 has 8 events over 1000 person-years. Step 1: compute rates: rate1 = 15/1000 = 0.015 per year; rate0 = 8/1000 = 0.008 per year. Step 2: rate ratio = 0.015 / 0.008 = 1.875. Step 3: log(RR) = ln(1.875) = 0.6286. Step 4: standard error = sqrt(1/15 + 1/8) = sqrt(0.0667 + 0.125) = sqrt(0.1917) = 0.4378. Step 5: 95% CI = exp(0.6286 ± 1.96×0.4378) = exp(0.6286 ± 0.8581) → lower = exp(-0.2295) = 0.795, upper = exp(1.4867) = 4.421. Step 6: p-value = 2×(1 – Φ(0.6286/0.4378)) = 2×(1 – Φ(1.436)) = 2×(1 – 0.9245) = 0.151. The calculator shows RR = 1.875, 95% CI 0.795 to 4.421, p = 0.1510. This means the rate in group 1 is 87.5% higher than in group 0, but the confidence interval includes 1, so the difference is not statistically significant at the 5% level.

When to Use Poisson Regression

Poisson regression is the go-to method when your outcome is a count of events (deaths, accidents, hospitalizations, defects) and you need to compare rates between groups or across levels of a continuous predictor. It is especially common in epidemiology (incidence rates), occupational health, and quality control. Key assumptions: events occur independently, the rate is constant over the follow-up period, and the variance equals the mean. If the variance exceeds the mean (overdispersion), a negative binomial model may be more appropriate. The calculator above handles the simplest case of two groups; for multiple predictors, interactions, or continuous covariates, you would need statistical software.

How to Choose the Right Model

  • Two groups, same follow-up time? Use the rate ratio calculator directly.
  • Multiple groups or continuous predictors? Use a full Poisson regression model in software like R, SAS, or Python.
  • Overdispersion present? Check if the deviance/df > 1.5; if so, consider negative binomial or quasipoisson.
  • Rare events? If events are very few (<5 per group), exact methods or Firth’s correction may be needed.
  • Matched or paired data? Use conditional Poisson regression.

Common Mistakes and Pitfalls

The most frequent error is mixing up person-time units: if one group’s time is in years and the other in months, the rate ratio will be off by a factor of 12. Always convert to the same unit. Another mistake is using the normal approximation when counts are small; the CI may be too narrow. Also, remember that the rate ratio is not the same as the odds ratio; they differ when the outcome is common. Finally, do not interpret the rate ratio as a risk ratio unless the follow-up time is short and the outcome is rare.

Limitations of the Formula

The simple formula above assumes the log rate ratio is approximately normally distributed, which works well when counts are moderately large (typically ≥10). It also assumes no confounding; if your groups differ by age, sex, or other factors, you need to adjust for those variables in a multivariable model. The calculator does not handle zero events in either group, as the variance formula would divide by zero. In such cases, add 0.5 to each count (Haldane correction) or use exact methods. Also, the p-value shown is two-sided; for a one-sided test, halve it.

Alternatives to Poisson Regression

  • Negative binomial regression – when overdispersion is present.
  • Zero-inflated Poisson (ZIP) – when there are excess zeros.
  • Binomial regression with person-time denominator – when you model the probability of at least one event.
  • Log-binomial regression – for direct estimation of risk ratios when the outcome is binary.
  • Exact Poisson test – for comparing two rates when counts are very small.

Each alternative has its own assumptions and output; the choice depends on your data structure and research question.

Frequently Asked Questions

What is the difference between Poisson regression and logistic regression?

Poisson regression models count data (number of events) with an offset for exposure time, giving rate ratios. Logistic regression models binary outcomes (yes/no) and gives odds ratios. Use Poisson when you have counts and a time component; use logistic when the outcome is a single event or status.

Can I use this calculator for incidence rates?

Yes, that is exactly what it does. The rate ratio is the ratio of two incidence rates (events per person-time). Just enter the number of events and person-time for each group.

What if I have more than two groups?

This simple calculator only handles two groups. For multiple groups, you would need to run a Poisson regression with dummy variables for each group compared to a reference. Software like R or SPSS can do this easily.

How do I interpret the confidence interval?

The 95% confidence interval gives a range of plausible values for the true rate ratio. If the interval includes 1, the difference is not statistically significant at the 5% level. The width reflects the precision: narrower means more precise estimates, usually from larger event counts.

Why is my p-value different from a chi-square test?

The p-value here is based on the Wald test for the log rate ratio, which is similar to a chi-square test but not identical. The chi-square test of independence on the 2×2 table (events vs. person-time) gives a slightly different result because it uses a different approximation. For large counts, they agree closely.

Can I use this for survival analysis?

Poisson regression is related to survival analysis when you assume a constant hazard rate. In that case, the rate ratio is equivalent to the hazard ratio. However, if the hazard changes over time, Cox proportional hazards regression is more appropriate.

Related

Formula used
in ev1 | Events, group 1 | count | 15 | 0
in t1 | Person-time, group 1 | years | 1000 | 0
in ev0 | Events, group 0 (reference) | count | 8 | 0
in t0 | Person-time, group 0 (reference) | years | 1000 | 0
out rr | Rate ratio | - | (ev1 / t1) / (ev0 / t0) | 3
out ci_lo | 95% CI lower | - | exp(log(rr) - 1.96 * sqrt(1/ev1 + 1/ev0)) | 3
out ci_hi | 95% CI upper | - | exp(log(rr) + 1.96 * sqrt(1/ev1 + 1/ev0)) | 3
out p | p-value (log-rate test) | - | 2 * (1 - normcdf(abs(log(rr) / sqrt(1/ev1 + 1/ev0)))) | 4

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.