To evaluate the swimming performances of aquatic animals, an important dimensionless quantity is the Strouhal number, St = fA/U, with f the tail-beat frequency, A the peak-to-peak tail amplitude, and U the swimming velocity. Experiments with flapping foils have exhibited maximum propulsive efficiency in the interval 0.25 < St < 0.35 and it has been argued that animals likely evolved to swim in the same narrow interval. Using Lighthills elongated-body theory to address undulatory propulsion, it is demonstrated here that the optimal Strouhal number increases from 0.15 to 0.8 for animals spanning from the largest cetaceans to the smallest tadpoles. To assess the validity of this model, the swimming kinematics of 53 different species of aquatic animals have been compiled from the literature and it shows that their Strouhal numbers are consistently near the predicted optimum.