Can Fisher's exact test be used for tables larger than 2×2?
Yes. Freeman and Halton extended Fisher's test to r×c tables in 1951: the margins are fixed, every table with those margins gets its multivariate hypergeometric probability, and the two-sided p-value sums the probabilities of the tables no more probable than yours (probability ordering). R's fisher.test implements exactly this for larger tables, and so does this calculator — within its published exact limits (up to 5×5, N ≤ 200); beyond them it reports a Monte Carlo estimate labelled simulated, never exact.
What is the Fisher–Freeman–Halton test?
It is Fisher's exact test generalised from a 2×2 table to an r×c contingency table, published by G. H. Freeman and J. H. Halton in 1951. The null hypothesis is independence between the row and column variables, conditional on the observed margins. For the 2×3 worked example on this page ([[4, 4, 2], [1, 4, 5]]), 42 tables share the margins, the observed table's probability is 0.039782, and the exact two-sided p-value is 0.2892.
How large a table can Fisher's exact test handle?
In principle any size; in practice the number of tables with given margins grows explosively, so exact enumeration needs the Mehta–Patel network algorithm (1983) and still runs out of room eventually. This calculator enumerates exactly up to 5×5 with N ≤ 200 — a sparse 5×5 at that limit has 209 same-margin tables — and beyond those limits it switches to a Monte Carlo estimate from 10,000 replicates, with the headline itself reading “Simulated p-value (Monte Carlo, 10,000 replicates)”.
Is a simulated p-value the same as an exact p-value?
No. An exact p-value is enumerated — every same-margin table is counted — so it is identical on every run. A simulated p-value is estimated from random tables with your margins (10,000 replicates here): it is close to the exact value but carries sampling noise, and a different run gives a slightly different number. One practical check: run the calculation twice. If the figure changes between runs, it is simulated, whatever the page calls it. This tool prints the word “simulated” and the replicate count in the headline result itself.
When should I use Fisher's exact test instead of chi-square?
When the expected counts are small. Cochran's rule (1954), in its exact two-part form, says the chi-square approximation is trustworthy when every expected count is at least 1 and at least 80% of cells have an expected count of at least 5, with E = row total × column total ÷ N. The worked example fails it — smallest expected count 2.5, 0 of 6 cells at 5 — and its approximations (chi-square p = 0.2138, G-test p = 0.1963) both sit well below the exact 0.2892. When counts are large and the rule is comfortably met, chi-square is accurate and entirely appropriate.
Why is there no odds ratio for my 3×3 table?
Because the odds ratio is a four-cell quantity: ad/bc needs exactly a 2×2 table. A 3×3 table contains several different 2×2 sub-tables with different cross-products, and no single one of them is “the” odds ratio of the table. Report the exact p-value with Cramér's V as the effect size (0.393 for this page's worked example), or, if one specific 2×2 contrast is your real question, build that table and use the odds ratio calculator, where both odds-ratio estimators are printed and labelled.
Is my data uploaded anywhere?
No. Every calculation — enumeration, Monte Carlo sampling, the companion statistics — runs in your browser, on your device; the counts you type are never sent anywhere. If you use the share button, the table is encoded in the link itself and nothing is stored on a server, so only share links you are happy for the recipient to read.