Sometimes it's not the actual job that makes work difficult. You could love your boss, enjoy your coworkers, and have a satisfying set of duties and responsibilities. But that might not matter if your experience getting to the job makes you miserable.

The average American spends 26 minutes each day commuting, but that number can be much higher for some people. Big-city dwellers generally have it the worst, but even people living in rural areas can face difficult commutes, as where the jobs are can shift.

It's a problem that's bad enough that 23% of workers have left a job because of the commute, according to a new survey from global staffing firm Robert Half. People living in Chicago, Miami, New York, and San Francisco were the most likely to have left for that reason, according to the study of 2,800 working American adults.

Cars are lined up in bumper-to-bumper traffic.

A bad commute can make a good work situation intolerable. Image source: Getty Images.

Companies need to act

Nearly 4 in 10 workers surveyed said their commute has improved over the past five years, while 22% said it has gotten worse. A clear majority (60%) believe their company hasn't taken steps to reduce the commuting burden on employees.

"Commutes can have a major impact on morale and, ultimately, an employee's decision to stay with or leave a job," said Robert Half Executive Director Paul McDonald in a press release. "In today's candidate-driven market, skilled workers can have multiple offers on the table. Professionals may not need to put up with a lengthy or stressful trip to the office if there are better options available."

The improved labor market for workers in many fields gives employees leverage they traditionally have not enjoyed. That gives some people the ability to negotiate things like getting to work from home some days or working nontraditional schedules that allow for commuting at times when roads are less busy.

Companies can also get creative by doing things like organizing carpools, providing transportation, and adopting digital tools that make telecommuting possible. In addition, it's also possible to try more radical solutions like moving to a four-day workweek or putting alternative office locations closer to where its workers live.

Speak up

You don't want to quit a job you like because of a lousy commute without considering all the options. Talk to your boss and/or human resources and figure out what your choices are. If you know other employees are having the same issue, consider bringing it up jointly.

Working from home -- at least some of the time -- has become more viable due to productivity products like Slack and the ease of videoconferencing. Be open-minded and willing to consider whatever options your employer suggests. For example, shifting your hours from 9 to 5 to 8 to 4 or even 11 to 7 can make a big difference in your commute (if you can make those hours work).

Be flexible, but know your options. If your company won't make changes that ratchet down your commuting stress, be open to considering companies that are closer or will be more willing to work with you.