How gestational age is counted
Pregnancy is dated from the first day of your last menstrual period (LMP), not from conception. That convention is a couple of centuries old and it survives because almost everyone knows when their last period started, while very few know the exact day they ovulated. The side effect is that weeks 1 and 2 happen before there is an embryo at all: conception usually falls around day 14, and a positive home test arrives around day 28, when you are already called 4 weeks pregnant.
A full-term pregnancy is 280 days, or 40 weeks, from that first day. Gestational age is always reported in completed weeks plus days, written like 22w3d. If you are 22 weeks and 3 days, you are in your 23rd week, which is why a nurse saying "you are 23 weeks along" and a chart saying 22w3d are describing the same day. If your cycle is not 28 days, ovulation is usually late or early by the difference, so this calculator shifts the whole timeline: a 32-day cycle moves everything four days later.
A worked example
Suppose your last period began on March 1 and today is July 19, 140 days later. 140 divided by 7 is exactly 20, so you are 20 weeks and 0 days, in your 21st week, halfway through and in the second trimester. Your due date is 280 days after March 1, which is December 6, and 280 - 140 = 140 days remain. If instead you started from the due date, the math runs backward: December 6 minus 280 days gives March 1 as the equivalent LMP, and everything else follows.
Trimesters and milestones
The American College of Obstetricians and Gynecologists defines the first trimester as 0w0d through 13w6d, the second as 14w0d through 27w6d, and the third as 28w0d until birth. The milestone table marks every fourth week: week 4 for the missed period, week 8 when organ formation is well under way and a heartbeat is visible on ultrasound, week 12 for the end of the first trimester and first-trimester screening, week 16 when many people first feel movement, week 20 for the anatomy scan, week 24 for the usual threshold of viability, week 28 for glucose screening and Rh immune globulin, week 32 for the growth spurt, week 36 when visits turn weekly and group B strep is swabbed, and week 40, your due date.
Births are spread widely around that date. Only about one baby in twenty arrives on the due date itself, roughly 70% come within ten days of it, and anything from 37 to 42 weeks is considered term. An early ultrasound, which measures the embryo directly, is more accurate than the LMP when the two disagree by more than five to seven days in the first trimester, and once your provider sets a dating scan the practice is to keep it for the rest of the pregnancy.