Question about due dates

Rebekkah
I was doing some research and for people with irregular periods I'm wondering how a baby's due date is figured out? I did OPK this week so I know when I ovulated but I just came off Mirena and didn't get a period. I was just trying to figure out how baby due dates are figured out.