Hardy-Weinberg Equilibrium Allele (p, q) & Carrier Frequency Calculator

Solve p + q = 1 and p² + 2pq + q² = 1 across a population sample.

Heterozygous Carrier Frequency (2pq) 32 %
Dominant Allele Frequency (p) 0.8 p
Recessive Allele Frequency (q) 0.2 q
Carriers in Cohort (2pq × N) 3,200 carriers
Inputs
Try:
%
Percentage of population expressing the homozygous recessive trait (q² %).
individuals
Total population cohort size to project genotype counts.
Results & Graph
Heterozygous Carrier Frequency (2pq)
32 %
Dominant Allele Frequency (p)
0.8 p
Recessive Allele Frequency (q)
0.2 q
Carriers in Cohort (2pq × N)
3,200 carriers

Heterozygous Carrier Frequency (2pq)

Graph 1 • How the inputs feed Hardy-Weinberg Equilibrium
Hardy-Weinberg Equilibrium Allele (p, q) & Carrier Frequency Calculator • Custom Domain Schematic (Molecular Biology & Genetics) recessiv → populatiPhysical Response & Transfer Law (Hardy-Weinberg Equilib) Recessive Trait Incidence Pct: 4 % • Population Sample Size: 10.0k individuals HETEROZYGOUS CARRIER FREQU 32 % • Dominant Allele Freque: 0.8 p • Recessive Allele Frequ: 0.2 q Eq: q = √(RecessivePhenotypeFraction
Graph 2 • Heterozygous Carrier Frequency (2pq) as Recessive Trait Incidence Pct changes (40% to 160% of current)
0 % 20.79 % 41.58 % 22.10 1.60% 26.18 2.40% 29.38 3.20% 32 4% 34.22 4.80% 36.13 5.60% 37.80 6.40%
Graph 3 • Recessive Trait Incidence Pct and Population Sample Size together Compares Heterozygous Carrier Frequency (2pq) when Population Sample Size is shifted +25% (solid) vs. −25% (dashed).
0 % 19.37 % 38.73 % --- Population Sample Size @ 75% 27.87 -30% 30.08 -15% 32 +0% 33.70 +15% 35.21 +30%
Summary: With q² = 4% recessive phenotype, allele frequencies are p = 0.8 and q = 0.2, and 32% (3,200 individuals) are heterozygous carriers.
Summary: With q² = 4% recessive phenotype, allele frequencies are p = 0.8 and q = 0.2, and 32% (3,200 individuals) are heterozygous carriers.
Interactive chart & math engine powered by CalculatorGraph

Formula: Hardy-Weinberg Equilibrium Reference Equation

q = RecessivePhenotypeFraction
p = 1 − q
CarrierFrequency = 2 × p × q
q = √(RecessivePhenotypeFraction); p = 1 − q; CarrierFrequency = 2 × p × q
  • recessiveTraitIncidencePct: Recessive Trait Incidence Pct (%)
  • populationSampleSize: Population Sample Size (individuals)

Frequently Asked Questions

Why does the page show p as 0.85 at 2.4% incidence when the text says 0.845?

The supporting line rounds p and q to two decimals, while the sentence underneath keeps three. The square root of 0.024 is about 0.155, so p is about 0.845. The carrier figure of 26.18% is worked from the unrounded values, so it is accurate. Use more decimals when you check by hand.

What share of the population is homozygous dominant?

That is p², which the page does not list as its own line. Square the dominant allele frequency it shows. At the default p = 0.8 that gives 0.64, so 64% of the population carry two dominant copies. Together with 32% carriers and 4% affected, the three groups add to 100%.

Can I use this for an X-linked trait?

Not directly. For X-linked recessive traits, males have one X, so the share of affected males equals q itself, not q². Females follow p², 2pq and q². Entering male incidence here would square root it and give the wrong allele frequency. You would need to take q straight from the male rate instead.

Does the calculator work for a dominant trait?

Only if you enter the frequency of people who do not show it. For a dominant trait, unaffected people are the homozygous recessive group, so their share is q². Enter that as the incidence and the page gives correct p, q and 2pq. Entering the affected share would give nonsense, since it includes two genotypes.

Why do carriers drop when incidence goes above 25%?

Carrier frequency 2pq is largest when p and q are equal at 0.5. That corresponds to 25% incidence and 50% carriers. Beyond that, q is larger than p, and more people inherit two recessive copies than one. At 100% incidence nobody is a carrier, because the dominant allele has disappeared.

Is the 2pq figure the chance that my partner is a carrier?

Not quite, if your partner does not show the trait. Their chance is 2pq divided by the unaffected share, 1 minus q². At the default that is 32% divided by 96%, or one in three. The page shows the population figure only, so do this extra division yourself for a known unaffected person.

What does a small change in incidence do to carriers?

Less than you might expect. Going from 4% to 6% incidence raises carriers from 32% to 36.99%, a rise of about five points for a two point change in incidence. The square root flattens the effect. For rare traits the carrier rate is roughly twice the square root of the incidence.

Should I enter the incidence as a fraction or a percentage?

As a percentage, because the field is labelled in percent. Type 4 for 4%, not 0.04. If you enter 0.04, the page reads it as 0.04%, a much rarer trait, and returns q = 0.02 with about 3.92% carriers. Both answers are valid; they just describe very different populations.

Do real populations follow these numbers exactly?

Rarely. Inbreeding, selection, migration and small population size all push genotype shares away from Hardy-Weinberg proportions. The page is a model of an ideal population and is best used for teaching, quick estimates and checking homework. For a real population, published genotyping data beats a calculation from incidence.

Why is the carrier count not a whole number?

The page multiplies the exact carrier frequency by the cohort size, so at 2.4% incidence you see 2,618.39 carriers. It is an expected value, not a literal tally. Round it for an answer, and treat it as an estimate that a real survey of that population would only roughly match.

Can I enter a carrier frequency and get the incidence back?

Not directly, because the only input is incidence. You can work backwards by trial: enter a guess, read the carrier figure, and adjust. For rare traits a faster route is to halve the carrier frequency to get q, square it, and enter that as the incidence to confirm the page agrees.

Does it matter if the trait has incomplete penetrance?

Yes. If some people with genotype aa never show the trait, the observed incidence is lower than the true q². The page would then underestimate q and the carrier rate. Corrections for penetrance need the penetrance figure itself, which the calculator does not ask for, so the result should be read as a lower bound.

From 4% affected to 32% carriers

The default enters a recessive trait seen in 4% of a population of 10,000 people. That 4% is q², the share of people with two copies of the recessive allele. The page takes its square root to get q = 0.2, subtracts that from 1 to get p = 0.8, and then multiplies 2 × 0.8 × 0.2 to reach the headline: 32% of the population are heterozygous carriers, or 3,200 people in the cohort.

The striking part is the ratio. Four people in a hundred show the trait, yet thirty two in a hundred carry one copy of the allele without showing it. Carriers outnumber affected people eight to one at this incidence. Most copies of a recessive allele are hidden in people who look entirely unaffected, which is the main lesson most Hardy-Weinberg questions are built to teach.

The other genotype class is easy to fill in from the same numbers. Homozygous dominant people make up p², which is 0.64, or 64%. Add 64, 32 and 4 and you get 100, which is the second Hardy-Weinberg equation checking itself.

Notice what the page does not need. It never asks how many people carry the dominant allele or how many are unaffected. One observed number, the share showing the recessive trait, is enough to fill in the whole table, as long as the population meets the assumptions described further down. That economy is what makes the model useful, and also what makes it fragile.

Why the square root comes first

The only thing you can usually observe for a recessive trait is who shows it. Dominant homozygotes and carriers look the same, so you cannot count p² or 2pq directly. The recessive phenotype is different: everyone who shows it has genotype aa, so its frequency is q² and nothing else.

That is why the calculator asks for incidence and takes a square root. It is the one route from something observable to an allele frequency. Once q is known, p follows from p + q = 1, and every genotype frequency follows from those two numbers.

A common slip is entering the incidence as q instead of q². If you type 4% believing it is the allele frequency, the page will still square root it and report q = 0.2, which is a different population. Check what your question actually gives you. If it gives an allele frequency, square it first and enter that as the incidence.

Working the default by hand takes three lines. The square root of 0.04 is 0.2. One minus 0.2 is 0.8. Two times 0.8 times 0.2 is 0.32. If your calculator gives anything else, check whether you converted the percentage to a fraction before taking the root. The square root of 4 is 2, which would give an impossible allele frequency, so the conversion step matters.

Rare traits: carriers are far more common than they look

The page's own comparison runs from 2.4% to 6% incidence. At 2.4% the carrier frequency is 26.18%, about 2,618 people in the cohort. At 6% it rises to 36.99%, about 3,699 people. A change of a few points in incidence moves the carrier rate by much less, because of the square root.

The effect is more dramatic for genuinely rare conditions. Enter 0.04% incidence and the page gives q = 0.02, p = 0.98 and a carrier frequency of 3.92%. That is 98 times the rate of affected people. When q is small, 2pq is close to 2q, so a quick estimate is simply twice the square root of the incidence.

This is why population screening for recessive conditions turns up far more carriers than patients. A condition affecting a tiny fraction of births can still have carriers in every few dozen people. The calculator makes that arithmetic quick to check for any incidence you enter.

The rule of thumb also works in reverse. If a question says one person in fifty is a carrier of a rare recessive allele, then 2q is about 0.02, so q is about 0.01 and the expected incidence is q², about 0.01%. Entering 0.01 into the page confirms it: q comes back as 0.01 and carriers at just under 2%.

The ceiling at 50% carriers

Carrier frequency cannot rise forever. It peaks when p and q are equal at 0.5, which happens at 25% incidence. Enter 25% and the page returns 50% carriers, half of the default cohort. Push incidence higher and the carrier share falls again, because the recessive allele is now so common that more people have two copies than one.

At the extreme, 100% incidence gives q = 1, p = 0 and no carriers at all, since everyone is homozygous recessive. The page handles that correctly. Entries outside the possible range, 0% or anything above 100%, produce a message asking for an incidence above 0% and up to 100% instead of a result, and the population must be at least 1.

Carrier odds for someone who does not show the trait

Genetics problems often ask a slightly different question from the one on the page. Not "what share of the population are carriers", but "what is the chance that an unaffected person is a carrier". The answer is not 2pq. You have to remove the affected people from the denominator first.

Using the default, unaffected people make up 96% of the population, and carriers are 32%. So the chance that a person who does not show the trait is a carrier is 32 divided by 96, one in three. The page reports 32% because it describes the whole population, affected people included.

This conditional figure is the one that matters when two unaffected people want to know their chance of having an affected child. If each has a one in three chance of being a carrier, and two carriers have a one in four chance per child, the combined figure is one in three times one in three times one in four, or 1 in 36. The page gives you the 2pq input to that chain; the rest has to be worked out by hand.

Assumptions behind every figure

Hardy-Weinberg proportions only hold in an idealised population. Mating has to be random with respect to the gene. There must be no selection for or against any genotype, no new mutation, no migration in or out and a population large enough that chance drift is negligible. Real populations bend most of these rules a little and some of them a lot.

Inbreeding and assortative mating are the usual reasons real numbers differ. Both raise the share of homozygotes above p² and q², so the incidence you observe is higher than random mating would give for the same allele frequency. Working backwards from that incidence then overstates q and the carrier rate.

The calculation also assumes a single gene with two alleles and a trait that is fully recessive and always expressed. Where several different alleles cause the same condition, or some people with genotype aa never show the trait, the incidence you enter is not a clean q², and the page's results are approximate at best.

None of this makes the model useless. It gives a baseline. When observed genotype counts differ sharply from what the page predicts, that difference is itself evidence that something, such as selection or population structure, is acting on the gene.

What the sample size field does

Population sample size has one job: it converts the carrier frequency into a head count. At the default 10,000 individuals, 32% becomes 3,200 carriers. Change the size and the count scales in proportion while p, q and every frequency stay exactly the same.

It is not a statistical sample in the sense of an estimate with error bars. If you counted affected people in a real sample, your measured incidence carries sampling uncertainty, and that uncertainty grows after the square root, especially for rare traits where only a handful of cases were seen. The page does not show any confidence interval.

You may also see fractional people, such as 2,618.39 carriers at 2.4% incidence. That is the exact expected value from the formula. Round it to a whole number for a written answer, and remember it is an expectation, not a count you would find on the ground.

For revision questions, the cohort size is mostly a convenience. Many textbook problems use a round population so that answers come out as whole people. The default of 10,000 does exactly that at 4% incidence, which is why the default answer of 3,200 carriers is so tidy.

Testing whether a population is in equilibrium

The calculator assumes equilibrium and works forward from it. It cannot tell you whether a population is in equilibrium in the first place. That needs observed counts of all three genotypes, which you only have for codominant traits or genotyped samples.

With those counts, the usual approach is to estimate p and q from the alleles you actually counted, work out the expected numbers of each genotype, and compare expected with observed using a chi-square test. A large difference suggests one of the assumptions is broken.

For a recessive phenotype you cannot do that check, because two genotypes look identical. You have to accept equilibrium as an assumption, which is exactly what this page does. It is a fair approach for classroom problems and quick estimates, and a weak one for drawing conclusions about a specific real population.