For a two-by-two contingency table, Fisher's exact test conditions on both row totals and both column totals. Under the null of no association, the upper-left count then has the hypergeometric distribution
where and are the first row and column totals. A one-sided p-value sums the appropriate hypergeometric tail; a common two-sided p-value sums the probabilities of all feasible tables no more likely under the null than the observed table. Because the conditional distribution is discrete, the p-value is super-uniform random variable rather than generally exactly uniform.