Pace Calculation

With all the running I’ve been doing I’ve been trying to figure out roughly what my pace is. In theory it’s easy. Take the amount of time you’ve run, or walked, or biked, or ‘insert blank here’ and divide that into sixty to get miles or kilometers per hour. The issue of course is turning the seconds into a fraction. This too is easy, simply divide them by sixty, because there’s sixty seconds in a minute. My formula looks something like this:

pace = 60 / (minutes + (seconds / 60))

Initially I had made a little Excel document to do the calculation for me but figured I should be able to whip it up in JavaScript pretty quick and have included it here for your use. Let me know your thoughts.


No Comments | Filed under Code Development, Fitness, Life