The commute to and from work might be the best part of the day, or the worst. And a lot of that has to do with where you live.

Of course, many factors can determine whether you arrive at the office stress-free or with frayed nerves: the mode of travel, distance, the route you take, the time of day you travel, road construction and weather.

Add it all up and the best place for commuters in Minnesota is Morris, where the overwhelming majority of those going to work spend 10 minutes or less on the roads, according UnitedStatesZipCodes.org which used data from the U.S. Census Bureau to determine the cities with the best and worst commutes in all 50 states.

The farming community in western Minnesota came in at No. 1 on the list of shortest one-way commute times followed by International Falls, where the average commute time is 11.7 minutes. Coming in third was Marshall at 12.4 minutes, with Wheaton at 12.8 minutes and Duluth at 13.3 minutes rounding out the top five.

With their small populations, New Ulm, Hancock, Thief River Falls, Willmar and Montevideo also cracked the Top 10 of shortest commutes, all with trip times under 14 minutes.

That's well below the state average of 23.8 minutes for those who drive to work, and well under the national average of 26.4 minutes workers spent on the roads in 2017, according to the census bureau's American Community Survey.

But that "varies greatly by location," the authors of UnitedStatesZipCodes.org study said.

That is evident, especially for those who live in the metro's northern exurbs. Residents of Isanti and Stanchfield tied for the longest commutes at 37.4 minutes each way. Close behind were Zimmerman at 37 minutes, Oglivie at 36.6 minutes and Cedar in far northern Anoka County at 35.4 minutes. The next five with the worst commutes were north and west of the metro, including Big Lake, Montrose, Marine on St. Croix, Wyoming and St. Michael.

And except for Ogilvie and Wyoming, drive times increased by a few seconds or minutes for all the cities on the Top 10 list for worst commutes, according to the study.

The additional time may not seem like much, but it does matter.

Over the past decade, the average commute time in America has risen 4.5%, increasing from 25.2 minutes in 2009. For the average employee working 50 weeks a year, that translates into an extra 600 minutes a year getting to and from work.

Each extra minute of commuting time reduces job and leisure time satisfaction, a 2017 study by the University of West of England, Bristol found. On top of that, global staffing firm Robert Half found that lengthy commute times are driving people to leave their jobs. Nearly one in four American workers have quit a job due to their commute. In Minneapolis, 1 in 5 have left their jobs because of a bad commute.

"Commutes can have a major impact on morale and, ultimately, an employee's decision to stay with or leave a job," said Paul McDonald, senior executive director for Robert Half.

Transit riders can expect to spend an average of 39 minutes getting to work, according to a study from Geotab analyzing commuter patterns in the 20 largest U.S. cities. The research found that Minneapolis was the third-most transit friendly city, with 31% of commuters using transit able to get to their jobs in 30 minutes or less. The research found that 94% of transit users could get to work in an hour or less.

Tim Harlow • 612-673-7768