Due date estimate

When doctors determine your due date do they go by how long your cycle is or they use the average 28 way cycle ?