People tend to underestimate the work involved in completing tasks and consequently finish tasks later than expected or do an inordinate amount of work right before projects are due. We present a theory in which people underpredict and procrastinate because the ex-ante utility benefits of anticipating that a task will be easy to complete outweigh the average ex-post costs of poor planning. We show that, given a commitment device, people self-impose deadlines that are binding but require less smoothing of work than those chosen by a person with objective beliefs. We test our theory using extant experimental evidence on differences in expectations and behavior. We find that reported beliefs and behavior generally respond as our theory predicts. For example, monetary incentives for accurate prediction ameliorate the planning fallacy while incentives for rapid completion aggravate it.