Naegele’s rule, and why the cycle length matters
The rule is 280 days - 40 weeks - from the first day of the last period. It works because a pregnancy is dated from the last period rather than from conception: nobody knows the day of conception, and everybody can name the first day of a bleed, so the convention is the one that can be applied consistently.
That 280 days assumes ovulation on day 14 of a 28-day cycle. Ovulation on day 17 of a 31-day cycle means the pregnancy is three days younger than the simple count says, so the estimate moves three days later. The page applies that correction and prints it, so a 35-day cycle produces a visibly different date rather than the same number with a different story attached.
The correction is a small fix to a rough estimate, not a replacement for a measurement. Where a scan disagrees with the rule, the scan wins, and the page says so instead of quietly preferring its own number.