# How everything is calculated

14 October, 2013 by David Johnstone

There’s lots of numbers on this site, but it’s not obvious how many of them are calculated. In fact, even the simplest ones end up being a lot less simple when you think about it. Does average power include zeros? Does average cadence? And why are there three times for the ride? Read on and be illuminated.

• Total time — The time between the start of recording and end of recording. Simple, but misleading if your ride involves riding to work, working eight hours, and then riding home.
• Duration — The time between the start of movement and end of movement, with all gaps larger than three minutes reduced to three minutes. You are counted as moving when speed is above 3km/h, as GPS errors can creep in here, or when power is greater than zero. This is intended to be the closest approximation to how long the ride actually was, although there isn’t a perfect way of measuring this, as the time you want depends on what you want to know the time for. Thus, this is intended to be how long the ride was according to your body, and it is used to calculate training load and TRIMP, which both calculate how taxing the ride was based on the time and an intensity factor. Gaps aren’t completely eliminated, as they allow for recovery between efforts. Three minutes is a somewhat arbitrary cut-off point for gaps, but there is always going to be arbitrariness — for example: why should rolling down a mountain for 15 minutes count if you don’t do any pedalling?, or, what’s the difference between coming to a complete stop after a hard interval and rolling at 15km/h? Gaps are shortened below three minutes if the recording device was stopped for the duration of the gap. If there is no speed data, this is the same as total time.
• Moving time — The amount of time that you are moving. As with duration, you are counted as moving when your speed is above 3km/h (to cater for GPS errors) or when power is greater than zero. If there is no speed data, this is the same as total time.
• Distance — How far you went. This one’s easy.
• Climbing — How many metres/feet were climbed in the ride. This is actually quite difficult to properly define for reasons related to the coastline paradox. That is, small changes up and down on ostensibly flat ground can accumulate and cause the figure to be much higher than you would expect. To calculate this number, a minimum of 2m of elevation change is required before it is counted towards the overall figure.
• Work — The mechanical energy output of the ride. This is actually just the sum of the power data (which won’t surprise those who remember what they learnt about joules and watts in physics). By the way, since the body is roughly 22% efficient at converting the calories we eat into mechanical energy (i.e., what a power meter measures), and by coincidence there are 4.184 Calories in a kilojoule, the work measured by a power meter in kilojoules is almost exactly the same as how many Calories the ride burnt — 1 / (4.184 × 0.22) = 1.0864, so add 9% for a more accurate figure.
• Left/right balance — This simply shows the average left/right power balance of a ride. Note that this does not tell you that x% of power came from the left or right leg, as this doesn’t take the power into consideration. For example, if, when riding gently, you favour your left leg, but when riding harder your legs are even, this is arguably going to disproportionately favour your left leg. In any case, it’s probably not the most useful number on this site, especially when the power vs. left/right balance chart exists.
• Average speed — The average speed when you are moving, which is distance / moving time.
• Maximum speed — The highest speed recorded in the ride file.
• Average power — The average power, including zeroes, for the part of the ride used for duration (which, if you don’t stop for coffee, is often the entire ride).
• Maximum power — The highest power output recorded in the ride file.
• Average heart rate — The average heart rate for the part of the ride used for duration. Zeroes aren’t included, which might sound odd (you have bigger problems than the quality of the data you’re recording if you don’t have a pulse), but heart rate monitors drop out or run out of batteries enough to make it worth doing.
• Maximum heart rate — The highest heart rate recorded in the ride file.
• Average cadence — The average cadence, not including zeroes, for the ride (since it doesn’t include zeroes, it ignores the time when you’re not moving).
• Maximum cadence — The highest cadence recorded in the ride file.
• Effective power — This uses the same power data that is used for calculating average power and it means something similar but it takes into account the way higher powers are disproportionally harder. The idea is that the ride would be just as hard if this was the average power for the entire ride. This number is calculated using a method developed by Andrew Coggan, which involves calculating the fourth root of the average of the fourth powers of the 30s rolling average of the power data.
• Intensity — This is calculated as effective power / FTP (FTP, or functional threshold power, which is the maximum power output that can be sustained for one hour, must first be set). This indicates how hard the ride was. Shorter rides can have higher intensities. A one hour time trial will have by definition an intensity of 100%. Andrew Coggan came up with this.
• Variability — This is calculated as (effective power − average power) / average power. Mathematically, the number says how much higher effective power is than average power, and this indicates how smooth or variable the power output of the ride was. This works because effective power takes into account the fact that higher powers are disproportionally harder, so the difference between the two values indicates variability. A ride with a constant power will be 0%, and more variable power outputs will result in a higher value.
• Training load — This is calculated as intensity2 × duration. This indicates how taxing on the body the ride was. A one hour time trial will by definition have a training load of 100. Andrew Coggan also came up with this.
• TRIMP — This is like training load, but generated using heart rate data instead of power data. It’s calculated by multiplying duration with a number generated based on your resting and maximum heart rate, sex and the average heart rate for the ride.
• Power/heart rate zones — The amount of time spent in each zone, where the number of zones and the limits of each zone is configurable. The part of the ride used for duration is used. Zeroes are included if the zone’s lower limit is zero.

This is the blog of Cycling Analytics, which aims be the most insightful, most powerful and most user friendly tool for analysing ride data and managing training. You might be interested in creating an account, or following via Facebook or Twitter.