{
  "id": "pregnancy-week",
  "version": "c55d9360810b",
  "status": "published",
  "name": "Pregnancy Week Calculator",
  "question": "What pregnancy week am I in?",
  "summary": "Works out which week of pregnancy you are in on a date, with weeks and days, the trimester and the dates that week starts and ends, from the due date, last period, an ultrasound or the conception date.",
  "category": "health",
  "subcategory": "pregnancy",
  "url": "https://www.acalculator.org/health/pregnancy-week-calculator",
  "markdown": "https://www.acalculator.org/health/pregnancy-week-calculator.md",
  "kind": "function",
  "method": "Days pregnant = date − start; pregnancy week = ⌊days ÷ 7⌋ + 1, where the start is the due date − 280 days, the last period + (cycle − 28) days, the ultrasound date − the age it gave, or the conception date − 14 days.",
  "assumptions": [
    "A pregnancy is counted from the first day of the last period and lasts 280 days (40 weeks) to the due date (ACOG). Week 1 is days 0 to 6.",
    "Trimesters: first to 13 weeks 6 days, second from 14 weeks 0 days, third from 28 weeks 0 days.",
    "Before the start, or more than 42 weeks 6 days after it, the week is left out and a note says so.",
    "An estimate, not medical advice: your provider sets your dates, often from an early ultrasound."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "method": {
        "title": "Based on",
        "description": "What you know: the first day of your last period, the conception date, an ultrasound, or the due date.",
        "type": "string",
        "enum": [
          "due",
          "lmp",
          "ultrasound",
          "conception"
        ]
      },
      "lmp": {
        "title": "First day of your last period",
        "description": "The first day of your last menstrual 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 if you are not sure.",
        "type": "integer",
        "minimum": 21,
        "maximum": 45
      },
      "conception": {
        "title": "Date of conception",
        "description": "The day you conceived.",
        "type": "string",
        "format": "date"
      },
      "scan": {
        "title": "Ultrasound date",
        "description": "The day of the ultrasound scan.",
        "type": "string",
        "format": "date"
      },
      "scanWeeks": {
        "title": "Weeks at the scan",
        "description": "The gestational age the scan gave: whole weeks.",
        "type": "integer",
        "minimum": 4,
        "maximum": 42
      },
      "scanDays": {
        "title": "And days",
        "description": "The gestational age the scan gave: days past the whole weeks, 0 to 6.",
        "type": "integer",
        "minimum": 0,
        "maximum": 6
      },
      "due": {
        "title": "Your due date",
        "description": "The estimated due date you were given.",
        "type": "string",
        "format": "date"
      },
      "on": {
        "title": "Work out on",
        "description": "The date to work out how far along the pregnancy is. Today, unless you change it.",
        "type": "string",
        "format": "date"
      }
    }
  },
  "outputs": {
    "week": {
      "label": "Pregnancy week",
      "description": "The week of pregnancy the date falls in: completed weeks + 1 (17 weeks 3 days is week 18).",
      "format": "integer"
    },
    "ga": {
      "label": "Weeks pregnant",
      "description": "Completed weeks and days of pregnancy on the date, counted from the start.",
      "format": "duration"
    },
    "trimester": {
      "label": "Trimester",
      "description": "The trimester on the date (ACOG), or a note when the date is outside the pregnancy.",
      "format": "text"
    },
    "weekStart": {
      "label": "This week started",
      "description": "The first day of the pregnancy week the date falls in.",
      "format": "date"
    },
    "weekEnd": {
      "label": "This week ends",
      "description": "The last day of the pregnancy week the date falls in.",
      "format": "date"
    },
    "due": {
      "label": "Due date",
      "description": "The estimated due date: 280 days (40 weeks) after the start.",
      "format": "date"
    },
    "daysLeft": {
      "label": "Days until the due date",
      "description": "Days from the date to the due date; left out after the due date.",
      "format": "integer"
    },
    "start": {
      "label": "Pregnancy counted from",
      "description": "Day 0 of the count: the first day of the last period, adjusted for cycle length.",
      "format": "date"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "method": "due",
      "lmp": "2026-08-05",
      "cycle": 28,
      "conception": "2026-08-19",
      "scan": "2026-09-23",
      "scanWeeks": 12,
      "scanDays": 0,
      "due": "2027-03-10",
      "on": "2026-09-30"
    },
    "outputs": {
      "week": 18,
      "ga": {
        "weeks": 17,
        "days": 0
      },
      "trimester": "Second trimester",
      "weekStart": "2026-09-30",
      "weekEnd": "2026-10-06",
      "due": "2027-03-10",
      "daysLeft": 161,
      "start": "2026-06-03"
    },
    "text": "On September 30, 2026 you are 17 weeks pregnant, in pregnancy week 18 (Second trimester)."
  },
  "examples": [
    {
      "given": {
        "method": "due",
        "due": "2027-03-01",
        "on": "2026-09-29"
      },
      "expect": {
        "start": "2026-05-25",
        "ga": {
          "weeks": 18,
          "days": 1
        },
        "week": 19,
        "weekStart": "2026-09-28",
        "weekEnd": "2026-10-04",
        "trimester": "Second trimester",
        "daysLeft": 153
      },
      "source": "ACOG Committee Opinion 700 (due date = start + 280 days); hand calculation in content.mdx"
    },
    {
      "given": {
        "method": "lmp",
        "lmp": "2026-08-01",
        "cycle": 28,
        "on": "2026-09-29"
      },
      "expect": {
        "ga": {
          "weeks": 8,
          "days": 3
        },
        "week": 9,
        "trimester": "First trimester",
        "due": "2027-05-08"
      },
      "source": "ACOG Committee Opinion 700 (last period + 280 days); hand calculation in content.mdx"
    },
    {
      "given": {
        "method": "lmp",
        "lmp": "2026-01-05",
        "cycle": 28,
        "on": "2026-10-12"
      },
      "expect": {
        "ga": {
          "weeks": 40,
          "days": 0
        },
        "week": 41,
        "daysLeft": 0,
        "trimester": "Third trimester"
      },
      "source": "ACOG Committee Opinion 700: day 280 is the due date; hand calculation in content.mdx"
    }
  ],
  "sources": [
    "American College of Obstetricians and Gynecologists. Committee Opinion No. 700: Methods for Estimating the Due Date. Obstet Gynecol. 2017;129(5):e150-e154. https://www.acog.org/clinical/clinical-guidance/committee-opinion/articles/2017/05/methods-for-estimating-the-due-date",
    "American College of Obstetricians and Gynecologists. Committee Opinion No. 579: Definition of Term Pregnancy. Obstet Gynecol. 2013;122(5):1139-1140. https://www.acog.org/clinical/clinical-guidance/committee-opinion/articles/2013/11/definition-of-term-pregnancy"
  ],
  "related": [
    "pregnancy",
    "due-date",
    "pregnancy-weight-gain"
  ],
  "changelog": []
}
