Heterozygosity Calculator
Calculate observed and expected heterozygosity from genotype or allele frequency data. Find gene diversity (Nei's H), measure of genetic variation in a population.
🧬 Genetics📐 He = 1 - Σpi²🧬 Biology
Number of heterozygous individuals
Total individuals N
Allele 1 frequency p1
Allele 2 frequency p2
Please enter valid values.
Formula & Reference
| Variable | Symbol | Formula | Units |
|---|---|---|---|
| Heterozygosity Calculator | — | He = 1 - Σpi² | 0 to 1 |
Step-by-Step Examples
Example 1
Two alleles
p1=0.6, p2=0.4 in a population.
- He = 1 - (0.6²+0.4²) = 1 - (0.36+0.16) = 0.48
- Maximum He = 0.5 for two alleles at equal frequency
✓ He = 0.48
Example 2
Multiple alleles
Three alleles: p1=0.5, p2=0.3, p3=0.2.
- He = 1-(0.5²+0.3²+0.2²) = 1-(0.25+0.09+0.04) = 1-0.38 = 0.62
- More alleles = higher possible heterozygosity
✓ He = 0.62 for three alleles
Example 3
Observed vs Expected
100 individuals: 36 AA, 48 Aa, 16 aa.
- Ho = 48/100 = 0.48
- He (from HW) = 2×0.6×0.4 = 0.48
- Fis = 1-0.48/0.48 = 0 (population in HW)
✓ Ho=He=0.48: no inbreeding
Real-World Applications
Conservation Genetics
Heterozygosity measures genetic diversity. Low He: endangered species, bottleneck, or heavy inbreeding.
Population Structure
Comparing He across populations and loci detects selection (unusual loci) and structure.
Agriculture
Hybrid crops show heterosis (vigor) when Ho is high. Plant breeders maximize heterozygosity.
Forensic Genetics
High He at a microsatellite locus = better discrimination power for DNA profiling.
Common Mistakes to Avoid
⚠️
He uses allele frequencies, Ho uses individuals
He = 1-Σpi² (calculated from allele frequencies). Ho = (heterozygotes observed)/N. Compare to test for HW.
⚠️
Maximum He = 1 - 1/k for k equally frequent alleles
Two alleles: max He=0.5. Ten equal alleles: max He=0.9. More alleles = potentially higher diversity.
⚠️
Fis measures inbreeding
Fis = 1 - Ho/He. Positive Fis: excess homozygotes (inbreeding). Negative Fis: excess heterozygotes (overdominance or outbreeding).
Frequently Asked Questions
What is heterozygosity? ▾
Proportion of individuals that are heterozygous at a locus (observed, Ho) or expected proportion under HW (He=2pq for two alleles).
What is Nei's gene diversity? ▾
He = 1 - Σpi². Also called expected heterozygosity. Measures probability two randomly chosen alleles are different. Standard measure of genetic diversity.
What does low heterozygosity indicate? ▾
Low He: few alleles, one allele dominates, or recent bottleneck. Cheetahs and northern elephant seals have very low He due to past bottlenecks.
What is the heterozygosity excess test? ▾
In recently bottlenecked populations, allelic richness decreases faster than He. Test compares observed He to expected He given allele count. Used to detect bottlenecks.
How is heterozygosity used in DNA forensics? ▾
Match probability = product of (1 - He) across loci. High He loci = low match probability = better discrimination. A 13-locus STR profile with mean He=0.8 gives match prob ~10^-15.