Last week, we had an interesting homework problem – What is the average speed of this road trip?
We received more than 150 answers. But to my surprise, 57 of them are wrong. So today, lets learn how to calculate the average speed correct way.
Please click here to download solution workbook.
What is Speed?
Back in school days, we learned what speed is.
Speed = Distance / Time
Now lets look at the problem
Here is the data:
Jack kept track for every 50 mile interval. And he did that for 12 intervals. So the total distance is 12×50 = 600 miles.
We just need to know how much time Jack took to cover the 600 miles to calculate the speed.
We know that Jack covered first 50 miles @ 43mph.
So the time taken for first 50 miles is 50/43 = 1.16 hrs (or 1 hr & 9 mins)
Like wise, if we calculate times taken for all the 50 miles, we get this:

Isn’t there a way to calculate this without helper column?
Now you are talking.
While the detailed break-up of the calculation above helps us understand how Time, Speed & Distance are related, when answering a question like “What is Jack’s average speed?”, you may want to write a single formula to get the answer (instead of all the extra helper column cells).
The range A2:A13 contains speeds per 50 mile intervals.
The time taken for first 50 mile is =50/A2
The time taken for second 50 mile is = 50/A3
…
So, 50 / (A2:A13) should give us an array of times.
And the total time taken is a simple sum of this array.
So, SUM(50/(A2:A13)) should give the total time.
Now, if we divide 600 by this, we should get our average speed for the entire trip.
Formula #1: Array SUM()
Our first formula for calculating average speed is,
=600 / SUM(50/(A2:A13))
Since this is an array formula, you should press CTRL+Shift+Enter to get it work.
Formula #2: SUMPRODUCT
While the above formula works beautifully, it is a bummer that we must press CTRL+Shift+Enter to get it work. Why not use a formula that can natively process arrays.
Enter SUMPRODUCT.
=600 / SUMPRODUCT(50/(A2:A13))
works just as beautifully and you don’t have to press CSE.
Formula #3: Harmonic Mean
Lets expand the formula and see what is happening, mathematically speaking.
Our formula is,
=600 / SUM ( 50 / (A2:A13) )
in mathematical terms, this is,
= 600 / ? [ 50 / (A2:A13) ]
= 600 / [50/A2 + 50/A3 + 50/A4 + … + 50/A13]
After isolating 50, we get:
= 600 / [50 * (1/A2 + 1/A3 + 1/A4 + … + 1/A13)]
= 12 / (1/A2 + 1/A3 + 1/A4 + … + 1/A13)
Lets call this blue expression as (1).
Time for introducing the concept of Harmonic Mean.
The harmonic mean is the reciprocal of the arithmetic mean of reciprocals.
Sounds confusing?!?
Take a sip of that coffee and read again.
reciprocal of the arithmetic mean of reciprocals
So harmonic mean of a range of numbers (say a,b,c,d…) is
=1/ [(1/a + 1/b + 1/c +…) / (count of numbers)]
or in other words,
= count of numbers / sum of reciprocals
Applying this concept to the range A2:A13, we get
= count of range / sum of reciprocals of A2:A13
= 12 / (1/A2 + 1/A3 + 1/A4 + … + 1/A13)
Now, isn’t the red expression of harmonic mean same as the blue expression (1) above?
Thus, to calculate the average speed, we just need harmonic mean of the the range A2:A13.
And there is a perfect formula for that.
=HARMEAN(A2:A13)
So, we can use that and it gives average speed for the trip in one step!
Special case – What if the speed is not tracked at equal distances?
Lets say Jack measured his speed at 40,50,60,40,60,50,40,50,60,60,50,40 mile intervals instead of every 50 miles.
In such case, we can’t use HARMEAN() because the distances are not equal. Fortunately, we can still use SUMPRODUCT.
Assuming the distance covered per interval is in the range B2:B13 (speeds are already in A2:A13),
The formula,
=SUM(B2:B13)/SUMPRODUCT(B2:B13/A2:A13)
tells us the average speed of the trip.
Learn more: Calculating weighted average using SUMPRODUCT.
Download the solution workbook
Click here to download the solution workbook. Examine the formulas to learn more.
As a bonus, It contains an additional problem to test your skills.
A twist in the tale – Tracking time instead of speed
Lets say after all this formula struggle, Jack (our driver of the road trip) wised up and started tracking time instead of speed. So his new log looks like this:

Now how do we calculate the average speed?
The time stamp data is in range A2:A16 and distance is in B2:B16.
Please post your formulas in the comments section.
PS: The solution workbook contains answer to this problem as well. Just unhide to see.
Go ahead and post your answers. This time, lets hope we get fewer than 1/3rd answers as wrong.
Learn more about formulas:
Check out any article from our formula forensics or Excel homework pages to learn something interesting & cool. Also go thru SUMPRODCUT & Advanced SUMPRODUCT articles to sharpen your formula writing skills.
Listen to our podcasts on averages to raise above your average.


















18 Responses to “Best Charts to Compare Actual Values with Targets – What is your take?”
Great post. I can't vote, though, because the answer I want to put down is "it depends". As with all visualisations, you've got to take into account your audience, your purpose, technical skills, where it will be viewed, etc.
I'm with Andy: It depends. Some I would use, some I might use, some I won't touch with a barge pole.
Naturally I have comments 🙂
The dial gauge, though familiar, is less easy to read than a linear type of chart (thermometer or bullet). It's really no better than the traffic lights, because all it can really tell you is which category the point falls in: red, yellow, or green.
By the same token, pie charts are so familiar, people don't know they can't read them. Remember how long it takes kids to learn to read an analog clock?
Bullet charts don't show trends.
With any of the charts that have a filled component and a marker or ine component, it makes more sense to use the filled component (area/ column) for target, and the lines or markers for actual.
[...] Best Charts to Compare Actual values with Targets (or Budgets … [...]
I voted for #6 even though I agree with the other comments that it depends.
The majority of the votes are for the #2, thermometer chart. I still have yet to understand what happens when you are above plan/goal, which was brought up in yesterday's post.
Also, I agree with Jon in that it would be better to flip the series and make the filled part the target or goal and the line or marker the actual.
I am also a fan of using text when appropriate if the data is among other metrics in a type of dashboard. Calling it out by saying actual and % achievement is a good option.
Another "it depends" vote. Are you just looking at one or are you comparing a number of targets with actuals? You didn't include a text box. The problem with sentences is that they can get lost in a page of gray text. A text box can call attention to the numbers and line them up effectively.
I'm with Jon: "Some I would use, some I might use, some I won’t touch with a barge pole" and I'm surprised that some of your readers voted for the last group.
Jon says:
With any of the charts that have a filled component and a marker or line component, it makes more sense to use the filled component (area/ column) for target, and the lines or markers for actual.
Why does this make more sense? I like 6 the way it is, although I would use a heavy dash for the plan/target marker.
"It depends" is also my take. What I usually try to drill into my clients dashboard design is the fu ndamental difference between spot results (am I on target for this month) and long term trends.. I always try to create 3 different set of graphs to represent real perormance:
- spot results vs objectives
- cumulative results vs objectives
- long-term trend (moving average) mostly) to see where we're going
[...] Best Charts to Compare Actual Values with Targets – What is your take? (tags: excel charts) [...]
[...] Related: Charting Principles, How to compare actual values with budgets [...]
[...] Excel Charting Alternatives to compare values [...]
Jon says:
With any of the charts that have a filled component and a marker or line component, it makes more sense to use the filled component (area/ column) for target, and the lines or markers for actual.
Why does this make more sense? I like 6 the way it is, although I would use a heavy dash for the plan/target marker.
I totally agree, Bob. I would normally favour a line for the target and a column for the actual, you can see quite easily then which columns break through the line, then.
[...] best charts to compare actual values with targets — den Status mal anders zeigen, z. B. als Tacho [...]
Thermometer charts: "Not appropriate when actual values exceed targets" - this is easily solved by making the "mercury" portion a different color from the border, then you can clearly see where the expected range ends and the actual values keep going.
People seem to knock gauges quite a bit in dashboarding, but trying to show comparison of realtime data between operating sites and targets for each site can easily be done with a bank of gauges that have the optimal operating points at 12 o'clock.
The human eye is great at pattern stripping, and any deviation of a gauge from the expected 12 position will quickly register with an operator and attract his attention. Using a colour background, or meter edge, will also indicate the sensitivity of a particular site.
[…] Best charts to compare actual with target values […]
[…] Best charts to compare actual with target values […]
[…] work laptop I have a favorites folder just dedicated to Excel charts. Its got things like “Best Charts to Compare Actuals vs Targets” and “Best charts to show progress“. I love me some charts […]
I am wondering how will the plotting work, for some of the targets which may have been achieved before time. E.g. for the month of Jul the target was 226 and the actual was 219. So the chart will show a deficit in meeting the target by 7 points but what if this 7 may have been completed earlier in month of June. So ideally it not a deficit.