From the plan itself, the number of steps, how they depend on each other, and the work each one takes. The more it learns how you work, the tighter the estimate.