For nearly a century, researchers have tried to understand the swimming of aquatic animals in terms of a balance between the forward thrust from swimming movements and drag on the body. Prior approaches have failed to provide a separation of these two forces for undulatory swimmers such as lamprey and eels, where most parts of the body are simultaneously generating drag and thrust. We nonetheless show that this separation is possible, and delineate its fundamental basis in undulatory swimmers. Our approach unifies a vast diversity of undulatory aquatic animals (anguilliform, sub-carangiform, gymnotiform, bal-istiform, rajiform) and provides design principles for highly agile bioinspired underwater vehicles. This approach has practical utility within biology as well as engineering. It is a predictive tool for use in understanding the role of the mechanics of movement in the evolutionary emergence of morphological features relating to locomotion. For example, we demonstrate that the drag-thrust separation framework helps to predict the observed height of the ribbon fin of electric knifefish, a diverse group of neotropical fish which are an important model system in sensory neurobiology. We also show how drag-thrust separation leads to models that can predict the swimming velocity of an organism or a robotic vehicle.