Do you know that we can easily calculate the critical path for a project using Excel formulas?
For a long time, it has been tricky to calculate the Critical Path using Excel formulas. But thanks to the arrival of new Dynamic Array functionality in Excel, we can now calculate critical path. In this article let me describe the approach with an example.
Put on your hardhats, this one is going to blow your minds.
What is Critical Path Method (CPM)?
Critical Path Method gives us a framework to analyze and optimize a project plan. Let’s say you have a project with 6 activities, as depicted below. Then we can find a critical path that determines the total duration of the project using Critical Path Method.

The critical path is the longest sequence of tasks that must be completed to execute a project. The tasks on the critical path are called critical activities because if they’re delayed, the whole project completion will be delayed.
How do you calculate the Critical Path?
To calculate the critical path, you need below details about the project plan:
- Complete list of all planned activities
- Estimated duration for all activities (t)
- Dependencies for each activity
In many real-world scenarios, accurately listing all three of them is impossible. And that is why CPM technique is often criticized.
Once you have all of them, we need to apply critical path algorithm to calculate below 5 values.
- Earliest Starting time (ES): This is maximum Earliest Finish (EF) of all predecessors of an activity.
- Earliest Finish time (EF): This is ES + duration of the activity (t)
- Latest Finish time (LF): This is the minimum Latest Start time (LS) of all successors of an activity.
- Latest Starting time (LS): This is LF – duration of the activity (t)
- Float or Slack (F): This is the gap between Latest Start (LS) and Earliest Start (ES). For activities on critical path this value would be 0.
Learn more about Critical Path Method:
Critical Path Calculations with an Example
Let’s go back to our 6 activity project. We can assign durations for each activity like this:
We can use below notation when capturing this data in Excel table.
Calculating ES, EF, LS, LF & Float with Formulas
Adjacent to the input data table, add 6 columns for all our calculations. Our table should look like this:

Now, lets understand the formulas for Successors, Early Start (ES), Early Finish (EF), Latest Start (LS) and Latest Finish (LF).
Early Start Formula (ES)
Early Start is the earliest an activity can begin. An activity can only start when all of its predecessors have finished. So this is same as the maximum of Early Finish (EF) for all the predecessors. If an activity has no predecessors, then it can start right away.
As we have the list of predecessors in the cell [@Predecessors], we can loop thru them and find the maximum finish time for them.
Here is the formula I used.
=IF([@Predecessors]="",0, MAX(CHOOSEROWS([EF],TEXTSPLIT([@Predecessors],",")+0)))
For activities without predecessors, we set the value of ES as 0.
For all other activities, we split the [@Predecessors] by comma (using TEXTSPLIT) and convert these text values to numbers (by adding a 0 to them). We then pick the maximum of all these activity’s earliest finish time [EF] using MAX & CHOOSEROWS functions.
Early Finish Formula (EF)
This is easy. We just add duration to early start (ES).
=[@ES]+[@[Estimated Duration]]
🤔Did you notice the circular nature of these formulas?
Even though ES formula depends on EF and EF formula depends on ES (head hurts, innit?), you need not worry. Excel will calculate both of these values fine as long as there are no loops in your project data (ie. Activity 1 depends on 2 and 2 depends on 1)
Successors Formula
Before we calculate the Latest Start (LS) and Latest Finish (LF) times, it is a good idea to calculate the list of successors for each activity.
I used this formula for that:
=TEXTJOIN(",",TRUE,FILTER([ID],IFERROR(BYROW([Predecessors],LAMBDA(a, OR(TEXTSPLIT(a, ",")+0=[@ID]))),FALSE),""))
How it works?
For each activity, the list of successors is defined as all the activities that begin immediately after that activity.
So for example, going back to our image of project plan (see below),

the list of successors for activity 1 is {2,3}
To obtain this list for a given activity x:
- We need to filter all the activities
- where x is one of the predecessors
We can use a cocktail of FILTER(), BYROW(), LAMBDA() and TEXTSPLIT() for this.
Here is the basic approach:
- We filter the [ID] column
- by checking for each row (hence BYROW)
- if the [Predecessor]s has the [@ID]
- To perform the check, we first split the predecessors using TEXTSPLIT
- and then compare if any of them equal to [@ID]
- At the end of this BYROW looping, we end up with either TRUE or FALSE values against each [ID]
- After filter fetches all the successors, we just apply TEXTJOIN to combine them to a list. For ex: 2,3
Latest Finish Formula (LF)
Latest Finish (LF) is defined as the latest an activity can finish without derailing the project.
For the activities without any successors, this is same as EF.
For all other activities, we look for the minimum (earliest) LS value of all it’s successors.
Here is the formula:
=IF([@Successors]="",[@EF],MIN(CHOOSEROWS([LS],TEXTSPLIT([@Successors],",")+0)))
How this formula works?
If an activity has no successors (ie it is last activity in the project diagram) we set LF as EF.
For all other activities, we split the [@Succssors] by comma (using TEXTSPLIT) and convert these text values to numbers (by adding a 0 to them). We then pick the minimum of all these activity’s Latest Start time [LS] using MIN & CHOOSEROWS functions.
Latest Start Formula (LS)
This is Latest Finish (LF) minus Duration (T)
=[@LF]-[@[Estimated Duration]]
Float (or Slack)
Now that we have all the calculations done, we can figure out the float (or slack) for each activity. This is the difference between Latest Start (LS) and Earliest Start (ES) for an activity.
=[@LS]-[@ES]
Findout out which activities are on Critical Path
Any activity with ZERO (0) float is on the critical path. It means, there is no wiggle room for that activity.
We can use Excel’s conditional formatting feature to visually identify all such activities.
- Select the table and add a new conditional formatting rule (formula based)
- Use the rule float_column=0 and set the necessary formatting. (see my rule in the below screenshot).
Here is my final project plan table with critical path activities identified.
Critical Path Analysis with Excel - FREE Template
Please download my FREE Critical Path Analysis Template and use your own data to calculate the critical path automatically.
Critical Path Calculations in Excel - Watch the Video
Still confused about these calculations? I made a video explaining the CPM concept & Excel formulas. Check it out below or on my YouTube Channel.
More on Project Management using Excel
If you are a project manager, you are going to love my site. I have articles & templates on all aspects of Project Management. Check them out below:



















14 Responses to “Group Smaller Slices in Pie Charts to Improve Readability”
I think the virtue of pie charts is precisely that they are difficult to decode. In many contexts, you have to release information but you don't want the relationship between values to jump at your reader. That's when pie charts are most useful.
[...] link Leave a Reply [...]
Chandoo,
millions of ants cannot be mistaken.....There should be a reason why everybody continues using Pie charts, despite what gurus like you or Jon and others say.
one reason could be because we are just used to, so that's what we need to change, the "comfort zone"...
i absolutely agree, since I've been "converted", I just find out that bar charts are clearer, and nicer to the view...
Regards,
Martin
[...] says we can Group Smaller Slices in Pie Charts to Improve Readability. Such a pie has too many labels to fit into a tight space, so you need ro move the labels around [...]
Chandoo -
You ask "Can I use an alternative to pie chart?"
I answer in You Say “Pie”, I Say “Bar”.
This visualization was created because it was easy to print before computers. In this day and age, it should not exist.
I think the 100% Bar Chart is just as useless/unreadable as Pies - we should rename them something like Mama's Strudel Charts - how big a slice would you like, Dear?
My money's with Jon on this topic.
The primary function of any pie chart with more than 2 or 3 data points is to obfuscate. But maybe that is the main purpose, as @Jerome suggests...
@Jerome.. Good point. Also sometimes, there is just no relationship at all.
@Martin... Organized religion is finding it tough to get converts even after 2000+ years of struggle. Jon, Stephen, countless others (and me) are a small army, it would take atleast 5000 more years before pie charts vanish... patience and good to have you here 🙂
@Jon .. very well done sir, very well done.
good points every one...
I've got to throw my vote into Jon's camp (which is also Stephen Few's camp) -- bars just tend to work better. One observation about when we say "what people are used to." There are two distinct groups here (depending on the situation, a person can fall in either one): the person who *creates* the chart and the person who *consumes* the chart. Granted, the consumers are "used to" pie charts. But, it's not like a bar chart is something they would struggle to understand or that would require explanation (like sparklines and bullet graphs). Chart consumers are "used to" consuming whatever is put in front of them. Chart creators, on the other hand, may be "used to" creating pie charts, but that isn't an excuse for them to continue to do so -- many people are used to driving without a seatbelt, leaving lights on in their house needlessly, and forwarding not-all-that-funny anecdotes via email. That doesn't mean the practice shouldn't be discouraged!
[...] example that Chandoo used recently is counting uses of words. Clearly, there are other meanings of “bar” (take bar mitzvah or bar none, for [...]
[…] Grouping smaller slices in pie chart […]
Good article. Is it possible to do that with line charts?
Hi,
Is this available in excel 2013?