If you’re stressed when you start the day at work, part of the problem might be how you’re getting to the office. Commuters who bike or walk are 40% less likely to be tense in the hour after arriving than those who drive or take public transit. And if you’re tense the first hour, the rest of the day is probably not going to get better.

“People normally think of stress as something that happens at work, and certainly it does, but commutes are interesting because it’s a place where you’re kind of in charge of your environment–you’re usually on your own, in control, and you can set the tone of your day,” says Neema Moraveji, co-founder of Spire, a wearable device that measures stress, and head of Stanford University’s Calming Technology Lab. “We wanted to see what kind of state people put themselves in.”

The company’s data, collected through 1,000 commuters wearing the Spire gadget, backs up earlier research. A massive, 18-year study published in the U.K. last year found that commuters who walked and biked were happier, slept better, and were better able to deal with their problems than people who drove.

Bike East Bay Flickr

An active commute seems to be equally helpful when people are headed home; the Spire data showed that people are even more stressed out in the early evening hours. It’s worse for men, who are 50% more tense than women after getting home from work.

If you’re stuck taking the subway or bus–or driving–Moraveji makes a pitch for his device, which can vibrate to remind you to take a deep breath. “Your breathing patterns mirror your state of mind,” he says. “So when you’re stressed, it changes the way you breathe. But when you’re tracking breathing, you can also change your breathing. It’s a two-way process.”

Even behind the wheel, it’s possible to focus on your breath and still safely navigate the road. “One of the things we showed is that people can do consciously intense tasks, like programming or math, and sustain that cognitive performance and still regulate their breathing,” Moraveji says. “And it doesn’t degrade their performance, meaning it’s not distracting. … You can do this while driving.”

Of course, for anyone who has the option, there are other reasons to choose biking or walking to work over driving–like the fact that bike commuting might actually be a better way to lose weight than going to the gym.