Lately I’ve been implementing Jack Daniels’ Running Formula step-count interval workout. The way it works is this: you run at interval pace for 20 steps, then you jog for 20 steps. Then you run at interval pace 40 steps, then you jog 40 steps. You keep doing this until you do 200 steps of each pace, then you run another 200 of each, and wind your way back down: 180 interval, 180 jog, 160 interval, 160 jog, so on and so forth until you arrive once again at 20 of each.1 This run comes out to be between 3 and 4 miles in total distance and about 2 miles of it is at interval pace. If you’re running 20-30 miles per week, this is a good amount of interval running for that week.2

Once your activity is uploaded to Strava, you’ll see a zipper pattern of a fast lap, a slow lap, a fast lap, a slow lap. Lurking amongst this data are two things that Strava doesn’t reveal out of the box: the total distance of your interval-pace laps, and this total distance’s average pace.3 Everything you need to compute these two data points exists; you just need a way to harvest it. This is where Strava’s API comes in.

First you’ll need an access token. To do this, create a Strava app4 and then head to this URL:[clientID]&response_type=code&redirect_uri=http://localhost&scope=view_private

Change out the [clientID] with your app’s client ID.

Once you’ve authorized your own app, you’ll get redirected to localhost, which unless you have a local server running will result in a “This site can’t be reached” Chrome page.5 That’s ok though, because your payload is the code parameter in the URL. Grab that and do a POST request to with these params:

  • client_id
  • client_secret

I like to handle POST requests like these using the Advanced REST client. If you’re using that for this, you’ll want to select multipart/form-data as your body content type in order to get this to work.

This POST will return a payload with your athlete information, but the piece you’re after is the access_token. Store this somewhere safe. You worked hard for it, it won’t expire, and you’ll reuse it later.

Now, get the ID of the activity you’re interested in. You’ll find the ID in the URL of the activity. E.g. has an ID of 1428717700. Now go here to get the payload of your activity:6[activityID]?access_token=[yourAccessToken]

Copy all the JSON from the response of this request, pop open your Chrome console, and write this:

const activity = [paste from clipboard]

Then run this in the console:

const totals = { distance: 0, seconds: 0 };
activity.laps.forEach(lap => {
  if (lap.pace_zone === 6) {
    totals.distance += lap.distance;
    totals.seconds += lap.elapsed_time;

totals.distance =  totals.distance * 0.000621371;


You now have, logged at the bottom of the console, the total number of miles and seconds of your interval pace. Head over to (or similar — there are a number of online calculators that achieve what that one does, so use your favorite) and plug in these numbers, and you’ll get your output. This is the process by which I can know that my run today contained a total of 2.15 miles at a 5:33/mi pace, even though the overall activity was 3.45 miles at a 7:46/mi pace.

Groovy, right?7

  1. I don’t keep track of my footfalls in my head, although you could do that if you had to. Instead, I manually lap each set of steps using my Garmin vívoactive 3, which conveniently lets you see your number of steps per lap and lets you manually create new laps. As an aside, it’s exactly this sort of functionality that Garmin offers and that Apple Watch doesn’t that explains why serious athletes still prefer Garmin. ↩︎
  2. Jack Daniels recommends that your weekly amount of interval distance be the lesser of 10K or 8% of your weekly mileage. This is right in that sweet spot. ↩︎
  3. These two data points are immensely useful, because they let you know how you’re performing compared to previous workouts. Your total distance and total average pace aren’t as helpful for this sort of workout because those are influenced heavily by how quickly or slowly you’re jogging in between interval laps. The question we’re trying to answer is this: how much quality interval time did we get? How fast were the intervals and how much distance did they cover? In my mind, the answers to those questions are some of the most valuable things we can know when analyzing a completed interval workout. ↩︎
  4. This app is for your eyes only, so name it whatever you want, and upload a picture of your dog as the app’s icon. As an aside, it’s bizarre to me that an icon is required when creating a Strava app. Why? ↩︎
  5. I assume you’re using Chrome for all this. 😛 ↩︎
  6. Strava access tokens are per-athlete which means you’ll only be able to do this on your own activities. ↩︎
  7. If you’re thinking, “This is quite a hassle and this entire process should be automated in software,” you’re on the right track. I eventually want to build this out similarly to how I built out, but it all takes time, and right now I’ve got too many other irons in the fire. So for now, computing this number takes some elbow grease. Our only consolation is that the coaches and runners who lived pre-Strava and pre-Garmin must’ve done an awful lot of number crunching by hand on yellow notepads. I don’t envy those days. ↩︎