Pregnancy Due Date Calculator Formula
Understand the math behind the pregnancy due date calculator. Each variable explained with a worked example.
Formulas Used
Weeks Remaining
weeks_remaining = floor(days_remaining / 7)Days Remaining
days_remain = days_remainingCurrent Trimester
trimester = weeks_pregnant < 13 ? 1 : (weeks_pregnant < 27 ? 2 : 3)Pregnancy Progress
progress_pct = total_days_pregnant / 280 * 100Variables
| Variable | Description | Default |
|---|---|---|
weeks_pregnant | Weeks Pregnant(weeks) | 12 |
days_extra | Extra Days(days) | 0 |
total_days_pregnant | Derived value= weeks_pregnant * 7 + days_extra | calculated |
days_remaining | Derived value= 280 - total_days_pregnant | calculated |
How It Works
Pregnancy Duration
A typical pregnancy lasts 40 weeks (280 days) from the first day of the last menstrual period (LMP).
Trimesters
Worked Example
A woman who is 12 weeks and 0 days pregnant.
- 01Total days pregnant = 12 x 7 + 0 = 84 days
- 02Days remaining = 280 - 84 = 196 days
- 03Weeks remaining = floor(196 / 7) = 28 weeks
- 04Progress = 84 / 280 x 100 = 30.0%
Frequently Asked Questions
How is a due date calculated?
A due date is estimated as 280 days (40 weeks) from the first day of your last menstrual period (LMP). Only about 5% of babies arrive on their exact due date.
What are the trimesters?
The first trimester is weeks 1-12, the second trimester is weeks 13-26, and the third trimester is weeks 27-40.
Learn More
Guide
Pregnancy Due Date Guide: How Your Due Date Is Calculated
Learn how pregnancy due dates are calculated using Naegele's rule, ultrasound dating, and conception date methods. Understand what your estimated due date really means.
Ready to run the numbers?
Open Pregnancy Due Date Calculator