I read an interesting article on creating deadlines. And the idea was that you need to come up with 3 times:
This way you have a range to work within for yourself.
These estimates are based on your experience and how complicated the task is and then add 10/20%. The article I read suggested to double the timeframe, based on statistical analysis if you double the timeframe, and are new to estimations, then you'll be something like 80% likely to actually hit the deadline. It follows the standard deviation principals in statistical maths, bell curve type stuff.
Personally, in previous jobs I used to be really terrible at estimations even though I knew the field. In my current role I seem to be estimating correctly. Although recently I have missed a deadline by a couple of weeks, due to unforeseen bugs/uncovered more underlying issues. This is why we add the safety factor of at least 10/20% of the timeframe estimated.
An important thing to remember is that things will always change and if you can estimate correctly don't get over confident in your abilities, just correctly analyse. It will get easier with time, but the most important thing to remember is to always communicate. E.g, if you have a deadline due in 1 month then let your team know your progress each week or when there are complications that you need additional help with the work or if anything changes.
This communication allows the rest of the team, as well as yourself, to adapt schedules and workloads in a pro-active/preventative nature instead of reactive one.
Hope this helped :)
Update:
My team use gitlab, so I try and get everyone using the milestones/issue tracking etc on there, coupled with the company quarterly goals to streamline task/project management. It really helps. People, who aren't tech for example, can go on gitlab and see the progress of a project against a milestone to see % complete and any complications etc + skype, although gitlab did recently acquire gitter so we should see some chat integration/similar to slack in there in the future :)
Xavier Duncan
Full Stack Web Developer, UX / UI.