Naegele’s rule: LMP + 280 days. Gestational age is counted from the same LMP, so the two answers can never disagree with each other.
It assumes a 28-day cycle and a certain LMP date. Where the cycle is irregular or the date is unsure, a first-trimester ultrasound dates the pregnancy better and should win.
It is a calculator, not a clinician. Nothing here is medical advice, and the person prescribing owns the decision.