Critical Path Method (CPM): Steps, Formula & Example
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.
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
- Critical path — the longest path of dependent activities; its length is the project's minimum duration.
- Float (slack) — how long an activity can be delayed without delaying the finish. Critical activities have zero.
- Forward pass — left to right, finding each activity's earliest dates.
- Backward pass — right to left, finding the latest dates that still hit the end date.
- ES / EF — early start and finish.
EF = ES + Duration. - LS / LF — late start and finish.
LS = LF − Duration.
Tying them together: Float = LS − ES = LF − EF. Zero float means the activity is critical.
How to calculate it step by step
Five steps, using a day-based convention where the project starts at time 0.
- List activities & dependencies. Every activity, its duration, and its predecessors.
- Build the network. Connect them from a single start to a single finish.
- 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. - 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. - Compute float.
Float = LS − ES. The zero-float activities, connected start to finish, are the critical path.
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.
| Activity | Duration (days) | Predecessor(s) |
|---|---|---|
| A — Site survey | 4 | — |
| B — Design the layout | 6 | A |
| C — Council permit | 10 | A |
| D — Order racking (long lead) | 15 | B |
| E — Clear the floor | 5 | A |
| F — Slab repair | 8 | C, E |
| G — Electrical first fix | 6 | F |
| H — Install racking | 9 | D, G |
| I — Inspection & sign-off | 3 | H |
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.
| Activity | Dur | ES = max(preds' EF) | EF | LF = min(succs' LS) | LS | Float | Critical? |
|---|---|---|---|---|---|---|---|
| A — Site survey | 4 | 0 (no predecessor) | 0+4 = 4 | min(7, 4, 9) = 4 | 4−4 = 0 | 0 | Yes |
| B — Design layout | 6 | 4 (A) | 4+6 = 10 | 13 (D) | 13−6 = 7 | 3 | No |
| C — Council permit | 10 | 4 (A) | 4+10 = 14 | 14 (F) | 14−10 = 4 | 0 | Yes |
| D — Order racking | 15 | 10 (B) | 10+15 = 25 | 28 (H) | 28−15 = 13 | 3 | No |
| E — Clear the floor | 5 | 4 (A) | 4+5 = 9 | 14 (F) | 14−5 = 9 | 5 | No |
| F — Slab repair | 8 | max(14, 9) = 14 | 14+8 = 22 | 22 (G) | 22−8 = 14 | 0 | Yes |
| G — Electrical | 6 | 22 (F) | 22+6 = 28 | 28 (H) | 28−6 = 22 | 0 | Yes |
| H — Install racking | 9 | max(25, 28) = 28 | 28+9 = 37 | 37 (I) | 37−9 = 28 | 0 | Yes |
| I — Sign-off | 3 | 37 (H) | 37+3 = 40 | 40 (project end) | 40−3 = 37 | 0 | Yes |
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.
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:
- B: total float 3, free float = ES(D) 10 − EF(B) 10 = 0. Slip B a day and D moves immediately. Those three days belong to the B→D chain, and whoever spends them first has spent them.
- D: total float 3, free float = ES(H) 28 − EF(D) 25 = 3. D's slack really is D's.
- E: total float 5, free float = ES(F) 14 − EF(E) 9 = 5. Entirely private, sitting in front of the permit wait.
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:
- CPM — one fixed duration per activity, focused on the critical path and float. Best when durations are reasonably known.
- PERT — three estimates per activity, optimistic, most likely and pessimistic, weighted as
(O + 4M + P) / 6to model uncertainty. Teams often run CPM on PERT-derived estimates. - Critical chain — CPM plus resource constraints, consolidating per-task padding into shared buffers at the end of the chain and its feeders. Best when shared resources, not just dependencies, drive the schedule.
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:
- Total float only. One figure per task, and it is total float — there is no free-float column.
- Summary rows do not schedule. CPM runs on leaf tasks and milestones; group bars are rollups of their children.
- Working days, when a calendar is on. The calculation runs in working-day ordinals, so an offset of 5 means five working days and successors land on a Monday, not a Sunday.
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.
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.