What it does
Every step jolts your body up and down. A phone’s accelerometer feels those jolts, so a short recording while you walk holds your cadence (steps per minute) and how regular your steps are. Clinicians and coaches use the same idea with research-grade sensors. This page does it with your own phone, in the browser: it records the motion sensor, or opens a CSV file of time and acceleration from any sensor app, then finds each step and reports cadence, step and stride times, their variability and a spectrum.
How to use it
- Record on this phone: hold the phone against your waist or put it in a front trouser pocket, press Start recording, walk at least 20 steps on flat ground at your usual pace, then press Stop. On an iPhone the browser asks to allow motion access first.
- Or open a CSV with columns t, ax, ay, az (m/s²), from a sensor-logging app or a lab device. Time can be in seconds or milliseconds; the page decides from the size of the time steps.
- Adjust the three settings if steps are missed or doubled:
- Low-pass cut-off: smooths away jolts faster than steps. 3 Hz suits walking; try 4 to 5 Hz for running.
- Shortest step: peaks closer together are merged, the lower one dropped.
- Peak threshold: how far above the mean, in standard deviations of the smoothed signal, a peak must reach.
- Read the results and the three charts, and download the steps as CSV or the page as an image, PDF or Word file.
How it works
The page takes the magnitude √(ax² + ay² + az²) of each reading, so the phone’s direction does not matter, and resamples it evenly at the median sampling rate. It removes the mean (mostly gravity) and applies a second-order Butterworth low-pass filter forwards and backwards, so the peaks do not shift in time. Each remaining peak above the threshold, and at least the shortest step after a higher one, is a step. This is the same method as SciPy’s filtfilt and find_peaks, and the test suite checks that both give identical steps.
- Cadence = 60 × (steps − 1) ÷ time from the first step to the last.
- Step time is the time between consecutive steps; stride time spans two steps (the same foot to the same foot). Their coefficient of variation (CV = SD ÷ mean) measures how regular the gait is (Hausdorff, 2005).
- The spectrum shows how strongly each frequency is present; its highest peak between 0.5 and 4 Hz is the step frequency, a second, independent estimate of cadence.
Worked example
The page opens with a made-up 20-second walk sampled at 50 readings a second. It finds 37 steps and a cadence of 111.2 steps/min. The mean step time is 539 ms with an SD of 15.5 ms, a CV of 2.87 %. The mean stride time is 1080 ms with a CV of 2.29 %. The spectrum peaks at 1.855 Hz, which is 111.3 steps/min, so the two methods agree.
Tips
- Walk on a straight, flat path and leave out the first and last few steps, where you speed up and slow down.
- A phone loose in a bag or swinging in a hand gives a messy signal. Keep it close to the body.
- Compare like with like: the same placement, path and footwear each time.
Frequently asked questions
Is my recording uploaded? No. Readings go from the sensor into this page and nowhere else, and nothing is stored after you close it.
Why does my phone record nothing? Some browsers and computers have no motion sensor, and some only give access on secure pages after you allow it. Use a sensor-logging app and open its CSV instead.
Is a CV of 3 % normal? Healthy adults walking steadily often have low step-time variability, but values depend on the sensor, the method and the person. This is a teaching tool, not a clinical test; ask a qualified professional about your gait.
Where the numbers come from
- Butterworth S (1930). On the theory of filter amplifiers. Wireless Engineer 7: 536–541 (low-pass filter); zero-phase filtering as in Winter DA, Biomechanics and Motor Control of Human Movement (Wiley).
- Zijlstra W, Hof AL (2003). Assessment of spatio-temporal gait parameters from trunk accelerations during human walking. Gait Posture 18: 1–10.
- Hausdorff JM (2005). Gait variability: methods, modeling and meaning. J NeuroEng Rehabil 2: 19 (step and stride time variability).
- Peak finding and filtering follow SciPy's documented find_peaks and filtfilt (BSD licence; method only, no code copied).
- Example walk: made-up, generated by the page.
Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.
Last updated 2026-11-09.