While other species may not spend their time sweating over quadratic equations like we did at school, they can carry out some pretty impressive calculations.

"Numbers are fun." So insisted my seventh grade teacher, but my stubborn thirteen-year-old self refused to believe him. Numbers may be fun, but mathematics was hard. I struggled through maths classes when I was in school, painfully working my way through algebra, then geometry, trigonometry, and calculus. Though I eventually got over my contempt for mathematics, there was a time in which I thought that only humans could be so sadistic as to inflict the pain of mathematics on their young.

But, while other species may not spend their time fretting over the quadratic equation or the transitive property of equality, mathematical ability is widespread in the animal kingdom.

Take the domestic chicken (Gallus gallus), a bird that many think of as having more to do with barbecue sauce than with arithmetic. If a chicken sits in front of two small opaque screens, and one ball disappears behind the first screen, followed by four balls disappearing behind a second screen, the chicken walks towards the screen that hides four balls, since four balls are better than one ball. The feat is made more impressive when you consider that the chicken in question is only three days old. And it can do a lot more than add up.

If one ball disappears behind the first screen, and four balls disappear behind the second, just as before, but then two of the four balls behind the second screen are visibly moved over to the first screen, the chicken is now faced with two tasks. It must add two to one, and know that there are now three balls behind the first screen. It must also subtract two from four, and realise that there are only two balls left behind the second screen. The young chicken must overcome its initial impulse to approach the second screen, which initially hid four balls, and instead approach the first screen, now hiding three balls. If this sounds complicated for the three-day-old bird, think again. Infant chickens correctly approached the screen hiding more balls nearly 80% of the time.

Chimpanzees perform even better in their maths tests, succeeding in this sort of task 90% of the time. In one experiment, researchers placed a chimpanzee in front of two sets of bowls that contained chocolate pieces. Each set had two bowls, and to receive their treats, the chimps had to select the set that had the largest combined number of chocolate pieces, in other words adding together the number of pieces in each individual bowl. They succeeded even on trials where one of the bowls in the "incorrect" set contained more chocolates than either individual bowl in the "correct" set.

**Ant stilts**

In fact, decades of research have provided evidence for the numerical abilities of a number of species, including gorillas, rhesus, capuchin, and squirrel monkeys, lemurs, dolphins, elephants, birds, salamanders and fish. Recently, researchers from Oakland University in Michigan added black bears to the list of the numerically skilled. But the real maths wizards of the animal kingdom are the ants of the Tunisian desert (Cataglyphis fortis). They count both arithmetic and geometry as parts of their mathematical toolkit.

When a desert ant leaves its nest in search of food, it has an important task: find its way back home. In almost any other part of the world, the ant can use one of two tricks for finding its way home, visual landmarks or scent trails. The windswept saltpans of Tunisia make it impossible to leave a scent trail, though. And the relatively featureless landscape doesn't provide much in the way of visual landmarks, other than perhaps the odd rock or weed. So evolution endowed the desert ant with a secret weapon: geometry. Armed with its mathematical know-how, the desert ant is able to “path integrate”. This means, according to ant navigation researchers Martin Muller and Rudiger Wehner, that it "is able to continuously compute its present location from its past trajectory and, as a consequence, to return to the starting point by choosing the direct route rather than retracing its outbound trajectory."

How does this work? These desert ants calculate the distance walked by counting steps. Researchers discovered this by strapping stilts made of pig hairs onto the legs of the ants. The ant’s stilts made each individual step longer than it would have otherwise been, making them overestimate the distance home. The ants calculate the direction they walk by calculating the angle of their path relative to the position of the sun, using the same rules of trigonometry that were taught to me in the tenth grade. And what’s more, the ants constantly update their calculations to correct for the sun's march across the sky. All that in a nervous system comprised of as few as 250,000 neurons (compared to the approximately 85 billion neurons in the human).

The human capacity for language has allowed our species to transcend the core mathematical and numerical skills that are shared with other species both closely and distantly related. Language allows us to give names to numbers (such as one trillion) too large to comprehend without the aid of words. It allows us to articulate explicit mathematical rules. It allows us to torment children with the spectre of mathematical problems and geometric proofs. But underneath the facade provided by words and language, humans are but one of many species armed with a propensity for counting and calculation. Whether numbers are fun, as my seventh grade teacher claimed, or not, is subjective. One certainty, however, is that numbers are everywhere.

*If you would like to comment on this article or anything else you have seen on Future, head over to our Facebook page or message us on Twitter.*