{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://askcalculators.com/calculator/due-date-calculator/schema.json",
  "title": "Due Date Calculator inputs",
  "description": "Estimate a pregnancy due date from the last menstrual period, conception, ultrasound dating, or IVF embryo transfer.",
  "type": "object",
  "properties": {
    "method": {
      "title": "Dating method",
      "type": "string",
      "default": "lmp",
      "enum": [
        "lmp",
        "conception",
        "ultrasound",
        "ivf"
      ],
      "x-optionLabels": {
        "lmp": "Last menstrual period",
        "conception": "Conception date",
        "ultrasound": "Ultrasound dating",
        "ivf": "IVF embryo transfer"
      }
    },
    "lmpDate": {
      "title": "First day of last menstrual period",
      "type": "string",
      "default": "2026-06-01",
      "format": "date",
      "x-showWhen": {
        "field": "method",
        "equals": "lmp"
      }
    },
    "cycleLength": {
      "title": "Average cycle length",
      "type": "number",
      "default": 28,
      "minimum": 20,
      "maximum": 45,
      "x-step": 1,
      "multipleOf": 1,
      "x-suffix": "days",
      "x-showWhen": {
        "field": "method",
        "equals": "lmp"
      }
    },
    "conceptionDate": {
      "title": "Known conception date",
      "type": "string",
      "default": "2026-06-15",
      "format": "date",
      "x-showWhen": {
        "field": "method",
        "equals": "conception"
      }
    },
    "ultrasoundDate": {
      "title": "Ultrasound date",
      "type": "string",
      "default": "2026-08-24",
      "format": "date",
      "x-showWhen": {
        "field": "method",
        "equals": "ultrasound"
      }
    },
    "ultrasoundWeeks": {
      "title": "Gestational age at ultrasound: weeks",
      "type": "number",
      "default": 12,
      "minimum": 0,
      "maximum": 42,
      "x-step": 1,
      "multipleOf": 1,
      "x-showWhen": {
        "field": "method",
        "equals": "ultrasound"
      }
    },
    "ultrasoundDays": {
      "title": "Additional days",
      "type": "number",
      "default": 0,
      "minimum": 0,
      "maximum": 6,
      "x-step": 1,
      "multipleOf": 1,
      "x-showWhen": {
        "field": "method",
        "equals": "ultrasound"
      }
    },
    "transferDate": {
      "title": "Embryo transfer date",
      "type": "string",
      "default": "2026-06-20",
      "format": "date",
      "x-showWhen": {
        "field": "method",
        "equals": "ivf"
      }
    },
    "embryoAgeDays": {
      "title": "Embryo age at transfer",
      "type": "number",
      "default": 5,
      "enum": [
        3,
        5,
        6
      ],
      "x-optionLabels": {
        "3": "Day 3 embryo",
        "5": "Day 5 embryo",
        "6": "Day 6 embryo"
      },
      "x-showWhen": {
        "field": "method",
        "equals": "ivf"
      }
    }
  },
  "required": [
    "method"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "method": {
            "const": "lmp"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "lmpDate"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "lmp"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "cycleLength"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "conception"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "conceptionDate"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "ultrasound"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "ultrasoundDate"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "ultrasound"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "ultrasoundWeeks"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "ultrasound"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "ultrasoundDays"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "ivf"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "transferDate"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "method": {
            "const": "ivf"
          }
        },
        "required": [
          "method"
        ]
      },
      "then": {
        "required": [
          "embryoAgeDays"
        ]
      }
    }
  ],
  "additionalProperties": false,
  "x-askcalculators": {
    "version": "2.0.0",
    "calculatorUrl": "https://askcalculators.com/calculator/due-date-calculator/",
    "queryExample": "https://askcalculators.com/calculator/due-date-calculator/?method=lmp&lmpDate=2026-06-01&cycleLength=28",
    "migrationStatus": "migrated",
    "reviewStatus": "pending",
    "pageStatus": "live",
    "workStatus": "pending",
    "migratedDate": "2026-08-25",
    "formula": {
      "expression": "LMP: 280 days plus cycle adjustment; conception: 266 days; ultrasound: 280 days minus gestational age; IVF: 266 days minus embryo age."
    },
    "quality": {
      "availability": "live",
      "technicalReviewRecord": "/reviews/due-date-calculator.json",
      "qualifiedReview": "pending",
      "qualifiedReviewer": null,
      "qualifiedReviewDate": null,
      "formulaVersion": "2.0.0",
      "referenceCoverage": "references-listed",
      "releaseTestScope": "Catalog and regression checks are not a professional formula audit; consult release evidence.",
      "historicalMetadataDate": "2026-08-25",
      "historicalMetadataNotice": "The imported date is not evidence of a completed human review."
    },
    "outputs": {
      "dueDateResult": {
        "title": "Estimated due date",
        "type": "string",
        "x-format": "date",
        "format": "date",
        "x-primary": true
      },
      "conceptionDateResult": {
        "title": "Estimated conception date",
        "type": "string",
        "x-format": "date",
        "format": "date"
      },
      "lmpDateResult": {
        "title": "Estimated LMP date",
        "type": "string",
        "x-format": "date",
        "format": "date"
      },
      "earlyTerm": {
        "title": "Early-term date (37 weeks)",
        "type": "string",
        "x-format": "date",
        "format": "date"
      },
      "lateTerm": {
        "title": "Late-term date (41 weeks)",
        "type": "string",
        "x-format": "date",
        "format": "date"
      },
      "methodResult": {
        "title": "Method used",
        "type": "string",
        "x-format": "text"
      }
    }
  }
}
