Sub topic 2
Estimate Task Durations
Every bar on a Gantt chart has a length, and that length is the task's duration. This chapter covers how to produce durations you can defend, how to record them, and which errors make a schedule wrong before you draw anything.
This chapter assumes you have a work breakdown structure (WBS) with tasks small enough to estimate, and that you know basic project vocabulary such as task, deadline and deliverable. Later chapters use these durations to link tasks, run a forward pass and draw the chart.
Duration, effort and elapsed time
Three numbers are often confused. Keep them separate in your notes.
- Effort is the amount of work, measured in person-days or person-hours. Writing a report might take 6 person-days.
- Duration is the number of working time units from the task's start to its finish. If two people share the report, the duration is about 3 working days.
- Elapsed time is the calendar time that passes, including weekends, holidays and waiting. The same 3-day task can span 5 calendar days if it starts on a Thursday.
A Gantt chart needs duration. Effort feeds duration through a simple relation:
duration = effort / (people assigned x availability)Availability is the fraction of a working day a person really spends on the task. Few people spend 100% of their day on one task. A planning value of 60% to 80% is common once meetings, reviews and interruptions are counted.
def duration_days(effort_days, people=1, availability=0.7):
"""Working days needed for a task, rounded up to a whole day."""
from math import ceil
return ceil(effort_days / (people * availability))
print(duration_days(6, people=2, availability=0.75)) # 4
print(duration_days(6, people=1, availability=1.0)) # 6The first call gives 4, not 3. Rounding up keeps you from planning a fractional day that no one can deliver.
Pick a unit and stay with it
Choose one duration unit for the whole chart. Days suit most projects. Use hours only for very short projects, and weeks only for long programs where precision of a few days does not matter.
A practical rule: the unit should be small enough that your shortest meaningful task is at least 1 to 2 units, and large enough that your longest task is under about 20 units. Tasks longer than that usually hide several tasks and should go back to the WBS for splitting.
The Mermaid dateFormat and duration syntax follow the same idea. 5d means five days, 2w means two weeks, and 8h means eight hours. Mixing them is legal, but a chart where one task is 3d and the next is 1w invites confusion about whether a week is 5 or 7 days. Prefer one unit.
Estimating methods
No method removes uncertainty. Each one gives you a defensible way to commit to a number.
Expert judgment and analogy
Ask the people who will do the work, and compare against similar past tasks. If the last login page took 4 days, a similar one likely takes about 4 days. This is fast and works well when you have history. It fails when the new task differs from the old one in ways nobody noticed.
Bottom-up estimation
Break the task into smaller pieces, estimate each and add them. This is more accurate than estimating a big task in one go, because errors on small pieces tend to partly cancel. It is slower, and it can miss work that falls between pieces, such as integration.
Three-point estimation
For uncertain tasks, ask for three numbers:
- Optimistic (O): everything goes well.
- Most likely (M): a normal run.
- Pessimistic (P): realistic problems occur, but not disasters.
The PERT weighted average is:
expected = (O + 4 x M + P) / 6Its spread gives a rough standard deviation:
sigma = (P - O) / 6def pert(o, m, p):
expected = (o + 4 * m + p) / 6
sigma = (p - o) / 6
return expected, sigma
e, s = pert(4, 7, 16)
print(round(e, 1), round(s, 1)) # 8.0 2.0For this task, the expected duration is 8 days with a standard deviation of 2 days. Notice that 8 is longer than the most likely value of 7. Estimates are usually skewed, because things run late more easily than they run early. The weighted average captures that skew.
A common plan is to use the expected value for the chart bar and to keep the sigma in a risk note. Reporting only "8 days" hides the fact that 10 or 12 days is quite plausible.
Comparison of methods
| Method | Speed | Best when | Main risk |
|---|---|---|---|
| Expert judgment | Fast | The team has done similar work | Unexamined optimism |
| Analogy | Fast | Good past data exists | The new task is less similar than it looks |
| Bottom-up | Slow | The task is large or unfamiliar | Missing work between the pieces |
| Three-point | Medium | Uncertainty is high | Pessimistic values chosen out of fear or habit |
Common estimating biases
Most schedule errors come from people, not arithmetic. Watch for these.
- Planning fallacy. People estimate the best case and call it the plan. Using the three-point method forces a pessimistic number onto the page.
- Anchoring. The first number spoken in a meeting pulls everyone toward it. Ask people to write estimates down before discussing them.
- Padding at every level. If each task owner adds a private buffer, the total is inflated and each owner still uses the buffer, because work expands to fill the time available. Estimate honestly per task and hold contingency in one visible place.
- Estimating to the deadline. Working backward from a fixed launch date and calling the result an estimate is a wish. If the date is fixed, change scope or resources and say so.
Fixed-duration and effort-driven tasks
Some tasks have a duration that does not depend on staffing. A concrete slab needs days to cure, a vendor quotes a 10-day lead time, and a legal review takes whatever the legal office takes. Mark these as fixed duration. Adding people changes nothing.
Other tasks are effort-driven, and the formula above applies. Most scheduling tools let you flag each task one way or the other, so record the type in your task list next to the number.
Waiting time deserves its own entry. A task like "wait for approval" is a legitimate bar with a duration, because it consumes calendar time and can delay everything after it.
Edge cases
Zero-duration and very short tasks
A task with duration 0 is a milestone, covered in a later chapter. Do not use it for real work. A task under half a day is usually too small to chart, so merge it into a neighbor.
Tasks you cannot yet estimate
If nobody can give a defensible range, do not invent a precise number. Create a short discovery task, such as a 3-day spike, whose output is a better estimate for the real task. Mark the real task as provisional until the spike ends.
Ranges and precision
An estimate of 8.37 days is false precision. Round to whole units. Within a single chart, ranges like "8 to 12" are better kept in your notes, with one planning value on the chart.
Calendar effects
Durations count working days only. A 5-day task that starts on a Friday finishes the following Thursday, or on the following Wednesday if Monday is a holiday. The calendar chapter covers this fully. For now, estimate in working days and let the scheduling step convert to dates.
Record estimates in a form you can compute with
Keep a simple table so that later steps, such as the forward pass, can read the numbers directly.
| Task | Effort (person-days) | People | Availability | Type | Duration (days) |
|---|---|---|---|---|---|
| Wireframes | 5 | 1 | 100% | Effort-driven | 5 |
| Mockups | 7 | 1 | 100% | Effort-driven | 7 |
| Backend | 12 | 1 | 100% | Effort-driven | 12 |
| Frontend | 10 | 1 | 100% | Effort-driven | 10 |
| Integration | 4 | 1 | 100% | Effort-driven | 4 |
The same data in code, ready for dependencies to be added in the next chapter:
durations = {
"Wireframes": 5,
"Mockups": 7,
"Backend": 12,
"Frontend": 10,
"Integration": 4,
}
print(sum(durations.values())) # 38The sum, 38 days, is not the project length. Tasks that run in parallel overlap, so the project finishes sooner than the total of its parts. Working out by how much is the job of the forward pass.
Review the estimates before you chart them
Before moving on, run through this short check.
- Does every task have a single unit and a whole-number duration?
- Is any task longer than about 20 units? If so, split it.
- Did the person who will do the work take part in the estimate?
- Is contingency held in one visible place instead of hidden in tasks?
- Are waiting and lead times included as tasks?
- Are provisional estimates marked as such?
Exercises
Exercise
A task needs 9 person-days of effort. You assign 2 people, each available 75% of the time. What duration in whole working days should you plan, and why round up?
Show answer
9 / (2 x 0.75) = 6 days. The result is exactly 6, so no rounding is needed here. In general you round up because a fractional day cannot be delivered, and rounding down would make the bar shorter than the work.
Exercise
Your team gives these estimates for a risky task: optimistic 5 days, most likely 8 days, pessimistic 20 days. What are the PERT expected duration and the standard deviation? Why is the expected value larger than 8?
Show answer
Expected = (5 + 4 x 8 + 20) / 6 = 57 / 6 = 9.5 days. Sigma = (20 - 5) / 6 = 2.5 days. The expected value is above the most likely value because the pessimistic end is much farther from the most likely value than the optimistic end, so the distribution is skewed toward late.
Exercise
A task "Concrete curing" lasts 7 days. The manager proposes adding three more workers to finish it in 2 days. Explain what is wrong, and say how you would record this task.
Show answer
Curing is a fixed-duration task, so extra workers do not change its length. Record it as fixed duration, 7 days, and keep it on the chart as a task so that its waiting time delays the tasks that follow it.