This gives a general estimate only — roughly 1 in 20 babies actually arrives on their exact due date. Your OB or midwife's estimate, especially if based on an early ultrasound, is more precise than any calculator.
How this is calculated
The most common method (Naegele's rule) adds 280 days — 40 weeks — to the first day of your last menstrual period, assuming a fairly typical 28-day cycle. If you're calculating from a known conception date instead, we add 266 days (38 weeks), since conception itself usually happens about two weeks into a cycle.
Why your actual due date may differ
Cycle length varies a lot between people, and an early ultrasound (usually in the first trimester) is generally considered the most accurate way to date a pregnancy, since it measures the embryo or fetus directly rather than estimating from a remembered date. Only about 5% of babies are born on their exact estimated due date — most arrive within about two weeks before or after it.