ForHosting KIT · Health & fitness

Pregnancy due date calculator

A last period on 1 January 2026 with a 28-day cycle gives a due date of 8 October 2026. Longer or shorter cycles move that date by the difference from 28 days, so a 30-day cycle lands 2 days later. 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
Cycle length
28
You get
Due date
2026-10-08
Gestation days
280
Cycle adjustment days
0

This pregnancy due date calculator turns the first day of the last menstrual period and the average cycle length into an estimated delivery date using cycle-adjusted Naegele's rule. When the cycle is longer or shorter, the due date shifts by the difference from twenty-eight days, so a thirty-day cycle lands two days later and a twenty-four-day cycle lands four days earlier. Use it for intake forms, homework on obstetric dating, and automation that needs a transparent Naegele baseline before ultrasound dating refines the plan.

How Naegele's rule works with your cycle

Naegele's rule starts from the first day of bleeding of your last period. You add one year, take away three months and add seven days; if that lands past the end of a month, the date simply rolls into the next one. That classic version assumes ovulation near the middle of a regular 28-day cycle. Real cycles often differ, so the calculator then moves the date by your cycle length minus 28 days. A last period on 1 January 2026 with a 28-day cycle gives 8 October 2026, which is 280 days later; the same period with a 30-day cycle gives a date two days later.

When it helps and what to watch for

It is useful on a maternity booking form, when preparing for an obstetrics exam or when you simply want to know roughly when your baby is due. Two details change the result. Enter the first day of bleeding, not the last. And measure your cycle from the first day of one period to the first day of the next, as a whole number of days. The date is an estimate to plan around, and an ultrasound scan usually refines it later.

Maternity intake with known cycle length

Compute a first-pass EDD from LMP and average cycle length on a booking form, and show the Naegele formula plus the cycle adjustment beside the result before ultrasound confirms dating.

Classroom and exam prep

Let students practice cycle-adjusted Naegele's rule with strict YYYY-MM-DD inputs and a deterministic oracle that rejects a cycle length that is not a positive number of days.

How is the pregnancy due date calculated from LMP and cycle length?

Classic Naegele's rule takes the first day of the LMP, adds one year, subtracts three months, and adds seven days.

What happens if cycle length is zero, negative, or missing?

Cycle length must be a positive whole number of days; missing, empty, zero, negative, and non-integer values are rejected and are not billed.

Why does a 30-day cycle change the due date versus 28?

A longer cycle means ovulation is later relative to LMP, so gestation counted from LMP is longer.

Does a shorter cycle move the due date earlier?

Yes. Every day your cycle is shorter than 28 days brings the date forward by one day: a 24-day cycle, for example, lands 4 days earlier than the classic date.

Is this due date final?

No. It is a first estimate based on your last period and cycle length. Ultrasound dating later refines the plan, so treat this date as the starting point your care team will check.

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/health/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/health/pregnancy-due-date \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lmp":"2026-01-01","cycle_length":28}'
{
  "lmp": "2026-01-01",
  "cycle_length": 28
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "health.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.

Classic Naegele assumes a twenty-eight-day cycle: add one year, subtract three months, and add seven days. Missing LMP or a cycle length that is not a positive number of days fails with invalid_input instead of inventing a date.

What cycle-adjusted Naegele's rule computes from LMP and cycle length

Naegele's rule estimates the expected date of delivery from the first day of the last menstrual period under the simplifying assumption of ovulation near the middle of a regular cycle. In the form still printed in textbooks and clinic posters, you take that LMP day, add one full year, subtract three months, and add seven days, then normalize any day that overflows the length of the resulting month. A thirty-day cycle therefore adds two days after the classic Naegele date; a twenty-one-day cycle subtracts seven. That calendar transform is the twenty-eight-day baseline this endpoint implements byte for byte. Real cycles are often not twenty-eight days, so the second required field cycle_length, a whole positive number of days from the first day of one period to the first day of the next, shifts the due date by cycle_length minus twenty-eight civil days. Required fields are lmp, an ISO calendar date written as YYYY-MM-DD naming the first bleeding day of the last period, and cycle_length. The response also echoes the normalized lmp and cycle_length, labels method as naegele_cycle, restates formula as EDD equals LMP plus one year minus three months plus seven days plus cycle_length minus twenty-eight, reports gestation_days as the whole civil day count between LMP and EDD, and reports cycle_adjustment_days so a UI can show how far the result moved from the twenty-eight-day baseline. 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

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 or time zones to this capability; this page is the textbook Naegele LMP-to-EDD transform with an explicit cycle-length offset only. POST a JSON object whose required field lmp is a string matching the strict pattern four digits, hyphen, two-digit month, hyphen, two-digit day, and whose required field cycle_length is a positive whole number of days. Aliases last_menstrual_period, lmp_date, and period_start map to lmp; aliases cycle_days and cycle map to cycle_length, so forms and integrations can keep their preferred names. Missing lmp, null, empty string, non-string objects, and strings that fail the pattern all throw invalid_input naming the field and the expected shape. Cycle length must be a finite integer from one through ninety inclusive: zero, negatives, fractions, NaN, and empty strings are not a positive number of days and fail with invalid_input naming cycle_length. Those validation failures are not billed, so you can probe hostile or incomplete payloads without spending prepaid balance. On success the body always includes lmp, cycle_length, due_date, method, formula, gestation_days, and cycle_adjustment_days; optional null fields are never padded in. Example: lmp two thousand twenty-six January first with cycle_length twenty-eight yields due_date two thousand twenty-six October eighth under classic Naegele with a zero-day cycle adjustment. The same LMP with cycle_length thirty yields two days later.

Where a cycle-aware pregnancy due date API earns its keep

Pregnancy intake forms and maternity booking flows often need a first-pass estimated due date the moment a patient types her LMP and usual cycle length, before any ultrasound file is attached. Prefer ultrasound-based dating when clinical policy requires it, and treat Naegele output as the conventional calendar estimate it has always been: simple, explainable, and deterministic once cycle length is stated. Embedding this calculator gives a transparent Naegele baseline with a published formula and a cycle_adjustment_days field that nurses and product copy can quote without reverse-engineering a black-box date library.

Batch LMP and cycle archives

Recompute estimated due dates for research or scheduling pipelines from stored LMP and cycle_length columns without timezone-sensitive Date libraries.

Which input fields are required?

lmp (YYYY-MM-DD) and cycle_length (positive whole days). Aliases last_menstrual_period, lmp_date, period_start, cycle_days, and cycle are accepted. Either field missing returns invalid_input.

What does the 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 →