Estimation is an important part of software development and its incredibly difficult to make correct estimation. Over the time, I have realized that on most occasions my estimates were very aggressive despite keeping some buffer time.
Then one day I decided to try out something new. I divided the feature in small tasks and then made best case estimates. Then I added all the individual estimates and multiplied it by two.
This has worked pretty well for me. Still sometimes I run out of time and have to work late night 🙂