HomeGuides › Critical path method

Critical Path Method (CPM): Steps, Formula & Example

By the gantts.app teamUpdated July 14, 202611 min read

The critical path method (CPM) finds the longest chain of dependent tasks in a project. That chain sets the shortest possible finish date, because its tasks have no slack — delay any one of them and the whole project slips. This guide explains the terms, the forward and backward pass, and a worked example with the math.

On this page
  1. What is CPM?
  2. Key terms
  3. How to calculate it step by step
  4. A worked example, with the arithmetic
  5. Total float, free float, and negative float
  6. CPM vs PERT vs critical chain
  7. How gantts.app computes it (and where it differs)
  8. See the critical path automatically
  9. Frequently asked questions
Forward pass, backward pass, then read the slack:
A · 3B · 5C · 2D · 4Critical path: A → B → DSlack (C): 3Duration: 12

What is CPM?

The critical path method is a project scheduling technique that identifies the longest sequence of dependent tasks from start to finish. The length of that sequence equals the shortest time in which the project can be completed. The tasks on it are called critical tasks because they have zero slack: there is no spare time, so any delay to a critical task pushes out the project's end date one-for-one.

CPM was developed in the late 1950s by Morgan Walker and James Kelley, working on plant-maintenance scheduling. Its value is focus: on a plan with dozens of tasks, it tells you which handful actually control the deadline.

Key terms

Tying them together: Float = LS − ES = LF − EF. Zero float means the activity is critical.

Don't want to do the passes by hand? The gantts.app Gantt maker highlights the critical path as you type, then exports to Excel, PowerPoint, PDF or PNG. No sign up.

How to calculate it step by step

Five steps, using a day-based convention where the project starts at time 0.

  1. List activities & dependencies. Every activity, its duration, and its predecessors.
  2. Build the network. Connect them from a single start to a single finish.
  3. Forward pass (ES / EF). Left to right: first activity ES = 0, EF = ES + Duration, and each following ES is the largest EF among its predecessors. The largest EF at the end is the project duration.
  4. Backward pass (LS / LF). Right to left: last activity's LF = project duration, LS = LF − Duration, and each earlier LF is the smallest LS among its successors.
  5. Compute float. Float = LS − ES. The zero-float activities, connected start to finish, are the critical path.
A · 3B · 5C · 2D · 4Critical path: A → B → DSlack (C): 3Duration: 12
The forward pass sets the earliest dates, the backward pass the latest, and the gap between them is float. Zero gap means critical.

A worked example, with the arithmetic

A warehouse racking installation, nine activities, durations in working days. Every number below needs nothing but addition and subtraction.

ActivityDuration (days)Predecessor(s)
A — Site survey4
B — Design the layout6A
C — Council permit10A
D — Order racking (long lead)15B
E — Clear the floor5A
F — Slab repair8C, E
G — Electrical first fix6F
H — Install racking9D, G
I — Inspection & sign-off3H

The three paths through the network, added up:

  • A → C → F → G → H → I = 4 + 10 + 8 + 6 + 9 + 3 = 40 days
  • A → B → D → H → I = 4 + 6 + 15 + 9 + 3 = 37 days
  • A → E → F → G → H → I = 4 + 5 + 8 + 6 + 9 + 3 = 35 days

Forty days is the longest, so that is the answer. The passes below prove it and price the slack on everything else.

Forward: start at day 0, EF = ES + Dur, ES is the largest EF among predecessors. Backward: I's LF is the project's 40, LS = LF − Dur, LF is the smallest LS among successors.

ActivityDurES = max(preds' EF)EFLF = min(succs' LS)LSFloatCritical?
A — Site survey40 (no predecessor)0+4 = 4min(7, 4, 9) = 44−4 = 00Yes
B — Design layout64 (A)4+6 = 1013 (D)13−6 = 73No
C — Council permit104 (A)4+10 = 1414 (F)14−10 = 40Yes
D — Order racking1510 (B)10+15 = 2528 (H)28−15 = 133No
E — Clear the floor54 (A)4+5 = 914 (F)14−5 = 95No
F — Slab repair8max(14, 9) = 1414+8 = 2222 (G)22−8 = 140Yes
G — Electrical622 (F)22+6 = 2828 (H)28−6 = 220Yes
H — Install racking9max(25, 28) = 2828+9 = 3737 (I)37−9 = 280Yes
I — Sign-off337 (H)37+3 = 4040 (project end)40−3 = 370Yes

Two rows carry the method. F starts at 14, not 9, waiting on the permit rather than the floor clearance. H starts at 28, not 25: the electrical chain lands after the racking delivery. A's LS coming out at 0 is the check — anything higher and 40 would not be the minimum.

The zero-float activities — A, C, F, G, H, I — are the critical path, exactly the 40-day chain we added up first. The floats agree with the path lengths too: B and D sit on the 37-day path, 40 − 37 = 3 each; E on the 35-day path, 40 − 35 = 5. Float on a path is always the project duration minus that path's length — the quickest way to check your own arithmetic.

Now slip something. The permit (C) takes 14 days instead of 10, four days late on a critical activity. Redo the forward pass from C: EF 4 + 14 = 18, so F ES 18 / EF 26, G ES 26 / EF 32, H ES max(25, 32) = 32 / EF 41, I EF 44.

The project moved day for day — nothing absorbed the delay, because there was nothing to absorb it with. Everyone else got richer: rerun the backward pass from LF(I) = 44 and B's float is 7, D's 7, E's 9, each up by the same four days. Slack elsewhere is manufactured by delay on the critical path.

Now overspend some float. Put C back to 10 and let the racking order (D, float 3) take 20 days instead of 15 — five days late on a non-critical activity. D's EF becomes 10 + 20 = 30, so H ES max(30, 28) = 30 / EF 39, and I finishes at 42.

Two days late, not five: the first three came out of D's float, and only the overspend reached the finish. Float is a budget, spendable once. And the critical path moved — A → B → D → H → I is now 4 + 6 + 20 + 9 + 3 = 42, while the old permit chain has 2 days of float. The activities you were guarding stopped being the ones that mattered, and nothing would have told you unless it recalculated.

ABCFree floatTotal float
Float is a budget. Spend less than you have and the finish date does not move; spend more and only the overspend reaches the end.

Total float, free float, and negative float

"Float" above is total float: how far an activity can slip before the project finish moves. On its own it misleads, because total float is often shared. Free float asks the stricter question — how far can this slip before disturbing any successor? It is earliest ES among successors − EF:

Total float is what the deadline can absorb; free float is what you can spend without a conversation. Two managers on one chain planning against total float will both take the same days.

Negative float means something is wrong: the late start falls before the early start, usually because an imposed deadline is earlier than the logic allows. −4 is not spare time — it reads "this needed to have started four days ago."

CPM vs PERT vs critical chain

Three related techniques are easy to mix up:

How gantts.app computes it (and where it differs from the textbook)

Worth being precise about, because our forward pass is not the one described above, and the difference lands in the float column.

Textbook CPM ignores where you drew the bar: it places every activity as early as its predecessors allow, so E starts on day 4 whether or not that is where you put it. gantts.app runs as-placed CPM — each task starts at its own placed start date, and predecessors can then push it later, never earlier. In code it is one max: early start begins at the task's own start, and a dependency raises it only if the constraint demands more.

Put E's bar on day 8 rather than day 4 and the difference is a number. Textbook CPM still reports ES 4 and 5 days of float. We report ES 8, and with the backward pass unchanged (LS 9), float is 1 day. Both are correct; they answer different questions. The textbook asks how much slack the logic permits; we ask how much this plan, as drawn, has left.

The reason is that this is a chart first: a forward pass that silently relocated tasks would print float for a schedule that is not the one on screen. Dragging a bar is an instruction, so we treat it as one.

The rest is conventional. Late finish is the smallest late start among successors (or the project end), float is LS − ES, and lags and the non-finish-to-start links run through the same pass. A task is critical when float is zero or less, so negative float shows up rather than disappearing. Three more things:

For the textbook behaviour — everything pulled back to the earliest date its logic allows — use Auto-schedule. It redoes the forward pass with one rule changed: a task with predecessors is driven purely by its constraints, ignoring where it sits, while tasks without predecessors stay put as anchors. Press it and the two methods agree.

Finish → Start + LagALag 3dBB waits for A + 3d
A lag shifts the constraint without breaking the link. The critical path runs through the lag, so a three-day wait is three days of the deadline.

See the critical path automatically

Doing the passes by hand is the way to understand CPM, but you would not want to redo them every time an estimate changes — and as the second slip above showed, the path itself moves. gantts.app highlights the critical path the moment you add tasks and dependencies, free, in your browser, with no sign up. Change a duration and it recomputes instantly. Export to PDF, PNG, Excel, or PowerPoint.

New to scheduling? Start with what a Gantt chart is, then how to make one, or take a ready-made plan from the template library.

Frequently asked questions

What is the critical path method in simple terms?

The critical path method is a way to find the longest chain of dependent tasks in a project. That chain determines the shortest possible finish date, because every task on it must be done in sequence with no slack. Delaying any critical task delays the whole project.

How do you calculate the critical path?

List every activity with its duration and dependencies, draw a network diagram, run a forward pass to find each task's earliest start and finish, run a backward pass to find the latest start and finish, then compute float as late start minus early start. Tasks with zero float form the critical path.

What is float or slack?

Float, also called slack, is how long a task can be delayed without delaying the project. It equals late start minus early start (or late finish minus early finish). Tasks on the critical path have zero float; non-critical tasks have positive float.

What is the difference between the forward pass and backward pass?

The forward pass moves left to right through the network to calculate each task's earliest start and earliest finish, giving the project's minimum duration. The backward pass moves right to left to calculate each task's latest start and latest finish without delaying that end date.

What is the difference between CPM and PERT?

CPM uses a single, deterministic duration for each activity and focuses on the critical path and float. PERT uses three time estimates (optimistic, most likely, pessimistic) to model uncertainty and estimate the probability of finishing by a given date. In practice the two are often combined.

Can I see the critical path automatically?

Yes. gantts.app calculates and highlights the critical path for you as you build the chart, free in your browser with no sign up. Change a duration or dependency and the critical path updates instantly.

See your critical path now

Free, no sign up. Add tasks and dependencies and gantts.app highlights the critical path automatically.

Open the Gantt maker →