Due Date Question

How do the doctor calculate your due date? Do they use the standard 28/30 day cycle? Or will they use the cycle length you give them?