The prevalence and risks for abnormal gait in finishing pigs (Sus scrofa), gilts and pregnant sows from a representative cross-section of indoor and outdoor herds in the United Kingdom were investigated. The prevalence of abnormal gait in finishing pigs, maiden gilts, pregnant gilts and pregnant sows from 88 herds was 19.7, 11.8, 14.4 and 16.9%, respectively. In a multivariable analysis of 98 herds, there was an increased risk of abnormal gait in pregnant sows housed on slatted floors compared with pregnant sows housed on solid concrete floors with straw bedding or sows housed outdoors on soil. The lowest prevalence of abnormal gait in finishing pigs occurred in pigs housed outdoors (3.4 vs 19.7% in indoor-housed finishing pigs) however, the difference was not significant because only three farms in the study housed finishing pigs outdoors. In indoor-housed finishing pigs, there was an increased risk of abnormal gait in pigs housed on solid concrete floors with sparse bedding, partly-slatted floors or fully-slatted floors compared with those housed on solid concrete floors with deep bedding in all areas. However, there were no significant associations between floor type and abnormal gait in gilts. There was an increased risk of abnormal gait associated with increasing callus, bursitis and capped hock score on the limbs of finishing pigs. This might have occurred because limb lesions cause discomfort or because lame pigs spend more time lying and this increases the risk of limb lesions developing.