Retaining body heat in the chilly ocean is the main reason why whales are so big, say scientists.
But there is a limit to how large marine mammals can grow, imposed by the need for energy, research shows.
Aquatic mammal size is restricted by the challenge of finding enough food to survive, according to the findings.
Canine ancestors of seals grew faster than the hippo-like forbears of whales and dolphins.
Generally, bigger seemed to be better for aquatic life, but only up to a point.
Professor Jonathan Payne, from Stanford University in the US, said: “Many people have viewed going into the water as more freeing for mammals, but what we’re seeing is that it’s actually more constraining.
Larger size helped aquatic mammals retain heat in water colder than their own body temperature, said the team writing in the journal Proceedings of the National Academy of Sciences.
“When you’re very small, you lose heat back into the water so fast, there’s no way to eat enough food to keep up,” said Prof Payne.
However the energy needs of aquatic mammals increased with size at a faster rate than their ability to gather food, the researchers found.
As a result, the range of viable sizes for marine mammals was smaller than it was for their counterparts on land.
Baleen whales, which filter swarms of tiny crustaceans into their mouths, had a more energy-efficient feeding method than toothed whales, allowing them to grow huge. The family of baleen whales includes the 98ft long blue whale, the largest animal to have ever existed.
Lead author Will Gearty, a Stanford graduate student, said: “The sperm whale seems to be the largest you can get without a new adaptation. The only way to get as big as a baleen whale is to completely change how you’re eating.”