Caenorhabditis elegans locomotion is a stereotyped behavior that is ideal for genetic analysis. We integrated video microscopy, image analysis algorithms, and fluid mechanics principles to describe the C. elegans swim gait. Quantification of body shapes and external hydrodynamics and model-based estimates of biomechanics reveal that mutants affecting similar biological processes exhibit related patterns of biomechanical differences. Therefore, biomechanical profiling could be useful for predicting the function of previously unstudied motility genes.