← Back to Blog
·GanttPM Teamschedulinggantt

How to calculate the critical path: forward pass, backward pass and slack

The two-pass method behind every critical path calculation, worked through with a five-task example and a table of early and late dates.

You can find a small critical path by eye. Once a project has fifty tasks you need a method, and the method is the same one scheduling software runs: a forward pass, then a backward pass, then a subtraction. It’s simple enough to do on paper once, which is worth doing so the software stops looking like magic.

The example

Five tasks, durations in days, with Finish-to-Start dependencies:

  • A. Design takes 3 days, no predecessor
  • B. Build takes 5 days, after A
  • C. Order hardware takes 4 days, after A
  • D. Install takes 2 days, after B and C
  • E. Test takes 3 days, after D

Forward pass: earliest dates

Start at the beginning and work forward. Each task’s earliest start (ES) is the latest earliest finish of its predecessors. Earliest finish (EF) is ES plus duration.

A starts at day 0 and finishes at 3. B and C both start at 3. B finishes at 8, C at 7. D has two predecessors, so it waits for the later one: it starts at 8, not 7, and finishes at 10. E starts at 10 and finishes at 13.

The project takes 13 days. That’s the number the forward pass gives you.

Backward pass: latest dates

Now start from the end and work back. Set the last task’s latest finish (LF) to the project finish, 13. Latest start (LS) is LF minus duration. A predecessor’s LF is the earliest LS among the tasks that follow it.

E: LF 13, LS 10. D: LF 10, LS 8. B: LF 8, LS 3. C: LF 8, LS 4. A has two successors, B (LS 3) and C (LS 4), so it takes the smaller one: LF 3, LS 0.

Slack

Slack is LS minus ES, or LF minus EF. Both give the same answer.

Task ES EF LS LF Slack
A 0 3 0 3 0
B 3 8 3 8 0
C 3 7 4 8 1
D 8 10 8 10 0
E 10 13 10 13 0

Every task with zero slack is on the critical path: A, B, D, E. C has one day of slack. Ordering hardware can slip by a day and nothing downstream changes, but a two-day slip pushes D, then E, and the project finishes on day 14.

Where people go wrong

The most common mistake is on the forward pass at a merge point. D has two predecessors and it’s tempting to use the first one you looked at. Always take the later finish. The mirror image happens on the backward pass at a split, where you take the earlier start.

The second mistake is forgetting that lag changes the arithmetic. A 2-day lag on the link from C to D means D can’t start until day 9, and C becomes the driver instead of B. The path moves, which is why a calculation done once and pasted into a document goes stale as soon as anything changes.

Letting the software do it

GanttPM’s CPM engine runs both passes whenever you edit a task, link or duration, and the Gantt view shows the result as the highlighted path and a slack value per task. Do the five-task example above by hand first, then enter it in GanttPM and compare. If your numbers and the chart agree, you understand what the engine is doing.

Bring your plan across, in minutes.

Import your existing Microsoft Project files or start fresh. Free to use locally, no credit card required.