
Prism
FEATURES
Analyze, graph and present your workComprehensive analysis and statisticsElegant graphing and visualizationsShare, view and discuss your projectsLatest product features and releasesPOPULAR USE CASES
 Enterprise
 Resources
 Support
 Pricing
Compare observed and expected frequencies
This calculator compares observed and expected frequencies within (up to 20) categories using the chisquare test.
Enter the names of the categories into the first column, then enter the actual counts observed and expected for each group.
Learn more about chisquare in the description below the calculator.
What is chisquare?
A chisquare test compares count data in different groups to their expected counts within each group. "Subjects" in the experiment can be individuals, events, items, or anything else so long as it can be counted.
It is a flexible method where the researcher must determine the expected counts for each group. The expected counts can be that they are equal, are based on previous research, follow some statistical distribution, or something else entirely.
The key is that its focus is on count data. If you are analyzing rates or percentages, then chisquare is not the appropriate tool.
How to use the chisquare table calculator
Enter the label (optional), actual counts of observed subjects (or events), and expected counts for each category on a separate line. Labels for each category are not used in calculation but are often helpful to organize the input data.
Important: Expected frequencies (like observed) should be entered as counts. Decimals in the expected count are acceptable so long as they do not represent percentages (for 15% of 250 total individuals, enter 37.5).
Example experiment setup
Suppose you have 605 subjects in total spread across five categories and observe the counts for each below:
 Group A: 200
 Group B: 102
 Group C: 50
 Group D: 153
 Group E: 100
We can compare the counts that we observe to the expected distribution to see if there is evidence that our sample as a whole is different from the hypothesized distribution.
How do I find the expected frequencies?
Chisquare calculators require you to enter the expected frequencies in each group so that it knows what it is comparing against.
Here is an example of how to calculate expected frequencies. One common assumption is that all groups are equal (e.g. 605 / 5 = 121 expected per group). This calculator allows for more flexible options beyond just that, and decimals are acceptable so long as the expected frequencies add up to the total number of observations.
A specific usecase of chisquare is analyzing contingency tables. With contingency tables, the expected counts are determined using the assumption that the factors are notrelated. This contingency table calculator includes an option to do a Yates' correction.
Performing a chisquare test? We can help.
Sign up for more information on how to perform this and other common statistical analyses.
How to calculate chisquare by hand
Chisquare is not as complicated as some statistical tests and is sometimes done by hand. You can use the formula below, entering the observed (O) and expected (E) frequencies for each group. By summing up the calculated values for each of the categories, we can calculate the chisquare test statistic as shown below:
Once you have calculated the test statistic, you would need to use a computer or a chisquare table to find the approximate P value.
While this can be done by hand, there are several opportunities for human error, which is why we recommend this calculator (or Prism for more advanced analysis).
Assumptions of chisquare
While chisquare is one of the more flexible tests in statistics, it has the following assumptions:
 Analyzing counts (not percentages)
 Large number of subjects in each category (usually greater than 5)
 Comparing to a theoretical distribution
See more details in our analysis checklist.
Related tests and calculators
Chisquare test for contingency tables
Chisquare tests are also used to analyze contingency tables. If you have a 2x2 contingency table, use this calculator. The difference is that with contingency tables, the expected counts are calculated behind the scenes with the assumption that the variables are not associated.
Binomial test
If you have only two categories, use this binomial test calculator instead. Chisquare can give P values that are too low in this case, but the binomial test will calculate it exactly.
Chisquare test vs ttest
Chisquare tests if the observed counts in each category varies from its expected "theoretical" population, whereas ttests evaluate whether two sample means (or one sample mean and a fixed value) are statistically equivalent.
Interpreting results
The chisquare p value tests if the observed counts are consistent with the expected counts. You would interpret chisquare value figures below your significance threshold (often 0.05) as "evidence that the data were not sampled from the distribution you expected". If a P value is greater than your significance threshold, there is no evidence that the observed values were different from the expected, theoretical distribution.
Note that P values are easy to misinterpret, but large P values are not evidence that no difference exists; it could be that you don't have enough data to detect a difference.
This calculator performs a twotailed chisquare test and assumes a P value significance threshold of 0.05.
The results page also includes the chisquared statistic and its degrees of freedom. Notice the category names are not involved at all in the interpretation. See this example for help with interpreting a chisquare P value.
Graphing chisquare results
This calculator does not create a graphic of the chisquare results. A grouped bar chart is commonly used to visualize the difference between observed and expected counts, and is one of the many custom graphics offered with Prism.
Ready for more advanced analyses?
Start your 30 day free trial of Prism and get access to:
 Step by step guides on how to perform the most common analysis
 Sample data to save you time
 More tips on how Prism can help your research
With Prism, in a matter of minutes you learn how to go from entering data to performing statistical analyses and generating highquality graphs.
Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.