Hardy-Weinberg Equilibrium Test

Notice: this calculator is no longer available to be run on our server.

Sorry for the inconvenience!

If you use Windows, you can download a DOS version of the program here. It can be run from the DOS window either simply as

    hwe infile outfile
In both cases, input is expected in the same format as this calculator used to. For data with only two alleles, the calculation is just Fisher's test exactly, and the three randomization parameters should not be entered.

New: this calculator now works for two alleles.

Best Viewed with Any Browser

About the Hardy-Weinberg Equilibrium (HWE) Test

This program uses the Markov Chain algorithm of Guo and Thompson (1992) to test for Hardy-Weinberg equilibrium in a population. The question answered is:
What is the probability of getting a genotype-frequency table at least as unlikely as the observed one, given the numbers of each flavour of allele?
Input is a list of numbers, as follows: Numbers in the list must be separated by spaces, TABS, or newlines, but there is no requirement that numbers appear on particular lines of the input. For inputs with two alleles, the test is exact and the three randomization parameters must not be given. The running time of the test is proportional to steps + batches * size.

You can also:

How To Use This Page


Guo, S. W., and Thompson, E.A. (1992). Performing the Exact Test of Hardy-Weinberg Proportion for Multiple Alleles. Biometrics 48, pp. 361-372


The program run by the server is based on hwe by Sun Wei Guo; his C source code is available at:
This web-page, the CGI wrapper, and minor modifications to Guo's code are by John Brzustowski; please feel free to send me comments or criticisms at junkjbrzusto@ualberta.cacaca but removing the obvious parts
You are free to link to, copy, use and modify this page and the scripts it calls. Source code for all of these are available at http://www2.biology.ualberta.ca/jbrzusto/ftp/cgi/hwe/
There are more free programs in a similar vein at: http://www2.biology.ualberta.ca/jbrzusto/index.html