For a sample of two genes from a population divided into an arbitrary number of allele classes, a general mathematical framework is developed to address the expectation and variance of the time of the most recent common ancestor. Depending on the meaning of allele classes and the manner in which genes can change among them, this framework can be applied to a diversity of population genetic models. By adoption of the infinite sites model, the effect on heterozygosity is modelled for balancing selection among allele classes, mutation between allele classes, migration among populations, and gene conversion between loci. Most results are described for a continuous time approximation to a discrete generation model. It is also shown how the discrete generation model can be used to study the hitch-hiking effect of favorable mutations.