{
  "id": "pregnancy-test",
  "version": "7db1b8bf7a44",
  "status": "published",
  "name": "Pregnancy Test Calculator",
  "question": "When should I take a pregnancy test?",
  "summary": "Works out when to take a home pregnancy test: from the first day of the missed period (from the last period or the ovulation date), or 21 days after sex, with the likely implantation window.",
  "category": "health",
  "subcategory": "pregnancy",
  "url": "https://www.acalculator.org/health/pregnancy-test-calculator",
  "markdown": "https://www.acalculator.org/health/pregnancy-test-calculator.md",
  "kind": "function",
  "method": "Expected period = last period + cycle length (or ovulation + 14 days); test on the expected period, more reliably 7 days later; implantation 6 to 12 days after ovulation. From a day of sex: test 21 days later.",
  "assumptions": [
    "Ovulation comes 14 days before the expected period (ACOG average); real cycles vary.",
    "A test cannot be positive before implantation, which is usually 6 to 12 days after ovulation, most often 8 to 10 (Wilcox and others, 1999).",
    "Even with a very sensitive test, about 10% of pregnancies are not yet detectable on the first day of the missed period; 1 week later, at most 3% are not (Wilcox and others, 2001).",
    "Home tests differ in sensitivity. Follow the instructions on your test, and see a health care professional for a blood test or advice. This is not medical advice."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "title": "What do you know?",
        "description": "The date you know: the first day of your last period, your ovulation day, or the day you had sex.",
        "type": "string",
        "enum": [
          "period",
          "ovulation",
          "sex"
        ]
      },
      "lmp": {
        "title": "First day of your last period",
        "description": "The first day of bleeding of your most recent period.",
        "type": "string",
        "format": "date"
      },
      "cycle": {
        "title": "Cycle length (days)",
        "description": "Days from the first day of one period to the first day of the next; 28 on average.",
        "type": "integer",
        "minimum": 20,
        "maximum": 45
      },
      "ovulation": {
        "title": "Ovulation day",
        "description": "The day you ovulated, for example from an ovulation test or temperature chart.",
        "type": "string",
        "format": "date"
      },
      "sex": {
        "title": "Day you had sex",
        "description": "The day of the unprotected sex you want to test for.",
        "type": "string",
        "format": "date"
      }
    }
  },
  "outputs": {
    "test": {
      "label": "Test on or after",
      "description": "The first day a home test is worth taking: the missed period, or 21 days after sex.",
      "format": "date"
    },
    "reliable": {
      "label": "More reliable from",
      "description": "One week after the missed period, when a test is more likely to be right.",
      "format": "date"
    },
    "period": {
      "label": "Expected period",
      "description": "The day your next period should start.",
      "format": "date"
    },
    "ovulation": {
      "label": "Ovulation",
      "description": "The ovulation day: entered, or 14 days before the expected period.",
      "format": "date"
    },
    "implantFrom": {
      "label": "Implantation from",
      "description": "The earliest usual implantation day: 6 days after ovulation.",
      "format": "date"
    },
    "implantTo": {
      "label": "Implantation up to",
      "description": "The latest usual implantation day: 12 days after ovulation.",
      "format": "date"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "period",
      "lmp": "2026-09-08",
      "cycle": 28,
      "ovulation": "2026-09-22",
      "sex": "2026-09-22"
    },
    "outputs": {
      "test": "2026-10-06",
      "reliable": "2026-10-13",
      "period": "2026-10-06",
      "ovulation": "2026-09-22",
      "implantFrom": "2026-09-28",
      "implantTo": "2026-10-04"
    },
    "text": "Take a home pregnancy test on or after October 6, 2026."
  },
  "examples": [
    {
      "given": {
        "from": "period",
        "lmp": "2026-09-01",
        "cycle": 28
      },
      "expect": {
        "test": "2026-09-29",
        "reliable": "2026-10-06",
        "period": "2026-09-29",
        "ovulation": "2026-09-15",
        "implantFrom": "2026-09-21",
        "implantTo": "2026-09-27"
      },
      "source": "hand calculation in content.mdx: ACOG (28-day cycle, ovulation 14 days before the period); NHS (test from the first day of a missed period); Wilcox 1999 (implantation 6 to 12 days after ovulation); Wilcox 2001 (1 week later)"
    },
    {
      "given": {
        "from": "ovulation",
        "ovulation": "2026-10-10"
      },
      "expect": {
        "test": "2026-10-24",
        "reliable": "2026-10-31",
        "implantFrom": "2026-10-16",
        "implantTo": "2026-10-22"
      },
      "source": "hand calculation in content.mdx: expected period = ovulation + 14 days (ACOG); Wilcox 1999 and 2001"
    },
    {
      "given": {
        "from": "sex",
        "sex": "2026-09-20"
      },
      "expect": {
        "test": "2026-10-11"
      },
      "source": "NHS, Doing a pregnancy test: at least 21 days after unprotected sex; September 20 + 21 days"
    },
    {
      "given": {
        "from": "period",
        "lmp": "2026-01-01",
        "cycle": 35
      },
      "expect": {
        "test": "2026-02-05",
        "ovulation": "2026-01-22"
      },
      "source": "hand calculation in content.mdx: a 35-day cycle, so ovulation on day 21 and the period on day 35"
    }
  ],
  "sources": [
    "NHS, Doing a pregnancy test (page last reviewed February 9, 2022). https://www.nhs.uk/pregnancy/trying-for-a-baby/doing-a-pregnancy-test/",
    "Wilcox AJ, Baird DD, Dunson D, et al. Natural limits of pregnancy testing in relation to the expected menstrual period. JAMA 2001;286:1759–1761. doi:10.1001/jama.286.14.1759",
    "Wilcox AJ, Baird DD, Weinberg CR. Time of implantation of the conceptus and loss of pregnancy. New England Journal of Medicine 1999;340:1796–1799. doi:10.1056/nejm199906103402304",
    "American College of Obstetricians and Gynecologists, Fertility Awareness-Based Methods of Family Planning (FAQ024, last reviewed February 2025). https://www.acog.org/womens-health/faqs/fertility-awareness-based-methods-of-family-planning"
  ],
  "related": [
    "period",
    "conception"
  ],
  "changelog": []
}
