Does period matter when it comes to pregnancy dating

I’m trying to date my pregnancy from lmp instead of ultrasound and the ultrasound is showing I’m further along then I thought I only just realised I have a 31 day cycle and I’ve been basing everything of a 28 day cycle this whole time this pregnancy is just confusing me