Hardy Weinberg Equilibrium Calculator
Compute hardy weinberg equilibrium using validated scientific equations. See step-by-step derivations, unit analysis, and reference values.
Calculator
Adjust values & calculateFormula
Where p = frequency of dominant allele (A), q = frequency of recessive allele (a), p^2 = frequency of AA genotype, 2pq = frequency of Aa genotype (carriers), q^2 = frequency of aa genotype. The sum of all genotype frequencies equals 1.
Last reviewed: December 2025
Worked Examples
Example 1: Cystic Fibrosis Carrier Frequency
Example 2: Testing HWE with Observed Data
Background & Theory
The Hardy Weinberg Equilibrium Calculator applies the following established principles and formulas. Biology is the scientific study of life, encompassing the structure, function, growth, evolution, and distribution of living organisms. At the cellular level, all life is composed of cells, the basic structural and functional units of organisms. Prokaryotic cells lack a membrane-bound nucleus, while eukaryotic cells possess a nucleus and membrane-bound organelles including mitochondria, which generate ATP through oxidative phosphorylation, and ribosomes, which synthesize proteins. Genetics quantifies the inheritance of traits. Gregor Mendel's laws describe how alleles segregate during gamete formation and assort independently for genes on different chromosomes. Punnett squares provide a visual method for calculating the probability of offspring genotypes and phenotypes from known parental genotypes. For a monohybrid cross of two heterozygotes (Aa ร Aa), the expected phenotypic ratio is 3 dominant to 1 recessive. The Hardy-Weinberg equilibrium principle states that allele and genotype frequencies in a population remain constant from generation to generation in the absence of evolutionary forces. If p and q are the frequencies of two alleles at a locus, then p + q = 1 and genotype frequencies are pยฒ, 2pq, and qยฒ for the three possible genotypes. Deviations from equilibrium signal the action of natural selection, genetic drift, mutation, migration, or non-random mating. Population growth follows two primary models. Exponential growth, N = Nโeสณแต, describes unlimited growth where Nโ is the initial population, r is the intrinsic rate of increase, and t is time. Logistic growth incorporates carrying capacity K, describing how growth slows as population approaches the environment's maximum sustainable size: dN/dt = rN(1 โ N/K). Enzyme kinetics describes the rate of enzyme-catalyzed reactions. The Michaelis-Menten equation, v = Vmax[S]/(Km + [S]), relates reaction velocity v to substrate concentration [S], maximum velocity Vmax, and the Michaelis constant Km, which equals the substrate concentration at half-maximal velocity. DNA replication relies on complementary base pairing: adenine pairs with thymine (two hydrogen bonds) and guanine with cytosine (three hydrogen bonds), ensuring faithful copying of genetic information.
History
The history behind the Hardy Weinberg Equilibrium Calculator traces back through the following developments. The systematic study of living things began with Aristotle (384โ322 BCE), who classified over 500 animal species and wrote foundational texts on anatomy, reproduction, and animal behavior. His scala naturae ranked organisms in a hierarchy from simple to complex and influenced biological thought for two millennia. Theophrastus, his student, applied similar methods to plants. Carl Linnaeus established modern taxonomy in Systema Naturae (1735), introducing the binomial nomenclature system that assigns each organism a genus and species name. His hierarchical classification system โ species, genus, family, order, class, phylum, kingdom โ provided the organizational framework that biologists still use, now extended to seven ranks and supplemented by cladistics. Charles Darwin and Alfred Russel Wallace independently developed the theory of evolution by natural selection, which Darwin published in On the Origin of Species in 1859. Darwin argued that heritable variation exists within populations, that organisms with advantageous traits survive and reproduce at higher rates, and that this differential reproduction gradually changes the character of populations over generations. This unified all of biology under a single explanatory framework. Gregor Mendel's meticulous pea plant experiments, conducted from 1856 to 1863 and published in 1866, established the particulate nature of inheritance and the laws of segregation and independent assortment. Overlooked until 1900, when three botanists independently rediscovered his work, Mendel's laws laid the foundation for the science of genetics. James Watson and Francis Crick, building on Rosalind Franklin's X-ray crystallography data, determined the double-helix structure of DNA in 1953, revealing the physical basis of heredity and the mechanism by which genetic information is stored and copied. The Human Genome Project, a 13-year international collaboration, published the complete sequence of the human genome in 2003, comprising approximately 3.2 billion base pairs. The development of CRISPR-Cas9 gene editing by Jennifer Doudna, Emmanuelle Charpentier, and colleagues from 2012 onward opened an era of precise genome modification with transformative implications for medicine, agriculture, and basic research.
Frequently Asked Questions
Formula
p^2 + 2pq + q^2 = 1 ; p + q = 1
Where p = frequency of dominant allele (A), q = frequency of recessive allele (a), p^2 = frequency of AA genotype, 2pq = frequency of Aa genotype (carriers), q^2 = frequency of aa genotype. The sum of all genotype frequencies equals 1.
Worked Examples
Example 1: Cystic Fibrosis Carrier Frequency
Problem: Cystic fibrosis affects 1 in 2,500 Caucasians. What is the carrier frequency?
Solution: q squared = 1/2500 = 0.0004\nq = sqrt(0.0004) = 0.02\np = 1 - 0.02 = 0.98\nCarrier frequency (2pq) = 2 x 0.98 x 0.02 = 0.0392
Result: Carrier frequency = 3.92% (approximately 1 in 25 people)
Example 2: Testing HWE with Observed Data
Problem: In 500 individuals: 280 AA, 190 Aa, 30 aa. Is this in HWE?
Solution: p = (2x280 + 190) / 1000 = 0.75, q = 0.25\nExpected: AA = 0.5625 x 500 = 281.25, Aa = 0.375 x 500 = 187.5, aa = 0.0625 x 500 = 31.25\nChi-square = (280-281.25)^2/281.25 + (190-187.5)^2/187.5 + (30-31.25)^2/31.25\n= 0.0056 + 0.0333 + 0.05 = 0.0889
Result: Chi-square = 0.089 < 3.841 โ Population IS in HWE
Frequently Asked Questions
What is the Hardy-Weinberg equilibrium equation?
The Hardy-Weinberg equation states that p squared + 2pq + q squared = 1, where p is the frequency of the dominant allele and q is the frequency of the recessive allele. Additionally, p + q = 1. The term p squared represents the frequency of homozygous dominant (AA) individuals, 2pq represents heterozygous (Aa) carriers, and q squared represents homozygous recessive (aa) individuals. This equation predicts genotype frequencies from allele frequencies in an ideal population at equilibrium, serving as a null model against which evolutionary change can be detected.
What are the five conditions for Hardy-Weinberg equilibrium?
For a population to remain in Hardy-Weinberg equilibrium, five conditions must be met: (1) No mutation, so alleles are not converted from one form to another. (2) Random mating, meaning individuals do not choose mates based on genotype. (3) No natural selection, so all genotypes have equal fitness. (4) Infinitely large population size, eliminating genetic drift. (5) No gene flow, meaning no migration into or out of the population. In reality, no natural population meets all conditions perfectly, but HWE serves as a useful baseline for detecting evolutionary forces.
How do you use Hardy-Weinberg to find carrier frequency?
To find carrier frequency, first determine q squared from the frequency of affected (homozygous recessive) individuals. Take the square root to get q, then calculate p = 1 - q. The carrier frequency is 2pq. For example, if a disease affects 1 in 10,000 people, then q squared = 0.0001, q = 0.01, p = 0.99, and carrier frequency = 2 x 0.99 x 0.01 = 0.0198, or about 1 in 50 people. This application is particularly important in medical genetics for estimating how many people carry a recessive disease allele without showing symptoms.
What causes a population to deviate from Hardy-Weinberg equilibrium?
Any violation of the five HWE assumptions can cause deviation. Natural selection changes allele frequencies by favoring certain phenotypes. Genetic drift causes random fluctuations in small populations. Mutation introduces new alleles. Gene flow (migration) adds or removes alleles. Non-random mating (assortative mating, inbreeding) alters genotype frequencies. Population bottlenecks and founder effects also cause deviations. The chi-square test can detect significant deviations from expected HWE proportions, helping identify which evolutionary forces may be acting.
What is chemical equilibrium and Le Chatelier's principle?
Chemical equilibrium occurs when forward and reverse reaction rates are equal. Le Chatelier's principle states that a system at equilibrium will shift to counteract any change. Adding reactant shifts equilibrium toward products. Increasing temperature favors the endothermic direction.
What inputs do I need to use Hardy Weinberg Equilibrium Calculator accurately?
Each field is labelled with the required unit (metric or imperial). Gather your source values before starting โ for example, a weight measurement in kilograms, a distance in metres, or a dollar amount โ and enter them exactly as measured. The formula section on this page lists every variable and explains what each represents.
References
Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy