In the US, most working Americans — about 108 million of them — drive alone in a car, truck, or van to get to work. On average, Americans commute about 25 minutes each way to and from work.

But when you live in a major US city like New York City or Los Angeles, how you get from point A to point B changes significantly.

And in most highly populated cities, even if you're only traveling a mere mile or so, you wind up spending more of your life commuting.

Using data collected from the US Census Bureau, personal-finance site WalletHub ranked 116 of the most populated cities based on the average number of minutes residents spend traveling from home to work. Using that same data, Business Insider also looked at how people commute to and from work in each city.

Here's how the 25 cities with the longest commute times stack up:

25. San Jose, California

Average minutes spent commuting to work: 26.6

Most San Jose commuters travel by driving alone, followed by carpooling.

23. (tie) Stockton, California

Average minutes spent commuting to work: 26.8

Most Stockton commuters travel by driving alone, followed by carpooling.

23. (tie) Detroit, Michigan

Average minutes spent commuting to work: 26.8

Most Detroit commuters travel by driving alone, followed by carpooling, and then public transportation.

21. (tie) Glendale, Arizona

Average minutes spent commuting to work: 26.9

Most Glendale commuters travel by driving alone, followed by carpooling.

21. (tie) Gilbert, Arizona

Average minutes spent commuting to work: 26.9

Most Gilbert commuters travel by driving alone, followed by carpooling.

20. Bridgeport, Connecticut

Average minutes spent commuting to work: 27

Most Bridgeport commuters travel by driving alone, followed by carpooling, and then public transportation.

18. (tie) San Bernardino, California

Average minutes spent commuting to work: 27.1

Most San Bernardino commuters travel by driving alone, followed by carpooling.

18. (tie) Chula Vista, California

Average minutes spent commuting to work: 27.1

Most Chula Vista commuters travel by driving alone, followed by carpooling.

16. (tie) Garland, Texas

Average minutes spent commuting to work: 27.6

Most Garland commuters travel by driving alone, followed by carpooling, and then public transportation.

16. (tie) Anaheim, California

Average minutes spent commuting to work: 27.6

Most Anaheim commuters travel by driving alone, followed by carpooling, and then public transportation.

15. Aurora, Colorado

Average minutes spent commuting to work: 28.8

Most Aurora commuters travel by driving alone, followed by carpooling, and then public transportation.

14. Long Beach, California

Average minutes spent commuting to work: 29

Most Long Beach commuters travel by driving alone, followed by carpooling, and then public transportation.

12. (tie) Riverside, California

Average minutes spent commuting to work: 29.2

Most Riverside commuters travel by driving alone, followed by carpooling.

12. (tie) Oakland, California

Average minutes spent commuting to work: 29.2

Most Oakland commuters travel by driving alone, followed by public transportation, and then carpooling.

11. Boston, Massachusetts

Average minutes spent commuting to work: 29.4

Most Boston commuters travel by driving alone, followed by public transportation, and then walking.

10. Los Angeles, California

Average minutes spent commuting to work: 29.6

Most Los Angeles commuters travel by driving alone, followed by public transportation, and then carpooling.

9. Washington, DC

Average minutes spent commuting to work: 29.8

Most Washington commuters travel by public transportation, followed by driving alone, and then walking.

8. Baltimore, Maryland

Average minutes spent commuting to work: 30.1

Most Baltimore commuters travel by driving alone, followed by public transportation, and then carpooling.

7. Fremont, California

Average minutes spent commuting to work: 30.5

Most Fremont commuters travel by driving alone, followed by carpooling, and then public transportation.

6. San Francisco, California

Average minutes spent commuting to work: 31

Most San Francisco commuters travel by driving alone, followed by public transportation, and then walking.

5. Philadelphia, Pennsylvania

Average minutes spent commuting to work: 32.2

Most Philadelphia commuters travel by driving alone, followed by public transportation, and then carpooling.

4. Chicago, Illinois

Average minutes spent commuting to work: 33.7

Most Chicago commuters travel by driving alone, followed by public transportation, and then carpooling.

3. Newark, New Jersey

Average minutes spent commuting to work: 33.9

Most Newark commuters travel by driving alone, followed by public transportation, and then carpooling.

2. Jersey City, New Jersey

Average minutes spent commuting to work: 35.6

Most Jersey City commuters travel by public transportation, followed by driving alone, and then walking.

1. New York, New York

Average minutes spent commuting to work: 39.4

Most New York commuters travel by public transportation, followed by driving alone, and then walking.