Giraffes can add up quantities they cannot see — that, at least, is what a University of Barcelona team found in an experiment with four animals at the city’s zoo.
Two of the giraffes picked the correct answer more often than chance would predict in mental addition tests using carrot pieces — though the same study found they failed at subtraction.
An Experiment Designed to Rule Out Shortcuts
The research, published June 26, 2026, in the journal Scientific Reports, was led by Iker Loidi and Jordi Galbany of the University of Barcelona. Collaborators included specialists from the Research Institute for Farm Animal Biology in Germany, the University of Leipzig, the Max Planck Institute for Evolutionary Anthropology, and the Barcelona Zoo itself.
It is the first study to test for this kind of arithmetic ability in non-domesticated ungulates.
The experiment was designed to rule out any chance that the animals were solving the task by sight alone.
Researchers showed each giraffe two yellow containers holding different quantities of carrot pieces. The containers were then closed.
A third, green container held an additional set of carrots, which the researcher then dropped, piece by piece, into one of the two closed yellow containers.
The giraffe never saw the final total. It had to choose between the two containers based only on what it had seen and remembered.
To guard against the Clever Hans effect — the chance that an animal might pick up on unconscious cues from the researcher — the experimenter wore sunglasses, kept their eyes down, and held a neutral expression throughout each trial.
Good at Adding, Stumped by Subtracting
The four subjects — Nakuru, Nuru, Njano, and Yalinga — completed more than a thousand trials in total.
In the addition task, they chose the container with more food 68% of the time, a rate the researchers consider significantly above chance.
The result held even in trials where simple shortcuts were unavailable, such as choosing the container the researcher had touched last.
Only Nuru and Njano succeeded under those stricter conditions, pointing to a more complex form of mental calculation. Nakuru and Yalinga, by contrast, likely relied on simpler strategies.
Subtraction told a different story.
When pieces were removed from a container rather than added, accuracy dropped to 57%, a figure statistically indistinguishable from chance.
The giraffes also failed a third task in which food was first removed from one container and then added to the other — a sequence requiring them to track the movement of objects between two hidden quantities simultaneously.
According to the authors, this pattern mirrors what has been observed in other species, including humans: subtraction demands more working memory and activates different brain regions than addition does.
An Ability Rooted in Social and Foraging Life
The researchers link these abilities to the giraffe’s way of life.
The animals feed on acacia trees scattered across the savanna and live in groups that constantly split and reform depending on environmental conditions.
Both factors, the study suggests, may have helped drive numerical abilities useful for finding food and keeping track of other group members.
Compared with other species tested under different protocols, the giraffes did better on the addition task than dogs, horses, and zebrafish did, though they fell short of trained chimpanzees and pigeons.
The authors themselves caution against reading too much into these comparisons, noting that each study uses different methods, so the results can’t always be directly compared.
The finding builds on two earlier studies conducted with the same Barcelona Zoo giraffes: a 2021 study showing the species can distinguish between quantities, and a 2023 study examining their ability to make statistical inferences to maximize the probability of obtaining food.
Taken together, the three studies place the giraffe among a small group of non-primate species — alongside crows, pigeons, and certain fish — with evidence that they can process quantities in their heads.
The authors are careful to note that the sample was small, just four animals, and that future research involving more subjects and other ungulate species will be needed to determine whether this capacity for addition is a trait unique to giraffes or something more widespread among large herbivores than previously assumed.