Dihybrid Cross – Punnett Square Calculator

Model two‑gene inheritance with custom alleles recombination and dominance options generate gametes build a 4×4 Punnett square compute genotype frequencies phenotype distributions charts and exports use linkage with cis or trans phase set incomplete dominance for heterozygotes scale expected counts load presets and learn formulas and steps for practical labs classes teaching and research.

Inputs
Exactly four letters using your allele symbols (e.g., A/a and B/b).
Case matters: uppercase for dominant allele.
Expected counts scale (default 16 for classical grid).
Use uppercase for dominant allele symbols and lowercase for recessive (e.g., A/a, B/b).
Advanced genetics options
If a parent is heterozygous at both loci, you can set phase (cis/trans) and a recombination fraction to adjust gamete frequencies.
r = cM / 100. Use 50 for independent assortment.
Incomplete dominance adds an intermediate phenotype category for heterozygotes.
Codominance is visualized as split color bands per trait inside each Punnett cell; heterozygotes show a 50–50 split.
Color legend
Bands in each Punnett square cell show Trait 1 (top band) and Trait 2 (bottom band). Heterozygotes under codominance split the band into two colors.
Trait 1 dominant
Trait 1 hetero (codom)
Trait 1 hetero (incomplete)
Trait 1 recessive
Trait 2 dominant
Trait 2 hetero (codom)
Trait 2 hetero (incomplete)
Trait 2 recessive
Example presets

Click “Load” to copy into the inputs.

#Parent 1Parent 2Alleles
1AaBbAaBbA/a & B/b
2AABbAabbA/a & B/b
3AaBBaabbA/a & B/b
4aaBbAaBbA/a & B/b
Results
Parent 1 gametes
Parent 2 gametes
Genotype summary
Phenotype summary
Example data table
CrossExpected phenotype ratioExpected dominant traitsNotes
AaBb × AaBb9:3:3:1Both: 9/16, First only: 3/16, Second only: 3/16, None: 1/16Classical F₂ under independent assortment
AABb × Aabb1:1:0:0 (by phenotype grouping)Both or first only depending on B segregationSkewed ratios when a locus is fixed
AaBB × aabb1:1:0:0 (both vs none)Both: 1/2, None: 1/2Test cross revealing heterozygosity at A
Formula used

Gametes (product rule or linkage): Without linkage, per‑locus segregation multiplies (heterozygous = 1/2 for each allele; homozygous = 1). With linkage and a double‑heterozygote in phase AB/ab (cis), gamete probabilities are AB: (1−r)/2, ab: (1−r)/2, Ab: r/2, aB: r/2. For Ab/aB (trans), swap parentals and recombinants.

Zygote probabilities: P(zygote) = P(gamete₁) × P(gamete₂). The 4×4 grid enumerates all combinations.

Phenotype mapping: Complete dominance: heterozygote = dominant class. Incomplete dominance: heterozygote = intermediate class. Codominance: heterozygote = “both” class; visualized as split bands per trait.

Independent assortment: r = 0.5 (≈50 cM). Linkage reduces recombinant gametes to r/2 each and increases parentals to (1−r)/2 each.

How to use this calculator
  1. Enter Trait 1 and Trait 2 allele symbols (uppercase dominant, lowercase recessive).
  2. Type parental genotypes as four letters (e.g., AaBb).
  3. (Optional) Toggle linked genes and pick a phase (cis or trans) whenever a parent is double‑heterozygous; set recombination distance in cM.
  4. (Optional) Enable incomplete dominance or codominance per trait for appropriate phenotype classification and visuals.
  5. Click Compute to generate gametes, the Punnett square, summaries, and bands; adjust N offspring to scale expected counts.
  6. Use Export CSV or Export PDF to save your results; load presets to try common crosses.
Assumptions: diploid organisms and equal segregation. Linkage uses a simple two‑point model (no interference). Codominance/incomplete dominance affect phenotyping; bands are a visual aid.
FAQs

Each cell shows two thin bars: the top bar is Trait 1 and the bottom bar is Trait 2. Homozygotes show a single color; heterozygotes show a split bar under codominance or a blended color under incomplete dominance.

Codominance takes precedence for visualization and phenotyping; heterozygotes enter the “both” class and the band is split 50–50. Disable codominance to use the intermediate class and blended color.

No—genotype probabilities are determined by gamete frequencies (with or without linkage). Codominance only changes how heterozygotes are grouped and displayed.

Yes—edit the CSS variables --t1-dom, --t1-int, --t1-rec, --t2-dom, --t2-int, and --t2-rec at the top of the file.

Expected ratios are long‑run averages. Small samples show random variation. Increase N or combine replicates to approach theoretical values.

When a parent is double‑heterozygous and linkage is enabled, you choose cis or trans phase and a recombination distance in cM. Parentals have probability (1−r)/2 each; recombinants r/2 each.

Yes. The PDF export captures the full grid including color bands, gamete probabilities, and summaries.

Related Calculators

Allele Frequency CalculatorTrihybrid Cross Calculator – Punnett Square

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.