There is a lot of confusion about the definition of gestation in pregnancy. We follow the definitions from the Princeton University.
A 40 weeks pregnancy consists of 2 weeks before the actual melting of the egg and the sperm, and 38 weeks where there actually is a growing embryo. (In this way of reasoning you're already 1 week pregnant before even having sex)
Gestation is the period of time between fertilization and birth. So when the gestational age of the baby is 0 weeks, you are alreay 2 weeks pregnant. When your due, at 40 weeks, it means you had 38 weeks of gestation.
Pregnancy lasts 280 days,
Gestation lasts 266 days.
The term gestational period is interchangeable with weeks of gestation, gestational age, and duration of pregnancy.
Trying to conceive
Pregnancy & Birth