Adult animals display robust locomotion, yet the timeline and mechanisms of how juvenile animals acquire coordinated movements and how these movements evolve during development are not well understood. Recent advances in quantitative behavioral analyses have paved the way for investigating complex natural behaviors like locomotion. In this study, we tracked the swimming and crawling behaviors of the nematodeCaenorhabditis elegansfrom postembryonic development through to adulthood. Our principal component analyses revealed that adultC. elegansswimming is low dimensional, suggesting that a small number of distinct postures, or eigenworms, account for most of the variance in the body shapes that constitute swimming behavior. Additionally, we found that crawling behavior in adultC. elegansis similarly low dimensional, corroborating previous studies. However, our analysis revealed that swimming and crawling are distinct gaits in adult animals, clearly distinguishable within the eigenworm space. Remarkably, young L1 larvae are capable of producing the postural shapes for swimming and crawling seen in adults, despite frequent instances of uncoordinated body movements. In contrast, late L1 larvae exhibit robust coordination of locomotion, while many neurons crucial for adult locomotion are still under development. In conclusion, this study establishes a comprehensive quantitative behavioral framework for understanding the neural basis of locomotor development, including distinct gaits such as swimming and crawling inC. elegans.