ThisCalculator

Home and garden

Gestation by Dates Calculator: How It Works

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Gestation by Dates Calculator: How It Works

A gestation by dates calculator estimates a pregnancy’s due date and current gestational age based on the first day of the last menstrual period (LMP) or the date of conception. You enter the relevant date and your average cycle length, and the calculator returns your estimated due date, how far along you are in weeks and days, and often the expected conception window. This tool uses the standard 280-day (40-week) pregnancy model, which is the same basis most healthcare providers use for initial dating.

Formula

The core formula is Naegele’s rule: Estimated Due Date = LMP + 280 days − (cycle length − 28 days). For a standard 28-day cycle, this simplifies to LMP + 280 days (40 weeks). The rule assumes ovulation occurs on day 14 of the cycle and that fertilization happens within 24 hours of ovulation.

Variables:

  • LMP – first day of the last menstrual period (calendar date)
  • Cycle length – average number of days from the start of one period to the start of the next (days, typically 21–35)
  • 280 days – the standard duration of pregnancy from LMP (40 weeks)
  • 14 days – assumed day of ovulation in a 28-day cycle

For gestational age: GA (weeks) = floor((Today − LMP) / 7), with the remainder as extra days. This counts from LMP, not from conception, which is why gestational age is about two weeks older than embryonic age.

Worked Example

Using the default values from the calculator above:

  • LMP = January 15, 2025
  • Cycle length = 28 days
  • Today = (assume the calculation runs on the current date; for this example, let’s use March 1, 2025)

Step 1 – Due date: LMP + 280 days = January 15 + 280 days = October 22, 2025.

Step 2 – Gestational age: days between Jan 15 and Mar 1 = 45 days. 45 ÷ 7 = 6 weeks and 3 days. So GA = 6 weeks, 3 days.

Step 3 – Conception window: ovulation day = cycle − 14 = 14 days after LMP, i.e., January 29. The fertile window is typically 5 days before ovulation plus 1 day after, giving January 24–30, 2025.

The calculator returns these same results for the defaults, confirming the arithmetic.

How to Read the Results

The estimated due date is not a deadline – only about 4% of babies are born exactly on their due date, and about 70% arrive within 10 days of it. The date is a clinical estimate used to schedule tests and monitor growth.

Gestational age (weeks + days) is how pregnancy is universally measured. For example, 6 weeks 3 days means 6 full weeks plus 3 days have passed since the LMP. This is different from fetal age, which is about 2 weeks less.

The conception window shows the range of days when intercourse most likely led to pregnancy, based on sperm survival (up to 5 days) and egg viability (about 24 hours).

Common Mistakes and Limitations

  • Using conception date instead of LMP: If you know the conception date, add 266 days (38 weeks) to get the due date. Mixing these two starting points is the most common error.
  • Ignoring cycle length: For cycles longer than 28 days, ovulation happens later, so the due date should be pushed forward. A 35-day cycle shifts the due date by 7 days.
  • Irregular cycles: Naegele’s rule assumes regular cycles. If your cycle varies by more than a week, the calculator’s estimate becomes less reliable, and ultrasound dating is preferred.
  • Rounding too early: Gestational age is typically reported in completed weeks and days, not rounded to the nearest week. 6 weeks 6 days is not “7 weeksâ€� until the 7th week is complete.
  • Date format confusion: Always use the same date format (e.g., MM/DD/YYYY) consistently. Mixing formats can shift the result by a month.

When to Use This Calculator vs. Ultrasound

This calculator is most useful early in pregnancy, before an ultrasound is performed, or for a quick estimate between appointments. It is also helpful for planning – for example, to know when a pregnancy test might be positive (typically by 4 weeks gestational age) or when morning sickness often begins (around 6 weeks).

Ultrasound dating is more accurate, especially if your cycles are irregular or you don’t remember your LMP. A first-trimester ultrasound (weeks 8–13) can estimate gestational age within 5–7 days. If the ultrasound date differs from the LMP-based date by more than a week, most providers will adjust the due date to the ultrasound estimate.

For women using assisted reproduction (IVF, IUI), the date of embryo transfer is used instead of LMP, because the exact conception date is known.

Cycle Length Adjustments

The standard 280-day rule assumes a 28-day cycle. Here’s how to adjust for other common cycle lengths:

  • 21-day cycle: Due date = LMP + 273 days (ovulation on day 7)
  • 28-day cycle: Due date = LMP + 280 days (ovulation on day 14)
  • 35-day cycle: Due date = LMP + 287 days (ovulation on day 21)
  • 40-day cycle: Due date = LMP + 294 days (ovulation on day 26)

This adjustment is a simple shift based on ovulation day. However, it assumes the luteal phase (the time after ovulation) is constant at 14 days, which is generally true but can vary.

Frequently Asked Questions

How accurate is a due date based on LMP?

For women with regular 28-day cycles, LMP-based due dates are accurate within about 1–2 weeks. Only about 4% of babies arrive on the exact due date, but most (around 70%) are born within 10 days of it. Ultrasound in the first trimester is more accurate, especially if cycles are irregular.

What if I don’t know my last period date?

If you don’t know your LMP, you can use the conception date (if known) and add 266 days. If you know neither, an early ultrasound is the best way to establish the due date. Some calculators also allow you to enter a due date from a previous ultrasound and work backward.

Why is my gestational age different from fetal age?

Gestational age counts from the first day of your last period, which is about 2 weeks before conception. Fetal age (also called embryonic age) counts from the actual date of fertilization. So at 8 weeks gestational age, the fetus is about 6 weeks old. Medical professionals always use gestational age for consistency.

Can I use this calculator if I have PCOS or irregular periods?

Yes, but the result will be less reliable. If your cycle length varies significantly, the calculator’s assumption of a regular cycle may not hold. In that case, an ultrasound in the first trimester is the recommended method for dating. You can still get a rough estimate, but treat it as approximate.

Does the calculator work for IVF pregnancies?

Not directly. For IVF, the due date is calculated from the embryo transfer date, not LMP. For a Day-5 blastocyst transfer, the due date is transfer date + 261 days. For a Day-3 transfer, it’s transfer date + 263 days. Some calculators have a separate IVF mode, but this one uses LMP only.

What is the “conception window� and why is it 6 days long?

The conception window is the range of days when intercourse could have resulted in pregnancy. Sperm can survive up to 5 days in the female reproductive tract, and the egg is viable for about 24 hours after ovulation. So the window spans from 5 days before ovulation to 1 day after – a total of 6 days. This is the fertile window used in family planning.

Related

Formula used
in date | First day of last period | - | 2025-01-15 | 0
in num | Average cycle length | days | 28 | 20
out date | Estimated due date | - | date + 280 + (cycle - 28) | 0
out num | Gestational age | weeks | floor((today - lmp) / 7) | 0
out num | Days past | days | (today - lmp) % 7 | 0
out date | Conception window start | - | date + (cycle - 14) - 5 | 0
out date | Conception window end | - | date + (cycle - 14) + 1 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.