How Does the Health App Track Steps on iPhone?

The iPhone Health app counts your steps using a built-in accelerometer that measures your phone’s movement in three dimensions, combined with a dedicated motion-processing chip that runs continuously in the background. Every time you walk, the phone detects the repetitive bounce-and-sway pattern your body produces and translates those signals into a step count. The system is more sophisticated than a simple shake detector, though, relying on signal processing and machine learning to separate genuine steps from the jostling of daily life.

The Hardware That Detects Your Movement

Every iPhone since the 5s has contained a small chip dedicated to processing motion data alongside the main processor. Apple originally called this the M7 motion coprocessor; newer iPhones fold the same functionality into the main system-on-chip. This coprocessor draws very little power, which is how it can track your movement all day without draining the battery the way a fitness app running on the main processor would.

The coprocessor pulls data from several onboard sensors. The accelerometer is the workhorse: it measures acceleration along three axes, picking up the rhythmic rise-and-fall pattern your body creates with each step. The gyroscope tracks rotational movement, helping the system understand how the phone is oriented in space. A barometric altimeter measures air-pressure changes, which the phone uses to detect elevation gain rather than steps. Together, these sensors feed a continuous stream of raw data to the motion coprocessor, which processes it before the Health app ever displays a number.

One early validation study of the M7 coprocessor found that it accurately recorded step counts at customary and fast walking speeds, with errors of roughly 8% and 4% respectively, but struggled at slow walking speeds, where the mean error climbed to about 21%.1Journal of Sports Sciences. Validity of the iPhone M7 motion co-processor as a pedometer for able-bodied ambulation That early finding shaped much of the accuracy conversation around iPhones as pedometers, and the pattern still holds in broad strokes: faster, more regular steps are easier for the phone to detect than slow, shuffling ones.

How Raw Motion Data Becomes a Step Count

The raw accelerometer signal is noisy. It captures everything: the bounce of walking, the sway of your arm, a bump as you set your phone on a table, even vibrations from a car engine. Turning that mess into a reliable step count requires several processing stages.

The first challenge is device orientation. Your phone might be upright in a front pocket, sideways in a bag, or face-down on a desk. Because the accelerometer measures along three fixed axes relative to the phone itself, the same walking motion produces different-looking signals depending on how the phone is positioned. A common solution is to combine the three directional signals into a single orientation-independent measure of overall acceleration.2PubMed Central. Open-Source, Step-Counting Algorithm for Smartphone Data Collected in Clinical and Nonclinical Settings: Algorithm Development and Validation Study This way, a step looks roughly the same to the algorithm whether the phone is in your jacket pocket or your hand.

After orientation correction, the system filters out noise. Gravity pulls on the accelerometer constantly, so a digital filter strips away that steady gravitational component and isolates the acceleration caused by your actual body movement. Researchers have documented that this separation is typically done with a low-frequency filter that removes the slow, constant pull of gravity while preserving the quicker pulses of walking.3PubMed Central. Open-Source, Step-Counting Algorithm for Smartphone Data Collected in Clinical and Nonclinical Settings: Algorithm Development and Validation Study – Section: Data Preprocessing What remains is a cleaner signal where each peak roughly corresponds to one foot strike.

The final stage is actually counting those peaks. Apple does not publish the exact details of its proprietary algorithm, but the general approach in smartphone step counting involves looking for repeating patterns at frequencies consistent with human walking. One open-source algorithm designed for smartphone accelerometer data splits the signal into short time windows and estimates how many steps occur per second within each window, then sums those counts over the full walking period.2PubMed Central. Open-Source, Step-Counting Algorithm for Smartphone Data Collected in Clinical and Nonclinical Settings: Algorithm Development and Validation Study More advanced ensemble approaches, which use machine learning to first identify where the phone is being carried and then apply a position-specific counting model, have achieved accuracy above 98% in controlled testing.4PubMed Central. Carrying Position-Independent Ensemble Machine Learning Step-Counting Algorithm for Smartphones

Apple’s system accesses all of this through a software framework called CoreMotion, which provides apps with pre-processed step counts, distance estimates, and other motion data from the coprocessor. Clinical research apps have used this same framework to administer walking tests and record step counts, confirming that CoreMotion’s pedometer output shows good agreement with standalone pedometers.5Anesthesia & Analgesia. Development and Pilot Study of an iOS Smartphone Application for Perioperative Functional Capacity Assessment

How Accurate Is the Step Count?

Under normal walking conditions, the iPhone does well. A study testing an iPhone SE found that the mean absolute percentage error was less than 3% for treadmill walking at speeds of about 3.2 km/h and above, and for free walking in everyday settings. That same study also found that the phone’s position on the body did not significantly affect accuracy, so whether the phone was in a front pocket, back pocket, or jacket didn’t meaningfully change the count.6Scandinavian Journal of Medicine & Science in Sports. Validity of activity trackers, smartphones, and phone applications to measure steps in various walking conditions

A forensic study that examined step accuracy across multiple iPhone models under a range of experimental conditions similarly found a close relationship between manually counted steps and the steps recorded by the phones, with accuracy figures consistent with other published validations.7Digital Investigation. The iPhone Health App from a forensic perspective: can steps and distances registered during walking and running be used as digital evidence? The fact that forensic scientists were evaluating whether iPhone step data could serve as courtroom evidence tells you something about how seriously the data is taken.

The bigger issue is not the algorithm’s ability to count steps when you are walking; it is whether the phone is on your body at all. A cross-sectional study of about 33 days of free-living data found that the iPhone recorded an average of roughly 9,250 steps per day, which was about 12% lower than a hip-worn pedometer worn at the same time. The gap was almost entirely explained by how often participants carried their phones. People who reported seldom carrying their iPhones missed an average of about 3,000 steps per day compared to the pedometer, while those who almost always carried theirs only missed about 930.8PubMed Central. How Well iPhones Measure Steps in Free-Living Conditions: Cross-Sectional Validation Study In other words, the phone can’t count what it can’t feel. If you leave your iPhone on the kitchen counter while you walk around the house, those steps vanish.

Speed matters as well. As the M7 validation study showed, accuracy drops sharply at slow walking speeds. This has real implications for older adults, people recovering from surgery, or anyone with a gait impairment that makes them walk below about 1 m/s.1Journal of Sports Sciences. Validity of the iPhone M7 motion co-processor as a pedometer for able-bodied ambulation At those slower speeds, the rhythmic pattern of walking becomes less distinct, and the algorithm has a harder time distinguishing a genuine step from other low-level movements.

How the Health App Tracks Floors Climbed

The “Flights Climbed” metric in the Health app uses a completely different sensor: the barometric altimeter. Instead of detecting motion, the altimeter measures changes in air pressure that correspond to changes in elevation. When you climb a flight of stairs, you move to a higher altitude where air pressure is slightly lower, and the phone registers that shift.

A detailed experimental study of this feature found several quirky behaviors worth knowing about. The Health app registers roughly one floor for every three meters of height gain. Across the experiments, the recorded number of floors matched the expected count based on height difference in about 70 to 80 percent of cases. But the system almost exclusively records floors going up, not down.9Forensic Science International: Digital Investigation. Have you been upstairs? On the accuracy of registrations of ascended and descended floors in iPhones If you walk up four flights and then back down, you will likely see four floors climbed and zero descended.

Elevators and escalators add another wrinkle. The study found that no floors are registered when you ride an elevator up or down, presumably because the phone detects the absence of walking. On escalators, floors were only registered when the person actively walked while riding the escalator, not when they stood still.9Forensic Science International: Digital Investigation. Have you been upstairs? On the accuracy of registrations of ascended and descended floors in iPhones The system seems to require both the elevation change from the barometer and the walking motion from the accelerometer to count a floor, which is a sensible design choice even if it occasionally feels inconsistent.

Gait Metrics Beyond Step Counting

Starting with iOS 14, the Health app began offering more advanced walking metrics: walking speed, step length, double support time (the percentage of your stride where both feet are on the ground), and walking asymmetry. These go beyond simple step counting and draw on a biomechanical model of walking that uses the user’s height, entered in the Health app, to estimate leg length and calibrate the calculations.10PubMed Central. Validity and reliability of the Apple Health app on iPhone for measuring gait parameters in children, adults, and seniors If you have never entered your height in the Health app, these estimates become less reliable.

A validation study tested these metrics in children, adults, and seniors and found that gait speed and step length were valid and reliable for adults and seniors, making the iPhone a reasonable tool for tracking these parameters over time. For children, gait speed was still measured validly but less reliably, and step length showed limited accuracy. The researchers also noted that double support time measurements, while repeatable, consistently showed only low to moderate agreement with laboratory-grade equipment.10PubMed Central. Validity and reliability of the Apple Health app on iPhone for measuring gait parameters in children, adults, and seniors

One practical finding from that same study: how tightly the phone is coupled to your body matters a lot for these advanced metrics. Carrying the iPhone in a snug front pants pocket, close to your center of mass, produced the most reliable gait parameter estimates. A phone bouncing around in a loose bag or swinging in your hand introduces extra movement that the algorithm struggles to separate from your actual walking pattern.10PubMed Central. Validity and reliability of the Apple Health app on iPhone for measuring gait parameters in children, adults, and seniors

Clinical researchers have also built on these capabilities. One app designed for perioperative fitness assessment used Apple’s CoreMotion pedometer data and found that the variables most important for estimating walking distance were steps walked, stride length, age, and body mass index.5Anesthesia & Analgesia. Development and Pilot Study of an iOS Smartphone Application for Perioperative Functional Capacity Assessment This suggests that the raw step count is just a starting point: the phone combines it with what it knows about you to produce the distance and speed estimates you see in the Health app.

iPhone Versus Apple Watch

If you own an Apple Watch, you may have noticed that the step count in the Health app sometimes differs from what the phone alone would report. The Apple Watch has its own accelerometer and gyroscope strapped to your wrist, and when paired, the Health app merges data from both devices. In general, the watch tends to catch steps the phone misses, particularly when you leave your phone at your desk but keep walking around with the watch on. The Health app uses a priority system that avoids double-counting: if both devices detect walking during the same time window, it picks the source it considers more reliable for that interval rather than adding them together.

The watch is also better positioned for wrist-specific movements, like pushing a stroller or a shopping cart, where your wrist moves rhythmically but the phone in your pocket barely registers the motion. On the other hand, the wrist accelerometer can overcount during activities that involve a lot of arm movement without actual steps, like vigorous gesturing or hand-washing. Neither device is perfect, but having both generally gives a more complete picture than either one alone.

What Your Step Count Means for Health

Knowing how your steps are counted matters more when you consider what the numbers represent for your well-being. A study tracking daily step counts and cardiovascular outcomes found that each 2,000-step daily increment, up to about 10,000 steps, was associated with a roughly 10% lower rate of cardiovascular events. Increasing your daily count by 2,000 steps was also linked to an 8% yearly reduction in cardiovascular event rate.11PubMed Central. Daily Step Counts for Measuring Physical Activity Exposure and Its Relation to Health

More recent research comparing step counts against time-based physical activity measures found that both were inversely associated with death from all causes and cardiovascular disease. People in the highest quarter of daily step counts had a substantially lower risk of all-cause mortality compared to those in the lowest quarter.12JAMA Internal Medicine. Time- vs Step-Based Physical Activity Metrics for Health The practical upshot is that step counting, even with the iPhone’s known tendency to undercount by a modest amount, captures a meaningful signal about your physical activity level.

That 12% undercount in free-living conditions is worth keeping in perspective here. If your iPhone says you walked 8,000 steps, the real number might be closer to 9,000. For health purposes, the trend over weeks and months matters far more than any single day’s precision. If your average is climbing, you are moving more, even if the absolute number is slightly low. The Health app’s long-term graphs are arguably more valuable than the daily total for exactly this reason.

Practical Ways to Get a More Accurate Count

You cannot change the algorithm, but you can change how reliably your phone captures your movement. Carrying the phone in a snug pocket rather than a loose bag keeps it closer to your center of mass and reduces noise from independent bouncing. If you care about the advanced gait metrics like walking speed and step length, a tight front pants pocket appears to be the sweet spot based on the validation research.10PubMed Central. Validity and reliability of the Apple Health app on iPhone for measuring gait parameters in children, adults, and seniors

Entering your correct height and weight in the Health app helps the biomechanical model produce better estimates for distance, step length, and calories. These fields are easy to overlook during initial setup, but they feed directly into the calculations. Pairing an Apple Watch fills in the gaps for times when you are not carrying your phone. And if you walk slowly due to age or a health condition, be aware that the phone may undercount meaningfully at speeds below about 1 m/s, which is roughly the pace of a casual stroll for someone with limited mobility.1Journal of Sports Sciences. Validity of the iPhone M7 motion co-processor as a pedometer for able-bodied ambulation In that case, a dedicated hip-worn pedometer or ankle-worn activity tracker may give a more complete picture.

One common misconception is that the Health app uses GPS to count steps. GPS is not involved in step tracking at all. It is used separately for mapping outdoor workouts and estimating route distances, but the step count itself is entirely accelerometer-driven. You can confirm this by putting your phone in airplane mode and walking around your house: the step count will still go up. This also means the step counter works indoors, on treadmills, and in places with no cellular or Wi-Fi signal.