Biological diversity is quantified for reasons ranging from primer design, to bioprospecting, and community ecology. As a common index for all levels, we suggest Shannon's SH, already used in information theory and biodiversity of ecological communities. Since Lewontin's first use of this index to describe human genetic variation, it has been used for variation of viruses, splice-junctions, and informativeness of pedigrees. However, until now there has been no theory to predict expected values of this index under given genetic and demographic conditions. We present a new null theory for SH at the genetic level, and show that this index has advantages including (i) independence of measures at each hierarchical level of organization; (ii) robust estimation of genetic exchange over a wide range of conditions; (iii) ability to incorporate information on population size; and (iv) explicit relationship to standard statistical tests. Utilization of this index in conjunction with other existing indices offers powerful insights into genetic processes. Our genetic theory is also extendible to the ecological community level, and thus can aid the comparison and integration of diversity at the genetic and community levels, including the need for measures of community diversity that incorporate the genetic differentiation between species.