The formula
Gestational age in days = today minus the first day of your last menstrual period. Divide by 7. The whole number is the week you are in, and the remainder is the extra days, written like "37 weeks 3 days" or "37w3d."
This is the number your provider uses for everything: which tests are due, when scans happen, and whether the baby is preterm, early term, full term, or post-term. It is worth knowing how to compute it yourself so the number on your chart never feels like a mystery.
Worked example 1
Last period: January 15, 2026. Today: October 4, 2026. Days between: 262. Divide by 7: 262 divided by 7 is 37 with a remainder of 3 (37 times 7 is 259, plus 3 is 262). You are 37 weeks and 3 days pregnant.
Cross-check with the due date. January 15 plus 280 days is October 22, 2026. From October 4 to October 22 is 18 days, and 37 weeks 3 days plus 18 days is 40 weeks exactly. The two directions agree, which is how you know the count is right.
Worked example 2: early pregnancy
Last period: September 1, 2026. Today: October 4, 2026. Days between: 33. Divide by 7: 33 divided by 7 is 4 with a remainder of 5 (4 times 7 is 28, plus 5 is 33). You are 4 weeks and 5 days pregnant.
Notice something odd: at 4 weeks 5 days, conception happened only about 2 weeks 5 days ago. That is the famous quirk of pregnancy dating, explained next.
Why the count starts before conception
Pregnancy is dated from the last period because that is a date you can actually observe and report. Ovulation, and therefore conception, happens roughly two weeks later, but the exact day varies and is usually unknown. So the first two "weeks of pregnancy" happen before conception.
This is not a mistake in the math; it is a convention the whole medical system shares. When your provider says you are 6 weeks pregnant, the embryo is about 4 weeks old. Every chart, every screening window, and every "week X" milestone article uses this same convention, so your home calculation and your provider's number should match.
What the week number unlocks
Certain weeks are decision points. Around week 8 to 12 comes the first ultrasound and the nuchal translucency screening window. Around week 20 is the anatomy scan. Week 24 is generally considered the viability milestone. Week 37 is early term, week 39 is full term, and week 42 is post-term, when providers usually recommend delivery.
Knowing your exact weeks and days tells you where you stand relative to each of these. "Almost 20 weeks" and "20 weeks 3 days" can matter for scheduling a scan inside its valid window.
When the number gets revised
The last-period count is a starting estimate, and your provider may revise it after the first ultrasound. A first-trimester scan measures the embryo directly, and if the measurement disagrees with the period-based date by more than about a week, the ultrasound date wins.
This is normal and not a sign that anything is wrong. It usually means ovulation happened earlier or later than day 14. Once the date is set by ultrasound, all future counting uses that date as the anchor. The pregnancy calculator lets you enter a known due date from ultrasound and counts your weeks and days from it.
Counting with irregular cycles
If your cycles are irregular, the last-period formula is less reliable because ovulation may not have fallen on day 14. The fix: count from your best estimate of ovulation instead. If you tracked ovulation (test strips, temperature, symptoms) and it fell on day 21, your "pregnancy start" is effectively 7 days later than the period formula says, so subtract 7 days from the week count.
Example: last period January 15 but ovulation on February 5 (day 21). The naive count on October 4 says 37 weeks 3 days, but you are really about 36 weeks 3 days. In practice, this is exactly the situation where an early ultrasound resets the date, so mention the irregular cycles at your first appointment.