Software projects are notorious for missing deadlines.
Most estimation is done using the inside view – time and effort required for a project is estimated by looking at details of that particular project by itself. Estimates developed using the inside view tend to be either too optimistic (usually) or too pessimistic (rarely), as you get caught up too much in the details of the case.
The other approach for estimation is to use the outside view – estimate without digging too much into details, but by looking at how long similar projects took. Using the outside view tends to produce much better estimates. Come up with a reference class of completed projects that are similar to yours. Find out how long they took on average, and use that as an estimate.
A good definition of the outside view from the LessWrong wiki:
Taking the outside view (another name for reference class forecasting) means using an estimate based on a class of roughly similar previous cases, rather than trying to visualize the details of a process. For example, estimating the completion time of a programming project based on how long similar projects have taken in the past, rather than by drawing up a graph of tasks and their expected completion times. The planning fallacy is that people tend to be hugely optimistic when visualizing the details of a case, and become even more optimistic as they visualize more details.
The most effective approach might be to start with the outside view to develop an initial estimate, then correct it upward or downward using the inside view. In other words, start by looking at how long similar projects took to complete, the adjust the estimate for the specific details of your project.