We describe a breath-by-breath method to test for entrainment of breathing and walking cycles. Thirty-eight normal subjects walked comfortably on a treadmill while breathing through a pneumotachograph. We analyzed the time intervals between heel strikes and the onset of inspiration (or expiration) for evidence of phase locking between steps and breaths, using Monte Carlo simulation to model the probability that n consecutive inspirations (or expirations) would begin at a constant time interval +/- 0.10 s from heel strikes by chance. We developed empirical criteria for rhythm synchronization during series of four or more breaths, while maintaining an estimated specificity of 95%. The majority of subjects showed some evidence of entrainment (29 +/- 23% of breaths on average), which occurred intermittently, usually lasting less than 10 breaths at a time. The precision of phase locking during spontaneous entrainment was similar to that in 10 subjects who attempted to maintain deliberate entrainment. The results suggest that the walking cadence provides a persuasive, but not dominant, input to the central breathing pattern generator. The present method can detect entrainment even when it occurs sporadically or with varying coupling pattern.