Punnett square calculator
Cross two parents for one gene and see the whole grid: Aa × Aa gives one AA, two Aa and one aa, a 1:2:1 genotype ratio and a 3:1 dominant-to-recessive phenotype ratio. No allele gets flipped or counted once too few. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Parent1
- Aa
- Parent2
- Aa
- Gene
- A
- Cross
- Aa x Aa
- Gametes1
- A, a
- Gametes2
- A, a
A Punnett square is the classroom diagram that turns two parental genotypes into the four equally likely offspring of a monohybrid cross. Students, tutors, and exam platforms need the genotype counts, the reduced genotype ratio, and the dominant-versus-recessive phenotype ratio without flipping an allele or forgetting that heterozygous cells are counted twice. This Punnett square calculator accepts the two-allele genotype of each parent, splits each parent into gametes, fills the classic two-by-two grid, and returns every cell together with the genotype and phenotype ratios. A genotype that is not two valid alleles of one gene is rejected as invalid input instead of a silently empty grid.
What a monohybrid Punnett square computes
A monohybrid Punnett square asks a single question: if each parent carries two alleles of one gene and donates exactly one of those alleles to a gamete, what genotypes appear among the four equally likely offspring, and how often? The two alleles of the first parent become the row headers of a two-by-two grid; the two alleles of the second parent become the column headers; each cell is the pair formed by one row allele and one column allele.
Because every cell is equally likely, the genotype probability is simply the number of cells that show that genotype divided by four. Heterozygous cells are written with the dominant capital letter first, so aA and Aa collapse to the same genotype. Phenotype follows complete dominance: any cell that still carries a capital allele expresses the dominant trait, and only the homozygous recessive genotype expresses the recessive trait.
That is why the classic heterozygous-by-heterozygous cross is one AA, two Aa, and one aa — a genotype ratio of one-to-two-to-one — and a phenotype ratio of three dominant to one recessive. Homozygous-dominant by homozygous-recessive fills every cell with the heterozygote, so both ratios collapse to one. Heterozygous by homozygous-recessive splits the grid in half and yields a one-to-one genotype ratio and a one-to-one phenotype ratio.
The diagram is not a population-genetics model and does not estimate allele frequencies across a herd; it is the Mendelian counting argument for one fertilisation at a time, which is exactly what homework, exam oracles, and breeding worksheets ask for when they say Punnett square.
What you can do with it
Classroom monohybrid homework
Let students submit two parental genotypes such as Aa and Aa and check the one-to-two-to-one genotype ratio and the three-to-one phenotype ratio.
Exam and LMS auto-grading
Mark Punnett-square items with a deterministic oracle that rejects a genotype that is not two valid alleles and never invents extra cells.
Breeding and notebook checks
Compute Mendelian offspring fractions for a planned monohybrid mating before committing greenhouse space or a litter, without a spreadsheet.
FAQ
How do I compute a monohybrid Punnett square?
Send parent1 and parent2 as two-allele genotypes of one gene (for example Aa and Aa).
What happens if a genotype is not two valid alleles?
A genotype must be two letters of one gene such as Aa, AA, or aa. A single letter, digits, or two different genes such as AB are rejected and are not billed.
How are phenotype ratios decided?
The calculator uses complete dominance. Any cell with a capital allele is dominant; only the homozygous recessive genotype is recessive. Aa times Aa therefore yields a three-to-one phenotype ratio.
Does this Punnett square handle dihybrid crosses?
A 16-cell dihybrid board is outside the contract.
What does a cross of AA with aa give?
Every one of the four cells is the heterozygote Aa, so all offspring show the dominant trait. Both the genotype ratio and the phenotype ratio collapse to a single type, reported as 1.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/bio/punnett-square \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"parent1":"Aa","parent2":"Aa"}'const res = await fetch("https://api.kit.forhosting.com/bio/punnett-square", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"parent1": "Aa",
"parent2": "Aa"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/bio/punnett-square",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"parent1": "Aa",
"parent2": "Aa"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/bio/punnett-square", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"parent1":"Aa","parent2":"Aa"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"parent1":"Aa","parent2":"Aa"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/bio/punnett-square", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"parent1": "Aa",
"parent2": "Aa"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "bio.punnett_square",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Input contract, response fields, and validation errors
Each value must be two valid alleles of a single gene — two Latin letters that name the same locus, such as Aa, AA, or aa. Optional separators are accepted so A/a, A a, and A,a mean the same pair. Both parents must share one gene: Aa times Bb is not a monohybrid cross and is rejected on the same rule. POST a JSON body with two required genotypes: parent1 and parent2. Short aliases work the same way: mother, p1, and genotype1 for the first parent; father, p2, and genotype2 for the second. Missing fields, empty strings, a single letter, three letters, digits, and two different gene letters such as AB all fail with invalid_input and a message that the genotype is not two valid alleles. On success the body echoes the normalised genotypes with the dominant allele first, names the gene, restates the cross, lists the four square cells in row-major order, and reports every observed genotype and phenotype with its count, probability, and percent. genotype_ratio and phenotype_ratio are the counts reduced by their greatest common divisor, omitting types that did not appear so a uniform grid is reported as 1 rather than four-to-zero. offspring_count is always four. Failed validation is not billed; successful calls use prepaid KIT balance at the published $0.002 base price per item. Pair the JSON with your own drawing code if you need a printable grid; this endpoint returns the cells and the ratios, not an image, and it never invents a fifth cell or a dihybrid board.
Where a Punnett square calculator earns its keep
Biology classrooms and tutoring platforms use a Punnett square calculator so learners can check a monohybrid cross for arbitrary parental genotypes without losing a heterozygous cell or swapping a phenotype. Keep requests small, pin the rounded probabilities in tests, and you get reproducible ratios for homework, LMS plugins, and edge workers without standing up a computer-algebra system of your own. Exam-prep generators need a deterministic oracle that marks wrong a genotype that is not two valid alleles instead of silently returning an empty success payload a buggy grader might treat as a pass. Plant and animal breeding notebooks reduce a planned mating to parent1 times parent2 when they only need the Mendelian fractions before they commit greenhouse space or a litter; calling a tiny parse API avoids a spreadsheet that reformats Aa as a date. The calculator does not treat dihybrid crosses, sex linkage, incomplete dominance, or lethal alleles — send two monohybrid genotypes and read genotype_ratio and phenotype_ratio as the complete-dominance Mendelian counts for that one mating.
Technical questions
What does the Punnett square calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.