HomeArticlesGuideGenetics Calculators Guide
GUIDE

Genetics Calculators Explained: Punnett Squares, Hardy-Weinberg & Allele Frequency

Learn Punnett squares, dihybrid crosses, allele frequency, and Hardy-Weinberg equilibrium step by step, with worked examples and chromosome counting.

Updated 2026-07-06

Overview

Genetics problems — predicting offspring traits, tracking allele frequencies across a population, or counting chromosomes through cell division — all reduce to a handful of well-defined calculations once you know the underlying rules. This guide walks through five genetics calculators that turn textbook formulas into instant answers: Punnett squares for single-gene crosses, dihybrid crosses for two genes at once, Hardy-Weinberg equilibrium for population-level allele math, standalone allele frequency calculations, and chromosome/chromatid counting through the cell cycle.

These tools are built for students working through genetics coursework, anyone reviewing Mendelian inheritance before an exam, and hobbyists curious about how traits like eye color or blood type get passed down. Each section below explains the underlying biology briefly, then shows exactly how to use the corresponding calculator with a worked example.

Step 1: Predicting Offspring with a Punnett Square (Monohybrid Cross)

A Punnett square is a grid that shows every possible combination of alleles two parents can pass to their offspring for a single gene. For a cross between two heterozygous parents (Aa × Aa), the 2×2 grid produces four equally likely offspring genotypes: AA, Aa, Aa, and aa — a 1:2:1 genotype ratio.

If allele A is completely dominant over a, then both AA and Aa offspring display the dominant phenotype, while only aa shows the recessive phenotype. This collapses the 1:2:1 genotype ratio into the classic 3:1 phenotype ratio — 75% dominant, 25% recessive.

The Punnett Square Calculator builds this grid for any pair of parent genotypes (AA, Aa, or aa) you select, instantly showing the resulting genotype and phenotype ratios rather than requiring you to draw the grid by hand.

Worked example: Crossing a heterozygous brown-eyed parent (Bb) with another heterozygous brown-eyed parent (Bb), where brown (B) is dominant over blue (b): the offspring ratio is 1 BB : 2 Bb : 1 bb genotypically, or 3 brown-eyed : 1 blue-eyed phenotypically.

Step 2: Two Genes at Once — The Dihybrid Cross

A dihybrid cross tracks two genes simultaneously, assuming they assort independently (located on different chromosomes, or far enough apart on the same chromosome). Each parent with genotype AaBb produces four gamete types — AB, Ab, aB, ab — each with 25% probability, creating a 4×4 grid with 16 total boxes.

When both genes have simple dominant/recessive relationships, crossing two AaBb individuals produces the famous 9:3:3:1 phenotype ratio: 9/16 show both dominant traits, 3/16 show the first dominant and second recessive trait, 3/16 show the reverse, and 1/16 show both recessive traits.

The Dihybrid Cross Calculator builds the full 16-box grid and tallies the phenotype ratio automatically, which is considerably faster than filling in 16 boxes by hand and is far less error-prone.

Worked example: Crossing AaBb × AaBb where A (round seeds) is dominant over a (wrinkled) and B (yellow) is dominant over b (green) — Mendel's original pea experiment — produces 9 round-yellow : 3 round-green : 3 wrinkled-yellow : 1 wrinkled-green, out of every 16 offspring.

Step 3: Population-Level Allele Frequencies

Zoom out from individual crosses to an entire population, and the relevant question becomes: how common is each allele version across all the gene copies in that population? Allele frequency (p for the dominant allele, q for the recessive allele) is calculated directly from genotype counts:

p = (2 × [homozygous dominant count] + [heterozygous count]) ÷ (2 × total individuals)

Since p and q are the only two alleles for this gene, q = 1 − p.

The Allele Frequency Calculator takes your genotype counts (AA, Aa, aa) directly and returns p and q, removing the need to manually count each allele copy across every individual.

Worked example: In a sample of 200 people with 98 AA, 84 Aa, and 18 aa individuals — p = (2×98 + 84) ÷ 400 = 280 ÷ 400 = 0.70, and q = 0.30.

Step 4: Hardy-Weinberg Equilibrium — What It Tells You About a Population

Hardy-Weinberg equilibrium is a mathematical baseline: if a population isn't experiencing selection, mutation, migration, genetic drift, or non-random mating, allele and genotype frequencies stay constant generation after generation, following the equation:

p² + 2pq + q² = 1

where p² is the expected frequency of homozygous dominant individuals, 2pq is heterozygous individuals, and q² is homozygous recessive individuals. This isn't just a theoretical curiosity — comparing real observed genotype frequencies against this Hardy-Weinberg prediction is a standard way population geneticists detect that some evolutionary force is actively shaping a population.

The Hardy-Weinberg Calculator takes a dominant allele frequency (p) and instantly returns q along with the three predicted genotype frequencies (p², 2pq, q²), which you can then compare against observed data.

Worked example: With p = 0.70 (from the allele frequency example above) and q = 0.30, Hardy-Weinberg predicts p² = 0.49 (49% AA), 2pq = 0.42 (42% Aa), and q² = 0.09 (9% aa) — matching the observed genotype counts exactly in this case, suggesting this population is close to equilibrium for this gene.

Step 5: Chromosome and Chromatid Counts Through Cell Division

A species' diploid chromosome number (2n) describes how many chromosomes are in a typical somatic (body) cell — 46 in humans, for example. But that number isn't constant throughout the cell cycle: after DNA replication in S-phase, each chromosome consists of two identical sister chromatids joined at a centromere, doubling the DNA content and chromatid count while the chromosome count itself stays the same until the chromatids separate during division.

Gametes (sperm and egg cells) are haploid — carrying just one set of chromosomes (n, or 23 in humans) — so that fertilization restores the full diploid number in the resulting offspring.

The Chromosome Number Calculator takes a species' diploid number and a cell-cycle stage (somatic/diploid, gamete/haploid, or post-replication) and returns the correct chromosome and chromatid count for that stage, a distinction that trips up many students first learning mitosis and meiosis.

Worked example: For a human somatic cell (2n = 46) after S-phase replication but before division — chromosome count stays at 46, but chromatid count doubles to 92, since each of the 46 chromosomes now has two sister chromatids.

Key Terms

  • Punnett Square — a grid diagram used to predict the probability of offspring genotypes from a genetic cross
  • Hardy-Weinberg Equilibrium — the state where allele and genotype frequencies remain constant across generations absent evolutionary forces
  • Allele Frequency — how common a specific version of a gene is across all copies in a population
  • Genotype — the actual allele combination an individual carries for a gene (e.g. Aa)
  • Phenotype — the observable trait produced by a genotype (e.g. brown eyes)
  • Dihybrid Cross — a genetic cross tracking two independently assorting genes at once
  • Diploid / Haploid — diploid cells carry two sets of chromosomes (somatic cells); haploid cells carry one set (gametes)
  • Chromatid — one of two identical copies of a replicated chromosome, joined at a centromere

Frequently Asked Questions

A Punnett square predicts the probability of offspring genotypes and phenotypes from a genetic cross between two parents. For a monohybrid cross between two heterozygotes (Aa × Aa), the square shows a 1:2:1 genotype ratio (AA:Aa:aa) and, if A is dominant, a 3:1 phenotype ratio. Use the [Punnett Square Calculator](/punnett-square-calculator/) to generate the grid instantly for any pair of alleles.
A monohybrid cross tracks one gene (a 2×2 grid, 4 boxes), while a dihybrid cross tracks two independently assorting genes at once (a 4×4 grid, 16 boxes). A classic dihybrid cross between two double heterozygotes (AaBb × AaBb) produces the well-known 9:3:3:1 phenotype ratio. The [Dihybrid Cross Calculator](/dihybrid-cross-calculator/) builds the full 16-box grid automatically.
Hardy-Weinberg equilibrium describes a population where allele and genotype frequencies stay constant across generations because no evolutionary forces (selection, mutation, migration, drift, or non-random mating) are acting. The equation p² + 2pq + q² = 1 predicts genotype frequencies from allele frequencies p and q — if real population data deviates significantly from this prediction, it signals that one of those forces is at play. The [Hardy-Weinberg Calculator](/hardy-weinberg-calculator/) computes the expected genotype split from an entered allele frequency.
Allele frequency p (dominant allele) = (2 × AA count + Aa count) ÷ (2 × total individuals), and q (recessive allele) = 1 − p. For example, in a population of 100 people with 49 AA, 42 Aa, and 9 aa, p = (2×49 + 42) ÷ 200 = 140 ÷ 200 = 0.70, and q = 0.30. The [Allele Frequency Calculator](/allele-frequency-calculator/) performs this calculation directly from genotype counts.
During S-phase, each chromosome replicates its DNA to form two identical sister chromatids joined at a centromere — this is still counted as one chromosome (with two chromatids) until the chromatids separate during cell division. A human somatic cell has 46 chromosomes before and immediately after replication, but 92 chromatids after replication, dropping back to 46 single-chromatid chromosomes once mitosis completes. The [Chromosome Number Calculator](/chromosome-number-calculator/) walks through chromosome and chromatid counts at each stage.
Genotype is the actual allele combination (like Aa or aa), while phenotype is the observable trait that combination produces (like brown eyes or blue eyes). In a simple dominant/recessive cross, both AA and Aa genotypes produce the same dominant phenotype, which is why a 1:2:1 genotype ratio becomes a 3:1 phenotype ratio.
No — a Punnett square shows probabilities across many offspring, not a guarantee for any single child. A 3:1 phenotype ratio means each individual offspring has a 75% chance of the dominant phenotype and a 25% chance of the recessive phenotype, independent of what any siblings turned out to be.
Each parent in a dihybrid cross (AaBb) produces 4 possible gamete types (AB, Ab, aB, ab) through independent assortment, so the cross grid has 4 × 4 = 16 boxes total, though many boxes share the same genotype. This collapses to the standard 9:3:3:1 phenotype ratio when A and B are both dominant over their recessive counterparts.
Five main forces disrupt equilibrium: natural selection (some genotypes reproduce more), genetic drift (random chance in small populations), mutation (new alleles arising), gene flow (migration introducing new alleles), and non-random mating (like assortative mating). Real populations almost always deviate somewhat from the idealized equilibrium, which is precisely why the model is useful as a null hypothesis to test against.
Allele frequency measures how common a specific allele (like A or a) is across all gene copies in a population, while genotype frequency measures how common a specific combination (like Aa) is across individuals. Hardy-Weinberg connects the two: if you know allele frequencies p and q, you can predict genotype frequencies as p², 2pq, and q² — assuming the population is in equilibrium.
The [Punnett Square Calculator](/punnett-square-calculator/) here models simple autosomal (non-sex-linked) monohybrid crosses. Sex-linked traits (carried on the X or Y chromosome) follow different inheritance patterns since males and females have different chromosome combinations — those require a modified cross diagram not covered by this basic tool.
Human somatic (body) cells are diploid with 46 chromosomes (23 pairs), while gametes are haploid with 23 chromosomes — exactly half, since fertilization restores the diploid number by combining one gamete from each parent. The [Chromosome Number Calculator](/chromosome-number-calculator/) shows this haploid/diploid distinction for any species' chromosome number.

Related Articles

GUIDE

Molecular & Cellular Biology Calculators: DNA, Metabolism & Population Growth

GUIDE

From Reactants to Results: Yield & Combustion Explained

GUIDE

Up on the Roof: Pitch, Rafters & Shingles Explained

GUIDE

Hemodynamic and Cardiac Valve Calculators Explained

GUIDE

Clinical Risk Scores Explained: Cardiology & Emergency Medicine Calculators