You might look ridiculous pacing around the restaurant trying to figure out how much each of your friends owes, but new psychology research suggests you’ll get the last laugh.

Thanks to a mechanism in the human brain that likes to pair related, abstract concepts, scientists have found a so-called “congruency effect” in studying how we think. Similar to the infamous Tetris effect, in which extended gameplay can make other parts of your life seem to be nothing but L-shaped blocks and elusive straight pieces, the research shows the brain has a preference for addition and subtraction based on walking left or right.

Over the last decade, psychologists discovered the interesting fact that doing addition was much easier in an elevator that was going up, and subtraction in an elevator going down. They also found we tend to conceptualize larger numbers better when we’re moving to the right and smaller numbers when moving to the left. In the latest study, a team from the University of Bologna and the Italian National Research Council tested whether walking direction affected people’s ability to add or subtract.

To do this, they recruited 52 people to perform a task. Each participant received a number and was then told they’d be adding to it or subtracting from it later on. The investigators then told them to begin walking and to turn either right or left and begin doing the arithmetic.

After being told a number and which operation to perform, subjects were instructed to walk either right or left. Those who walked right added better and those who walked left subtracted better. Anelli, et al.

The results showed people were far better at adding numbers when they turned right and subtracting numbers when they turned left. “Our finding complements and extends previous results revealing that the direction of body motions can influence not only number magnitude in a number generation task,” the researchers wrote, “but also the more complex process of calculations that leads to a numerical magnitude.”

In other words, moving in accordance with the math problem can help us sort out the problem better than sitting still. And it doesn’t seem to be just walking that gets the job done. Other research has shown the experience of passive movement helps all the same, which means if you need to calculate your expenses for the month, consider driving around the neighborhood and only making right turns. Or if you’re in the middle of a run and can’t remember how far you are from finishing, head left to subtract from your desired distance.

“The present findings confirm the existence of a connection among numbers, space, and motor processes, by showing the emergence of a congruency effect when subtractions and additions were calculated while moving also along a horizontal axis,” the team concluded.

The study isn’t the first to uphold the benefits of walking. A wealth of data suggests the simple act of putting one foot in front of the other can eliminate depressive symptoms, improve mood, lengthen your life, and reduce stress. Which is good news, if what’s stressing you out is math.

Source: Anelli F, Lugli L, Baroni G, Borghi A, Nicoletti R. Walking boosts your performance in making additions and subtractions. Frontiers in Psychology. 2014.