When the COVID-19 pandemic made millions of Americans remote workers, it also abruptly ended many of the commutes that bookend the workday. As some of those workers return to the office, conversations around the drawbacks of commutes have become more intense. For a while, those workers enjoyed more time in the morning and evening that wasn’t spent simply traveling to and from work—an unpaid portion of the day that ate up time and energy. And it’s not a small amount of time, either: Pre-pandemic, the average commute in the U.S. was a hair over 27 minutes one way, according to Census Bureau data. It was a record high. Cumulatively, 27 minutes each way translates to 54 minutes a day, or four-and-a-half hours per week. That’s 18 hours a month and 216 hours a year spent commuting.

Those who commute know it’s not particularly idyllic. While a very small portion of workers live in the ideal scenario—a short, walkable distance from the office, along a sidewalk that is presumably regularly shoveled in the winter and where the temperature doesn’t result in a sweaty arrival in the summer—most endure clogged roads, unpredictable public transit, and the frustrations that come with both. Of course, not all commutes are as bad as others, and some cities have better public transit and traffic flow.

Stacker compiled a list of the cities with the worst commutes in Massachusetts using data from the Census Bureau. Cities with at least 5,000 working adults are ranked by the longest average commute time as of the 2021 5-year estimate.

You may also like: Cities with the fastest-growing home prices in Massachusetts

Stacker

#25. Attleboro

– Average time spent commuting to work: 30.5 minutes
– National rank: #346

Stacker

#24. Beverly

– Average time spent commuting to work: 30.6 minutes
– National rank: #337

Stacker

#23. Framingham

– Average time spent commuting to work: 30.8 minutes
– National rank: #318

Stacker

#22. Marlborough

– Average time spent commuting to work: 30.8 minutes
– National rank: #317

Stacker

#21. Salem

– Average time spent commuting to work: 31.1 minutes
– National rank: #297

You may also like: Most diverse counties in Massachusetts

Stacker

#20. Amesbury Town

– Average time spent commuting to work: 31.2 minutes
– National rank: #293

Stacker

#19. Bridgewater Town

– Average time spent commuting to work: 31.2 minutes
– National rank: #292

Stacker

#18. Palmer Town

– Average time spent commuting to work: 31.7 minutes
– National rank: #257

Stacker

#17. Lynn

– Average time spent commuting to work: 31.8 minutes
– National rank: #251

Stacker

#16. Somerville

– Average time spent commuting to work: 32 minutes
– National rank: #239

You may also like: Most popular baby names for girls of the last decade in Massachusetts

Stacker

#15. Winthrop Town

– Average time spent commuting to work: 32 minutes
– National rank: #236

Stacker

#14. Gardner

– Average time spent commuting to work: 32.3 minutes
– National rank: #208

Stacker

#13. North Attleborough Town

– Average time spent commuting to work: 32.7 minutes
– National rank: #188

Stacker

#12. Springfield

– Average time spent commuting to work: 32.8 minutes
– National rank: #186

Stacker

#11. Weymouth Town

– Average time spent commuting to work: 32.8 minutes
– National rank: #179

You may also like: Most popular boy names in the 80s in Massachusetts

Stacker

#10. Revere

– Average time spent commuting to work: 33.3 minutes
– National rank: #160

Stacker

#9. Waltham

– Average time spent commuting to work: 33.4 minutes
– National rank: #159

Stacker

#8. Braintree Town

– Average time spent commuting to work: 33.4 minutes
– National rank: #157

Stacker

#7. Quincy

– Average time spent commuting to work: 34.6 minutes
– National rank: #110

Stacker

#6. Newburyport

– Average time spent commuting to work: 34.6 minutes
– National rank: #107

You may also like: Highest rated IPAs in Massachusetts

Stacker

#5. Chelsea

– Average time spent commuting to work: 35.1 minutes
– National rank: #91

Stacker

#4. Franklin Town

– Average time spent commuting to work: 35.3 minutes
– National rank: #88

Stacker

#3. Melrose

– Average time spent commuting to work: 36.2 minutes
– National rank: #75

Stacker

#2. Malden

– Average time spent commuting to work: 36.7 minutes
– National rank: #59

Stacker

#1. Everett

– Average time spent commuting to work: 37.2 minutes
– National rank: #51

You may also like: Massachusetts is the #6 state with the most COVID-19 worker safety violations