How does my device's accelerometer know how far I ran on the treadmill?

Customize Your Experience for Best Results

The "Nike+ GPS" app has a simple interface for entering your actual distance for any run you've completed with the app.
The "Nike+ GPS" app has a simple interface for entering your actual distance for any run you've completed with the app.
Screencap by HowStuffWorks staff

At the end of the day, if you want to run indoors and get accurate data, you're going to have to put in a little work. First, make sure your app supports calibration inputs. Not all of them do. Once you've found one that supports this feature, here's one way to test and refine your app's calibration to maximize accuracy:

Find a place to run where you are 100 percent certain of its distance.

If you have a regulation track nearby, this will work just fine. If you don't, try running outdoors with a GPS tracker to map out an easy-to-identify distance, like 1 mile or 1 kilometer, and make a note of the exact starting and stopping points.

Set your app for an indoor run. Whether you're running indoors or out, this is important, because it's the setting that tells your phone to use the accelerometer instead of GPS tracking.

Go for a run! There are several critical elements to this. Make sure you start and stop in the exact spots needed for your distance measurement. If you train with run/walk intervals, use your current running-to-walking ratio for this run. Also, the longer your distance on the calibration run, the better your reading will be. More data makes for a better calculation.

Input your distance data at the end of the run. Your app will divide this number by the number of steps your accelerometer recorded to estimate your average stride length. This is why it's so important to include your current interval timing in your calibration run. If you only run for the sample data, you won't be factoring your stride change when you walk.

Test it out. Go for another run on your distance-specific course with your app set to indoor tracking mode. See if it calculates the correct distance. If you find it's a little off, you might try going through all the steps above at a longer distance to give your app a better data sample for calibration.

If your running routine changes, or if your weight increases or drops by more than a few pounds, you'll want to run through this calibration plan again. When you lose weight, you naturally get a little faster, and if you decide to do more running and less walking on an interval plan, it's going to affect your stride averages as well.

While any app that tracks distance indoors is making a calculated estimate based on either the data you enter or an established average, testing your calibration for accuracy is key if keeping track of your distance indoors is a priority for you. The key word here is "estimate" -- it's unlikely that you'll get 100 percent accuracy from the standard formula of steps multiplied by average stride length, but you can absolutely track your progress over time as you run longer distances and speed up your pace.