This may be a silly question haha

How do doctors know how far along you are? What do they base it off of?