Anyone that has managed a project knows that estimation is something of a black art. It also tends towards being art rather than science. Experience rules all, but there is little rigour in truly trying to understand
Create a requirements document
Break those requirements down into individual tasks that can be a work breakdown structure or a User Story
Stocastic estimation is where you take multiple inputs for each task into account. When you have that detail, get the relevant people to complete a three point estimation for it:
Best case (optimistic)
Best case scenario in which nothing goes wrong and all conditions are optimal. The activity duration is based on a best‐case scenario of what is described in the most likely estimate.
Worst case (pessimistic)
The worst case scenario which everything goes wrong. The activity duration is based on a worst‐case scenario of what is described in the most likely estimate.
Most likely (realistic)
The most likely duration and there may be some problem but a lot will go right. The duration of the activity, given the resources likely to be assigned, their productivity, realistic expectations of availability for the schedule activity, dependencies on other participants, and interruptions.
When you have all of that data, you can then use a PERT analysis (for example) to determine the likely delivery date.
I found an extremely helpful article which provides a Visual Basic Macro to automatically perform a PERT analysis on every task on the project. See below link.