{
  "id": "blood-type",
  "version": "fde670351504",
  "status": "published",
  "name": "Blood Type Calculator",
  "question": "What blood type can our child have?",
  "summary": "Gives the blood types a child can and cannot have from the parents’ ABO and Rh blood types, with the chance of each ABO type and of Rh positive or negative.",
  "category": "biology",
  "subcategory": "genetics",
  "url": "https://www.acalculator.org/biology/blood-type-calculator",
  "markdown": "https://www.acalculator.org/biology/blood-type-calculator.md",
  "kind": "function",
  "method": "Each parent passes one ABO allele and one Rh allele, each with chance 1/2; A and B are codominant over O, and RhD positive (D) is dominant over RhD negative (d).",
  "assumptions": [
    "A parent typed only by blood type may carry either genotype (A: AA or AO; Rh+: DD or Dd), so each chance is shown as the lowest to the highest over those genotypes.",
    "The ABO and Rh genes are inherited independently.",
    "Rare variants (such as the Bombay phenotype, cis-AB and weak D) are not counted; a blood test is the only way to know a child’s type."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "p1": {
        "title": "Parent 1 blood type",
        "description": "Parent 1’s ABO blood type; pick the genes too if a test or the family shows them.",
        "type": "string",
        "enum": [
          "A",
          "B",
          "AB",
          "O",
          "AA",
          "AO",
          "BB",
          "BO"
        ]
      },
      "r1": {
        "title": "Parent 1 Rh factor",
        "description": "Parent 1’s Rh (RhD) factor; pick the genes too if they are known.",
        "type": "string",
        "enum": [
          "pos",
          "neg",
          "DD",
          "Dd"
        ]
      },
      "p2": {
        "title": "Parent 2 blood type",
        "description": "Parent 2’s ABO blood type; pick the genes too if a test or the family shows them.",
        "type": "string",
        "enum": [
          "A",
          "B",
          "AB",
          "O",
          "AA",
          "AO",
          "BB",
          "BO"
        ]
      },
      "r2": {
        "title": "Parent 2 Rh factor",
        "description": "Parent 2’s Rh (RhD) factor; pick the genes too if they are known.",
        "type": "string",
        "enum": [
          "pos",
          "neg",
          "DD",
          "Dd"
        ]
      }
    }
  },
  "outputs": {
    "types": {
      "label": "Possible blood types",
      "description": "Every ABO and Rh blood type the child can have.",
      "format": "text"
    },
    "impossible": {
      "label": "Not possible",
      "description": "The blood types the child cannot have from these parents.",
      "format": "text"
    },
    "a": {
      "label": "Chance of type A",
      "description": "The chance the child is type A; a range when a parent’s genes are not known.",
      "format": "text"
    },
    "b": {
      "label": "Chance of type B",
      "description": "The chance the child is type B.",
      "format": "text"
    },
    "ab": {
      "label": "Chance of type AB",
      "description": "The chance the child is type AB.",
      "format": "text"
    },
    "o": {
      "label": "Chance of type O",
      "description": "The chance the child is type O.",
      "format": "text"
    },
    "pos": {
      "label": "Chance of Rh positive",
      "description": "The chance the child is Rh positive.",
      "format": "text"
    },
    "neg": {
      "label": "Chance of Rh negative",
      "description": "The chance the child is Rh negative.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "p1": "A",
      "r1": "pos",
      "p2": "B",
      "r2": "pos"
    },
    "outputs": {
      "types": "A+, A−, B+, B−, AB+, AB−, O+, O−",
      "impossible": "None",
      "a": "0% to 50%",
      "b": "0% to 50%",
      "ab": "25% to 100%",
      "o": "0% to 25%",
      "pos": "75% to 100%",
      "neg": "0% to 25%"
    },
    "text": "The child can have blood type A+, A−, B+, B−, AB+, AB−, O+, O−."
  },
  "examples": [
    {
      "given": {
        "p1": "A",
        "r1": "pos",
        "p2": "B",
        "r2": "pos"
      },
      "expect": {
        "types": "A+, A−, B+, B−, AB+, AB−, O+, O−",
        "impossible": "None",
        "a": "0% to 50%",
        "ab": "25% to 100%",
        "o": "0% to 25%",
        "neg": "0% to 25%"
      },
      "source": "OpenStax, Anatomy and Physiology 2e, section 28.7 Patterns of Inheritance (blood type A is IᴬIᴬ or Iᴬi, B is IᴮIᴮ or Iᴮi, AB is IᴬIᴮ, O is ii; Iᴬ and Iᴮ are codominant, i is recessive), CC BY 4.0, https://openstax.org/books/anatomy-and-physiology-2e/pages/28-7-patterns-of-inheritance (retrieved 2026-10-03); Flegel WA, The genetics of the Rhesus blood group system, Blood Transfusion 2007;5(2):50–57 (the D-negative phenotype is caused by a deletion of the RHD gene on both chromosomes; a father heterozygous for the deletion gives a 50% chance of a D-negative fetus), https://pmc.ncbi.nlm.nih.gov/articles/PMC2535884/ (retrieved 2026-10-03); hand calculation in content.mdx: AA × BB gives AB only; AO × BO gives 1/4 of each type"
    },
    {
      "given": {
        "p1": "AO",
        "r1": "Dd",
        "p2": "BO",
        "r2": "Dd"
      },
      "expect": {
        "a": "25%",
        "b": "25%",
        "ab": "25%",
        "o": "25%",
        "pos": "75%",
        "neg": "25%"
      },
      "source": "OpenStax, Anatomy and Physiology 2e, section 28.7 Patterns of Inheritance (blood type A is IᴬIᴬ or Iᴬi, B is IᴮIᴮ or Iᴮi, AB is IᴬIᴮ, O is ii; Iᴬ and Iᴮ are codominant, i is recessive), CC BY 4.0, https://openstax.org/books/anatomy-and-physiology-2e/pages/28-7-patterns-of-inheritance (retrieved 2026-10-03); Flegel WA, The genetics of the Rhesus blood group system, Blood Transfusion 2007;5(2):50–57 (the D-negative phenotype is caused by a deletion of the RHD gene on both chromosomes; a father heterozygous for the deletion gives a 50% chance of a D-negative fetus), https://pmc.ncbi.nlm.nih.gov/articles/PMC2535884/ (retrieved 2026-10-03); hand calculation in content.mdx: each of the 4 allele pairs has chance 1/4"
    },
    {
      "given": {
        "p1": "O",
        "r1": "neg",
        "p2": "O",
        "r2": "neg"
      },
      "expect": {
        "types": "O−",
        "impossible": "A+, A−, B+, B−, AB+, AB−, O+",
        "o": "100%",
        "neg": "100%"
      },
      "source": "OpenStax, Anatomy and Physiology 2e, section 28.7 Patterns of Inheritance (blood type A is IᴬIᴬ or Iᴬi, B is IᴮIᴮ or Iᴮi, AB is IᴬIᴮ, O is ii; Iᴬ and Iᴮ are codominant, i is recessive), CC BY 4.0, https://openstax.org/books/anatomy-and-physiology-2e/pages/28-7-patterns-of-inheritance (retrieved 2026-10-03); Flegel WA, The genetics of the Rhesus blood group system, Blood Transfusion 2007;5(2):50–57 (the D-negative phenotype is caused by a deletion of the RHD gene on both chromosomes; a father heterozygous for the deletion gives a 50% chance of a D-negative fetus), https://pmc.ncbi.nlm.nih.gov/articles/PMC2535884/ (retrieved 2026-10-03); two ii parents can only pass i, and two dd parents only d"
    },
    {
      "given": {
        "p1": "AB",
        "r1": "pos",
        "p2": "O",
        "r2": "neg"
      },
      "expect": {
        "types": "A+, A−, B+, B−",
        "a": "50%",
        "b": "50%",
        "ab": "0%",
        "o": "0%",
        "neg": "0% to 50%"
      },
      "source": "OpenStax, Anatomy and Physiology 2e, section 28.7 Patterns of Inheritance (blood type A is IᴬIᴬ or Iᴬi, B is IᴮIᴮ or Iᴮi, AB is IᴬIᴮ, O is ii; Iᴬ and Iᴮ are codominant, i is recessive), CC BY 4.0, https://openstax.org/books/anatomy-and-physiology-2e/pages/28-7-patterns-of-inheritance (retrieved 2026-10-03); Flegel WA, The genetics of the Rhesus blood group system, Blood Transfusion 2007;5(2):50–57 (the D-negative phenotype is caused by a deletion of the RHD gene on both chromosomes; a father heterozygous for the deletion gives a 50% chance of a D-negative fetus), https://pmc.ncbi.nlm.nih.gov/articles/PMC2535884/ (retrieved 2026-10-03); hand calculation in content.mdx: IᴬIᴮ × ii gives Iᴬi or Iᴮi, half each"
    }
  ],
  "sources": [
    "OpenStax, Anatomy and Physiology 2e, section 28.7 Patterns of Inheritance (ABO table: A is IᴬIᴬ or Iᴬi, B is IᴮIᴮ or Iᴮi, AB is IᴬIᴮ with Iᴬ codominant to Iᴮ, O is ii), CC BY 4.0, retrieved 2026-10-03. https://openstax.org/books/anatomy-and-physiology-2e/pages/28-7-patterns-of-inheritance",
    "OpenStax, Anatomy and Physiology 2e, section 18.6 Blood Typing (the Rh D antigen; about 85 percent of Americans are Rh positive), CC BY 4.0, retrieved 2026-10-03. https://openstax.org/books/anatomy-and-physiology-2e/pages/18-6-blood-typing",
    "Flegel WA, The genetics of the Rhesus blood group system, Blood Transfusion 2007;5(2):50–57 (D-negative people lack the RHD gene on both chromosomes; a heterozygous father gives a 50% chance of a D-negative fetus), retrieved 2026-10-03. https://pmc.ncbi.nlm.nih.gov/articles/PMC2535884/"
  ],
  "related": [
    "punnett-square",
    "baby-eye-color",
    "hardy-weinberg"
  ],
  "changelog": []
}
