BIOSTATISTICS AND DATA

Chi-Square Test vs Fisher's Exact Test

Guide · 2 min read · Last updated 2026-10-31

Both tests assess whether two categorical variables are associated, using counts in a contingency table. The chi-square test is an approximation that works when expected counts are large enough; Fisher's exact test calculates an exact probability and is preferred when counts are small.

When to use which

SituationSuitable test
Larger samples, expected counts generally 5 or more in each cellChi-square test
Small samples or any small expected counts in a 2×2 tableFisher's exact test
Paired binary data (for example before/after in the same people)McNemar's test
Ordered categories or trendsChi-square for trend or other methods; ask a statistician

A common rule of thumb is that all expected counts should be at least 5 (some say at least 80% of cells with expected counts of 5 or more and none below 1). Modern software can compute exact tests even for larger tables, so many analysts use Fisher's test whenever it is available.

How to read the table

Expected count for a cell = (row total × column total) / grand total. If observed counts differ greatly from expected counts, the chi-square statistic is large and the p-value small.

Illustrative example

Invented for teaching. Wound infection after surgery: 4 of 20 patients (20%) in group A and 1 of 25 (4%) in group B. Expected infections in each group if there were no association: total infections 5 of 45, so about 2.2 in A and 2.8 in B, below 5, so Fisher's exact test is appropriate. The report should give the risks (20% and 4%), the risk difference or ratio with a 95% confidence interval, and the test p-value.

Reporting

State the test, the counts and percentages in each group, an effect measure with a confidence interval and the p-value. A p-value alone says little about the size of the difference.

Common pitfalls

  • Using chi-square for small expected counts.
  • Applying chi-square to paired data.
  • Analysing percentages rather than counts.

Key takeaways

  • Use Fisher's exact test when counts are small.
  • Report effect sizes with confidence intervals.

References and further reading

  1. Hulley SB, Cummings SR, Browner WS, Grady D, Newman TB. Designing Clinical Research. 4th ed. Lippincott Williams & Wilkins; 2013. Link
  2. Greenland S, Senn SJ, Rothman KJ, et al. Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. Eur J Epidemiol. 2016;31:337-350. doi:10.1007/s10654-016-0149-3
  3. Altman DG, Bland JM. Standard deviations and standard errors. BMJ. 2005;331:903. doi:10.1136/bmj.331.7521.903

Related reading

This page is general educational information about research methods. It is not medical, legal or regulatory advice; follow your institution's ethics board and your target journal's instructions.