Brain size vs. body weight of various animals and humans visualized
The graph created by Reddit user Heresacorrection shows brain size compared to the bodyweight of different animals.
The color of every point represents the distance from the best-fit line (dotted in grey). It serves as a proxy for the encephalization quotient, which ranks relative brain size. You can see that humans have an enormous brain for their size out of all mammals.
The data was taken from the article. Tartarelli, G., Bisconti, M. Trajectories and Constraints in Brain Evolution in Primates and Cetaceans. Human Evolution
Brain size typically rises with animal body size.
In animals, it is believed that the larger the brain size, the more brain weight will be possible for more complicated cognitive tasks. Nonetheless, large animals require more neurons to serve their bodies and manage muscles. Therefore, relative rather than absolute brain size makes for a ranking of animals that better matches the observed complexness of behavior.
There are a lot of other evolutionary pressures that are going to influence brain size and body mass.
The correlation between brain size vs. body mass and complexness of behavior is not ideal as other factors also affect intelligence, like the evolution of the cerebral cortex and levels of brain folding, which extend the surface of the cortex, which is positively associated with intelligence. Humans have the most considerable cerebral cortex of all mammals, related to the size of their brains.