Commuting to work is rarely a fun exercise, but it’s easier in some places than others. IBM’s annual Commuter Pain survey of 8,042 commuters in 20 cities spells it out: Roadway traffic has largely improved over the past three years, but people around the world say that road traffic is negatively affecting their stress levels now more than ever. As it stands, commuters in clogged cities like Moscow and Mexico City sometimes get stuck in traffic for hours on end. But there are solutions.

According to IBM, the cities with the most “commuter pain”–hours spent in traffic, high price of gas, high stress, etc.–include Shenzen, Beijing, and Nairobi. The least painful commutes take place in Chicago, London, and Montreal. Overall, there has been a decrease in traffic since IBM first conducted its survey four years ago, largely because of high fuel prices and weak economies. So how can the more traffic-laden cities cut down on headaches?

Perhaps the biggest solution is better public transportation. IBM’s survey reveals that 41% of respondents believe that improved public transportation would reduce traffic congestion. And out of the 35% of people globally who changed the way they get to work or school last year, 45% switched to public transit. In Nairobi, a whopping 70% of commuters take more public transit this year than last year.

Of course, general transportation infrastructure investments also help. Beijing, for example, is investing over $12 billion dollars in infrastructure improvements–and residents of the city have reported a significant improvement in traffic conditions over the past three years.

IBM, for its part, believes it can help many of the traffic-heavy cities with its Intelligent Transportation solutions. “We don’t make products aimed at individual citizens, but we help clients understand where the pain is and what they should be focusing on,” explains Vinodh Swaminathan, IBM’s director of intelligent transportation systems. And if IBM can help cities cut down on commuter pain, maybe the company can improve our health, too.