The Proper Way to Estimate Time

An arm with a wristwatch attached, laying on a laptop
Photo by Brad Neathery on Unsplash

I work as a programmer, I create a game, and I write blogs. If there one thing all of these things need then it is time estimation.

Probably one of the hardest questions to answer as a programmer is:
How long does it take to implement this?

Because: Well, good question. I don’t know!
Does not count as an answer, programmers tend to pause a while and then give out a rough time estimate — which most of the time is wrong.

And you can’t blame them. They are just humans too, and they don’t own a glass ball which allows them to see the future.
Often we can’t make precise time estimations because projects are to complex. A small bugfix can result in a large problem faster than you might think.

Good time estimation is important.

Not only projects suffer from bad estimated time, but it is also a bad feeling for the person working on a task which should be finished a while ago.

But we are lucky! Some techniques allow us to estimate time much more precisely.
One of them is called PERT. I learned this method at my previous workplace and it has proven itself to me, so I want to show you what it is and how to use it.

PERT

PERT (Program Evaluation and Review Technique) was created by the US navy back in 1958 where it was used to estimate the time to develop ballistic missiles launched from submarines.

Most of us probably don’t work on such massive projects, but don’t worry, PERT works fine for smaller tasks too.

How to use

PERT uses three estimated times to estimate the expected time (E):

  • Optimistic time (O)
  • Pessimistic time (P)
  • Most likely time (M)

O is the time you estimated the task would take if everything goes like expected e.g. the fastest time you think you can finish the task.

P is the opposite of O. Estimate the time you think you would need if everything doesn’t work as you expect.

M is the time you would think is the most realistic one to finish the task.

Depending on your task, the estimated times can be in any size you want(minutes, hours, days…).

After you estimated all three times, you can get the expected time with this equation:
Expected time (E) = (O + 4M + P)/6

Because E is only a time estimate from estimated values. It is safer to calculate a variance (V) = ((P-O)/6)².

E +/- V is your timeframe where your task has the highest probability to be finished.

I will not explain the math behind PERT, which would break the scope of this blog and is not needed if you just want to use it.
If you are interested you can read more here:
https://en.wikipedia.org/wiki/Probability_measure
https://en.wikipedia.org/wiki/Beta_distribution

Example

To make things more clear, let’s practice a bit!

Let’s say you estimated:

  • O = 2 hours
  • P = 8 hours
  • M = 5 hours

Your expected time E would be calculated like this:

E =(2 + 5*4 + 8)/6 = 5

The variance V would be calculated like this:

V = ((8–2)/6)² =1

So your estimated time for this task would be 4–6 hours.

You see, PERT is an effective method to estimate times. When estimating, it is important to take some time and think about the task you are about to do. The more you know the task the easier it gets to estimate the time for it.

If you have any questions, feel free to ask me!

--

--

--

Just an aspiring game developer — I write about game development, art and other things that come to my mind.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploy a flask app on Amazon AWS EC2 and keep it running while you are offline.

Learn to code abroad: challenges + successes from CodingNomads’ Thailand 2017 coding bootcamp

Relationships in Laravel

DevOps in Mobile App Development: Is it beneficial?

DevOps in mobile app development

How I spin up a local Server

Android Architecture Components by Example

OpenStreetMaps (OSM) Maps and Flutter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tim Engelke

Tim Engelke

Just an aspiring game developer — I write about game development, art and other things that come to my mind.

More from Medium

What is Success?

11 Key Principles I Learned From Reading 60+ Self-Improvement Books

How Can You Change Your Life by Managing Your Time

3 Self Improvement Books Everyone Should Read