Due date is estimated based on your last period date and forty-week duration of pregnancy. It is not an accurate prediction.
Conception happens approximately two weeks after the last day of the last period. Fetus develops for forty weeks from conception date. This calculations are based on 28-day period. A due date calculated this way is a good benchmark, but not a promise. Normal gestation time is between thirty eight and forty two weeks. There is no way to predict your own normal pregnancy duration, even if it is not first pregnancy. There are some general rules. First pregnancies tend to be little longer than subsequent. There is evidence that white women have longer pregnancies than Asian or black. I can add my personal testimonial here: I'm white and had my first baby a week past estimated due date. And mind you, babies gain about an ounce every day in last weeks of pregnancy. She was born 8lb 10 ounce. My second child was born two weeks before estimated dues date, and third one exactly on his due date. However, here comes additional means to estimate due date: the calculator above is no use if you have irregular periods, if your normal period didn't reestablish after you discontinued pills, or didn't actually have period before you got pregnant. That happens for multiple reasons. I wanted to get pregnant as soon as possible after my first child, but could not until I was nursing her and didn't wean she until he was fifteen month old. Some women do get pregnant while nursing, but I, apparently, not. I didn't have my periods while nursing my children, as well. I got pregnant second time with no period since before previous pregnancy. My third due date was calculated based on ultrasound. If you keep regular pregnancy tests and have an ultrasound check in first trimester, your due date will be recalculated based on fetus size, and added to your chart with original due date if you had one. Ultrasound-based due date tends to be more accurate, because no matter how large or small baby is going to be at birth, in the beginning they all develop at same pace, and you don't need your period data to estimate gestational age on ultrasound. Later in third trimester due date can be re-estimated again based on baby's size and mother's condition, but it does not get more precise then a week-long window.
Beside estimated due date, there are factors that affect duration of pregnancy. Labor is not considered preterm after 37 weeks of gestation. Certain vaginal infections can trigger earlier labor, and sometimes labor is intentionally induced if there are risk factors for mother or child. If you are past your due date and wouldn't wait, labor can be induced as well. I'd rather wait and get last hours to myself. Beside medical intervention, there are folk methods: energetic exercise, spicy food and sex. I believe woman's intense wish helps as much as methods above, but who knows. Spicy foods, reasonable exercise and sexual activity are not considered risk factors for preterm labor.
See also: early pregnancy.