ForHosting KIT · Math

Estimate pregnancy due date

Enter the first day of the last period and today's date to get the estimated due date: a period that began on 1 January 2026 points to 8 October 2026, and by 15 March, 73 days have passed. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
First day of last period
2026-01-01
Today
2026-03-15
You get
Due date
2026-10-08
Gestation days
280
Days since lmp
73

Estimating a pregnancy due date from the first day of the last menstrual period is one of the most common calendar calculations in maternity intake, prenatal education, and obstetric homework. This estimate pregnancy due date calculator applies Naegele's rule in its transparent two-hundred-eighty-day form: take a strict YYYY-MM-DD last menstrual period, require a stated today reference so future LMPs cannot slip through, add exactly two hundred eighty civil days with pure Gregorian arithmetic, and return the estimated delivery date plus the day count since LMP. Use it for forms, lesson demos, and automation that needs a deterministic Naegele baseline before ultrasound dating refines the plan.

How Naegele's rule counts the days

Naegele's rule is the classic way to estimate when a baby is due. It starts from the first day of the last menstrual period, not from the day of conception, and adds 280 days, which is the same as forty weeks. That fixed count matches a regular twenty-eight-day cycle with ovulation around day fourteen. The days are counted on the calendar as they are, with each month's real length and the extra day of leap years, so a period that began on 1 January 2026 leads to an estimated due date of 8 October 2026. You also see how many days have passed since the last period, up to the date you give as today.

When to use it and what to keep in mind

It is a first estimate for booking forms, prenatal classes and obstetrics homework, before an ultrasound scan refines the dating. The rule does not adjust for longer or shorter cycles, so the date it gives is a baseline, not a promise. A last period dated after the reference day is refused, because it cannot be a starting point, and dates that do not exist on the calendar are refused too. Always enter the first day of bleeding, not the last one.

Maternity intake and booking

Compute a first-pass EDD from the LMP field on a web form, pass the form's reference day as today, and reject future LMPs before ultrasound confirms dating.

Classroom and exam prep

Let students practice Naegele's two-hundred-eighty-day rule with strict YYYY-MM-DD inputs and a deterministic oracle that rejects impossible or future LMP dates.

Batch LMP archives

Recompute estimated due dates for research or scheduling pipelines from stored LMP columns with a fixed as-of date, without timezone-sensitive Date libraries.

How does this calculator estimate the pregnancy due date?

It applies Naegele's rule as a fixed offset: estimated due date equals the first day of the last menstrual period plus exactly 280 civil days, with Gregorian month lengths and leap years normalized in pure arithmetic.

Why is a today field required if the rule only needs LMP?

Callers must state the reference day so LMP cannot be accepted when it is after that day. Same inputs always produce the same validation outcome across environments.

What happens if LMP is after today?

A last menstrual period in the future relative to the stated reference is not a valid baseline for due-date estimation.

Does the due date change if the cycle is longer or shorter than twenty-eight days?

No. The rule always adds exactly 280 days, which assumes a regular twenty-eight-day cycle with ovulation around day fourteen. It does not adjust for cycle length, so an ultrasound scan is what refines the date later.

Are leap years taken into account in the due date?

Yes. The 280 days are counted as real calendar days, with the true length of each month and the extra February day of leap years, so the date is right even when a pregnancy runs through a leap year.

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.

POSThttps://api.kit.forhosting.com/math/pregnancy-due-date

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.

curl -X POST https://api.kit.forhosting.com/math/pregnancy-due-date \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lmp":"2026-01-01","today":"2026-03-15"}'
{
  "lmp": "2026-01-01",
  "today": "2026-03-15"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.pregnancy_due_date",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

When the LMP is after today, or either date is missing or not a real calendar day, the task fails with invalid_input instead of inventing a schedule.

What Naegele's 280-day rule computes and why both lmp and today are required

Naegele's rule estimates the expected date of delivery from the first day of the last menstrual period under the conventional forty-week obstetric count from LMP. In the day-count form used by this capability, you take that LMP day and add exactly two hundred eighty whole civil days, normalizing month lengths and Gregorian leap years along the way. That fixed offset matches the classic bedside teaching of forty weeks from the first bleeding day of the last period for a regular twenty-eight-day cycle with ovulation near day fourteen. Two required fields drive the solve path. The field lmp is an ISO calendar date written as YYYY-MM-DD naming the first bleeding day of the last period the patient reports. This endpoint implements that arithmetic byte for byte: it does not call Date.now, it does not depend on the server timezone, and it does not silently adjust for cycle length. If lmp falls strictly after today, the request is rejected as invalid_input with a message that names both dates, because a last menstrual period in the future relative to the stated reference is not a usable baseline for due-date estimation. The response also echoes the normalized lmp and today, labels method as naegele_280, restates formula as EDD equals LMP plus two hundred eighty days, reports gestation_days as two hundred eighty, and reports days_since_lmp as the whole civil day count from LMP to the stated today so a UI can show gestational progress without re-deriving the serial math. This is a dating estimate only: it is not a diagnosis, not a guarantee of delivery on that day, and not a substitute for clinical ultrasound dating when that is available.

Input contract, validation, response shape, and deterministic errors

The field lmp must match the strict pattern four digits, hyphen, two-digit month, hyphen, two-digit day. Month must fall between one and twelve; day must be real for that month, so values such as two thousand twenty-six February thirtieth are rejected because February never has thirty days, and two thousand twenty-three February twenty-ninth is rejected because that year is not a leap year under the Gregorian rule. Do not send wall-clock timestamps, time zones, or cycle length to this capability—those belong to other tools; this page is intentionally the fixed two-hundred-eighty-day LMP-to-EDD transform with an explicit today guard. POST a JSON object with two required string fields. Aliases last_menstrual_period, lmp_date, and period_start map to the same parse path so forms can keep their preferred names. The field today must use the same ISO shape; aliases as_of and reference_date are accepted. Missing lmp or today, null, empty string, non-string objects, and strings that fail the pattern all throw invalid_input naming the field and the expected shape. On success the body always includes lmp, today, due_date, method, formula, gestation_days, and days_since_lmp; optional null fields are never padded in. Example: lmp two thousand twenty-six January first with today two thousand twenty-six March fifteenth yields due_date two thousand twenty-six October eighth under the fixed two-hundred-eighty-day offset, with method naegele_280 and days_since_lmp equal to the civil span from January first to March fifteenth. Failed validation is not billed, so you can probe hostile or incomplete payloads without spending prepaid balance.

Where an estimate pregnancy due date API earns its keep in product and education

Pregnancy intake forms and maternity booking flows often need a first-pass estimated due date the moment a patient types her LMP, with a clear rule that rejects future-dated periods relative to the form's reference day. Embedding this calculator gives a transparent Naegele baseline with a published formula and a days-since-LMP field that product copy can quote without reverse-engineering a black-box date library. Prefer ultrasound-based dating when clinical policy requires it, and treat the two-hundred-eighty-day output as the conventional calendar estimate it has always been: simple, explainable, and deterministic.

Which input fields are required?

Both lmp and today (YYYY-MM-DD). Aliases last_menstrual_period, lmp_date, period_start for LMP and as_of, reference_date for today are accepted. Missing or empty values return invalid_input and are not billed.

What does the estimate pregnancy due date calculator cost?

The browser widget is free. API calls use prepaid KIT balance at $0.002 per successful task; invalid input is not charged.

Read the full KIT documentation →