Due date..?

Do doctors decide your due date from the first day of your last period? Or do they do it based off of when you ovulated?