Ask first to see if anyone has ever done that task before and how long did it take them. I also find that when I have to estimate how long a task is going to take me, I close my eyes and visually imagine myself going through all the steps it will take to complete it. I then guesstimate the amount of time it will take and then add 25% extra as a cushion.