---
title: Calculate an Odds Ratio (OR)
description: What is an Odds-Ratio? An odds ratio (OR) is a statistic that quantifies the strength of the association between two events, A and B. Odds-Ratio is not…
---

[Skip to content](https://help.easymedstat.com/support/solutions/articles/77000513137-calculate-an-odds-ratio-or-#main-content)

English

Show submenu for translations

![](https://help.easymedstat.com/hs-fs/hubfs/Logo%20EMS%20HQ%20Noir-1.png?width=366&height=70&name=Logo%20EMS%20HQ%20Noir-1.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Open a ticket](https://t3jiy.share-eu1.hsforms.com/2pRawwxfuSS6Scx4Qn4KSPA)

[Open a ticket](https://t3jiy.share-eu1.hsforms.com/2pRawwxfuSS6Scx4Qn4KSPA)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [EasyMedStat Knowledge Base](https://help.easymedstat.com/?hsLang=en)
2. [Statistical analyses](https://help.easymedstat.com/statistical-analyses?hsLang=en)
3. [Statistical tests](https://help.easymedstat.com/statistical-analyses?hsLang=en#statistical-tests)

# Calculate an Odds Ratio (OR)

# What is an Odds-Ratio?

An odds ratio (OR) is a statistic that quantifies the strength of the association between two events, A and B.

Odds-Ratio is not the same as relative risk (RR). Relative risk is calculated on the whole population. 

However, in clinical studies, an odds-ratio is generally preferred because data for the entire population is not available.

# How to calculate an Odds-Ratio?

To calculate an OR, you need 2 variables with 2 modalities for each variable. It could be 2 Yes-no variables or 2 List variables with 2 possible values.

For example, it could be Smoker (Yes-no) vs Gender (List with 2 possible values).

1. In the "Statistics" menu, click on "Test variables"
2. Pick the first variable (for example "Smoker")
3. Pick the second variable (for example "Gender")
4. Open the panel "Find an association between ..."
5. The odds-ratio and its confidence interval are displayed in the "What to write in results" box

![](https://help.easymedstat.com/hubfs/Base%20de%20connaissances/HqzY5uXKSF-ZgCkDF_bvfiwqExJktwCjLw.png)

*The calculated OR is 0.026 with a confidence interval ranging from 0.0035 to 0.2*

# The OR is not calculated

There are 2 main reasons why an OR would not be calculated:

1. One of the cells of the contingency table is equal to 0
2. A List variable with more than 2 values

## One of the cells of the contingency table is equal to 0

The contingency table is a table generated from the distribution of the 2 variables. It represents the frequency of each possible combination of each variable. In the example below, it counts how many patients are both "Women" and "Diabetics" (n=1), both "Women" and "Non-diabetics" (n=117), etc...

![](https://help.easymedstat.com/hubfs/Base%20de%20connaissances/sAG5Zy8yFWyMBqxxHR1B9gqXV-G8Ohmk6A.png)

The Odds-Ratio can not be calculated if at least one of the cells of the table is equal to 0.

## A List variable with more than 2 values

An OR can only be calculated if the contingency table has 4 cells. If one of your variable has more than 2 possible values (modalities), then an OR will not be computed.

However, you can group some values together to obtain only 2 values. For example, if you have a variable "Smoker" with 3 modalities "Never smoker", "Former smoker" and "Active smoker", you could group together "Never smoker" and "Former smoker". See the following link for more information: [How to group values (modalities) of a List variable?](https://help.easymedstat.com/support/solutions/articles/77000509058-how-to-group-values-modalities-of-a-list-variable-?hsLang=en)

- [Account](https://help.easymedstat.com/account?hsLang=en#main-content)

    - [Account](https://help.easymedstat.com/account?hsLang=en#account)
- [Collect data](https://help.easymedstat.com/collect-data?hsLang=en#main-content)

    - [Questionnaires (ePRO)](https://help.easymedstat.com/collect-data?hsLang=en#questionnaires-epro)
    - [Add and edit patients](https://help.easymedstat.com/collect-data?hsLang=en#add-and-edit-patients)
    - [Randomization](https://help.easymedstat.com/collect-data?hsLang=en#randomization)
    - [Export](https://help.easymedstat.com/collect-data?hsLang=en#export)
    - [Create a series / eCRF](https://help.easymedstat.com/collect-data?hsLang=en#create-a-series-ecrf)
    - [Multilingual studies](https://help.easymedstat.com/collect-data?hsLang=en#multilingual-studies)
- [Variables](https://help.easymedstat.com/variables?hsLang=en#main-content)

    - [Organize in categories](https://help.easymedstat.com/variables?hsLang=en#organize-in-categories)
    - [Dynamic Variables](https://help.easymedstat.com/variables?hsLang=en#dynamic-variables)
    - [Manage variables](https://help.easymedstat.com/variables?hsLang=en#manage-variables)
- [Statistical analyses](https://help.easymedstat.com/statistical-analyses?hsLang=en#main-content)

    - [Statistical tests](https://help.easymedstat.com/statistical-analyses?hsLang=en#statistical-tests)
    - [Compare groups](https://help.easymedstat.com/statistical-analyses?hsLang=en#compare-groups)
    - [Multivariate analysis](https://help.easymedstat.com/statistical-analyses?hsLang=en#multivariate-analysis)
    - [Filter patients](https://help.easymedstat.com/statistical-analyses?hsLang=en#filter-patients)
    - [Descriptive Statistics](https://help.easymedstat.com/statistical-analyses?hsLang=en#descriptive-statistics)
- [Collaborate](https://help.easymedstat.com/collaborate?hsLang=en#main-content)

    - [Share your series](https://help.easymedstat.com/collaborate?hsLang=en#share-your-series)
    - [Manage your organization](https://help.easymedstat.com/collaborate?hsLang=en#manage-your-organization)
- [Monitoring](https://help.easymedstat.com/monitoring?hsLang=en#main-content)

    - [Automations](https://help.easymedstat.com/monitoring?hsLang=en#automations)
    - [Electronic Signatures](https://help.easymedstat.com/monitoring?hsLang=en#electronic-signatures)
    - [Queries](https://help.easymedstat.com/monitoring?hsLang=en#queries)
    - [Clean data](https://help.easymedstat.com/monitoring?hsLang=en#clean-data)

[![](https://help.easymedstat.com/hs-fs/hubfs/Logo%20EMS%20HQ%20Noir-1.png?width=366&height=70&name=Logo%20EMS%20HQ%20Noir-1.png)](http://www.easymedstat.com)

<https://www.linkedin.com/company/easymedstat/> <https://www.youtube.com/@easymedstat9719> [mailto:support@easymedstat.com](mailto:support@easymedstat.com)

Copyright © 2026, EasyMedStat