Gait analysis has many potential applications in understanding the activity profiles of individuals in their daily lives, particularly when studying the progression of recovery following injury, or motor deterioration in pathological conditions. One of the many challenges of conducting such analyses in the home environment is the correct and automatic identification of bouts of gait activity. To address this, a novel method for determining bouts of gait from accelerometer data recorded from the shank is presented. This method is fully automated and includes an adaptive thresholding approach which avoids the necessity for identifying subject-specific thresholds. The algorithm was tested on data recorded from 15 healthy subjects during self-selected slow, normal and fast walking speeds ranging from 0.48 ± 0.19 to 1.38 ± 0.33m/s and a single subject with PD walking at their normal walking speed (1.41 ± 0.08m/s) using accelerometers on the shanks. Intra-Class Correlation (ICC) confirmed high levels of agreement between bout onset/offset times and durations estimated using the algorithm, experimentally recorded stopwatch times and manual annotation for the healthy subjects (r=0.975, p < 0.001; r=0.984, p<0.001) and moderate agreement for the PD subject (r=0.663, p<0.001). Mean absolute errors between accelerometer-derived and manually-annotated times were calculated, and ranged from 0.91 ± 0.05 s to 1.17 ± 2.26 s for bout onset detection, 0.80 ± 0.23 s to 2.41 ± 3.77 s for offset detection and 1.27 ± 0.13 s to 3.67 ± 4.59 s for bout durations.