In the early weeks, it's accurate within a few days, typically. As pregnancy progresses, it becomes less and less accurate in general, due to the normal variations in size and development of babies (which is determined by genetics, not a standard code). For instance, someone growing a 6lb baby is going to have a different ultrasound guesstimate than a woman growing a 9lb baby (both are totally normal weight variations) at the same gestational age after the first trimester.
The most accurate method of dating is charting your fertility. However, all have a margin of error and estimated due dates are based on an average between 38-42 weeks after the last menstrual period (or 2 weeks before ovulation, to be more precise). Although anything from 37-43 weeks is to be normally expected for a healthy, full-term baby. Beyond is typically not a problem (though can be in rare instances), but sooner is considered premature.
at 5:29 AM on Sep. 3, 2012