Obstetric gestational age is a measure of elapsed calendar time relative to an accepted pregnancy-dating reference. Under the traditional menstrual method, the reference origin is the first day of the last menstrual period. This origin is conventional rather than a direct observation of fertilization.
It permits a consistent calendar scale but introduces assumptions about the relationship between menstrual onset, ovulation, and conception. Mathematically, gestational age is best represented as an integer number of elapsed days before it is converted into weeks. A calendar date is not a decimal quantity and a gestational week is exactly seven days within the dating convention. Therefore, the conversion to weeks and days is a quotient-and-remainder problem, not a decimal rounding problem.
The conventional due-date model sets the 40-week reference point at 280 days after the LMP. This creates a simple relationship between gestational age and the remaining interval to the estimated due date. If 98 days have elapsed, 182 days remain to the 280-day point. Their sum is invariant: 98 + 182 = 280.
This is useful as an independent arithmetic check, provided both intervals use the same starting reference. There are several important edge cases. At exactly 7k elapsed days for any nonnegative integer k, the result is k weeks and zero days.
At 7k + 6 days, the pregnancy remains within the same completed-week count. One day later, the completed-week count increases by one and the additional-day remainder resets to zero. If the assessment date is before the LMP, a negative difference may be obtained mathematically, but that result should not be formatted as an ordinary clinical gestational age. If the date is later than the conventional EDD, the gestational age can exceed 40 weeks.
The elapsed-day formula does not become invalid simply because the expected date has passed. Calendar boundaries require care. Date differences should count actual calendar days across months and years, including February 29 when applicable. Replacing a month with an assumed 30 days can introduce avoidable errors.
Finally, the origin itself may be clinically revised. Ultrasound-based dating, the reliability of the reported menstrual date, and assisted-reproduction information can determine the best obstetric estimate. The mathematics should be applied to the appropriate clinical reference rather than used to overrule it. No verified engine source or field mapping is available for this particular calculator, so the formulas here describe the standard conceptual model only.