Boston had the seventh-longest commute in the country, among the 50 largest cities.

In 2015, it took 31.4 minutes, on average, for Boston workers to reach work, up from an average of 30.8 minutes in 2014, and 28.4 minutes in 2010.

The average commute for Boston residents is more than 31 minutes, one of the highest figures in the country, according to new Census data.

New York City had the longest at more than 40 minutes. Next were Chicago, 35 minutes; San Francisco, 33.9; Philadelphia, 33.1; Oakland, 32.3; and Baltimore, 31.8.

Boston's commute times were longer than Los Angeles (31 minutes), Washington D.C., (just under 30 minutes) and Miami, 29.6.


For the entire Boston metro area, the average commute is almost identical, and ranks as the sixth longest in the country, according to estimates from the Census Bureau's American Community Survey.

Among metro areas, New Yorkers again had the longest commutes, at 36.3 minutes.

Next were the Washington D.C. metro area, 34.4 minutes; San Francisco metro area, 33.2; Riverside, Calif. metro area, 31.9; and Chicago, 31.8.

Nationwide, the average commute time in 2015 was 26.4 minutes, up from 26 minutes in 2014 and 25.3 minutes in 2010.

Matt Rocheleau can be reached at matthew.rocheleau@globe.com. Follow him on Twitter @mrochele