This simple applet accepts counts or proportions of individuals having each of n*(n-1)/2 diploid genotypes, and the number of individuals having the homozygous null genotype. It calculates the maximum likelihood estimate of frequencies of alleles (including the null allele) using the estimation-maximization (EM) algorithm.
For example, the alleles A and B code for antigens in human blood. There is an O allele that produces no antigen. Phenotypic blood types are A, B, AB, and O. Individuals with blood type A can have genotype AA or AO, and similarly for B. The sample data is for blood types of 2060 Croatians, from Mourant et al. 1976. The first number is 2, the number of non-null alleles. Then come the numbers of people with the phenotypes A, AB, and B. Finally, the number of people with phenotype O, which implies genotype OO. If you click on "Calculate!", the program uses EM to produce estimates of all 3 allele frequencies, and the corresponding expected genotype frequencies under Hardy-Weinberg equilibrium.
Note: the initial guess for each allele frequency is 1 / (n + 1) where n is the number of non-null allele flavours.