Allele Frequency Calculator
A small disease frequency can hide a much larger carrier pool. This allele frequency calculator uses Hardy-Weinberg reasoning to turn an affected recessive disease frequency into the allele frequencies p and q, the expected carrier frequency 2pq, and a rounded carrier ratio. It is built for population-genetics learning and rough screening context, not for personal genetic counseling.
What it measures
The calculator assumes a two-allele recessive model. The disease frequency you enter is treated as the affected homozygote frequency, traditionally written as q squared. From that single number, the calculator estimates the disease-associated allele frequency q, the other allele frequency p, and the expected heterozygote carrier frequency. This is the classic Hardy-Weinberg shortcut used when an autosomal recessive condition is rare enough that affected frequency is easier to observe than carrier frequency.
For decimal practice, the percentage calculator can help convert between percent, fraction, and decimal inputs. If you are comparing this with other growth or compounding models, see the compound growth calculator and the bacteria growth calculator. For concentration-style genetics lab work, the molarity calculator may be useful, but it answers a different question.
Formula used by the calculator
The Hardy-Weinberg model for two alleles is:
This calculator starts with disease frequency as q squared:
Then it calculates the other allele frequency:
Finally, it calculates the expected carrier frequency:
The carrier ratio shown in the result hint is not a separate biological calculation. The 1:N ratio is one divided by carrier frequency, rounded to the nearest whole number.
Example: calculating allele frequency
Use the default disease frequency, 0.0004. That corresponds to 1 affected individual per 2,500 in the model.
The calculator displays carrier frequency as 0.0392. For the carrier ratio, it computes one divided by 0.0392, which is about 25.51, and rounds to 26. The hint therefore reads 1:26. In plain language, the model predicts about 3.92 percent carriers, or roughly 1 carrier in 26 people, under the stated assumptions.
Interpretation and assumptions
Carrier frequency is not disease frequency. Disease frequency in this page is q squared, while carrier frequency is 2pq. For rare recessive conditions, carriers can be much more common than affected people because only one disease-associated allele is needed to be a carrier, but two are needed to be affected in the simplified model.
Hardy-Weinberg equilibrium is a null model. It assumes a large population with random mating and no meaningful selection, mutation, migration, or drift for the allele being considered. Human populations can violate those assumptions through ancestry structure, founder effects, consanguinity, differential survival, and changing reproductive patterns. That does not make the calculation useless; it means the output should be read as an estimate conditional on the model.
Reading the affected-frequency input
The hardest part of using this calculator is often not the algebra; it is deciding whether the input really belongs in the q-squared position. A registry prevalence, a newborn-screening rate, and a published incidence can describe different things depending on survival, ascertainment, diagnostic criteria, and age. For a recessive Hardy-Weinberg estimate, the cleanest input is the fraction of people in the population who are affected because they carry two disease-associated alleles for the same condition. If the source reports one case per N people, enter one divided by N. If it reports a percent, divide by 100 before entering it.
The calculator also does not accept genotype counts directly. When you have counts of AA, Aa, and aa individuals, allele frequency should be computed from allele counts instead: count two alleles for each homozygote and one for each heterozygote, then divide by twice the number of individuals. That is a different workflow from the disease-frequency shortcut used here.
Limitations and common mistakes
Do not enter a percentage without converting it. A disease frequency of 0.04 means 4 percent, not 1 in 4,000. Do not use this calculator for dominant conditions, X-linked inheritance, multiallelic disorders, incomplete penetrance, or conditions where affected frequency is not well represented by q squared. Also avoid mixing population data: using a disease frequency from one ancestry group to discuss another can be misleading.
At the upper endpoint, a disease frequency of 1 gives q = 1, p = 0, and a carrier frequency of 0. Because a reciprocal carrier ratio is undefined there, the result reports that the model has no heterozygous carriers rather than displaying an infinite ratio.
Sources
- Khan Academy, Hardy-Weinberg mechanisms of evolution — educational reference for Hardy-Weinberg assumptions and equations.
- OpenStax Biology 2e, Population Genetics — teaching reference for allele frequency and Hardy-Weinberg equations.
- MedlinePlus Genetics, Risk assessment for genetic disorders — patient-facing context for family history, inheritance, and risk estimates.