These are the states with the longest and shortest commutes — how does yours stack up?

Oprah Winfrey
Getty Images | Newspix

Feel like you spend half your day shuttling to and from work, and that you're slowly losing your sanity while stuck in traffic? You're not alone.

In the U.S., the average, one-way commute time is 26.1 minutes, according to the U.S. Census Bureau. If you commute to a full-time, 5-day-a-week job, roundtrip that adds up to 4.35 hours a week and over 200 hours (nearly nine days) per year.

But if the travel is getting to you, you might consider moving. According to a study by Best Mattress Brand, some states are worse that others.

Best Mattress recently analyzed 2016 commuter data from the American Community Survey, an ongoing survey conducted by the U.S. Census Bureau, to determine which states' commuters have the speediest morning commutes and which ones have the longest.

The best and worst states for commutes

The states with the shortest, average commutes by car, one-way, are:

  1. South Dakota (16.6 minutes)
  2. Wyoming and Montana (both 17.3 minutes)
  3. Alaska (18.5 minutes)
  4. North Dakota (18.6 minutes)
  5. Nebraska (18.8 minutes)

The states with the longest average car commutes are:

  1. Washington, D.C. (43.6 minutes)
  2. New York (35 minutes)
  3. Maryland (30.7 minutes)
  4. Massachusetts (30.2 minutes)
  5. California (29.4 minutes)

The states with the speediest commutes one-way for public transit (excluding taxis), on average, are:

  1. South Dakota (29 minutes)
  2. Oklahoma (30.2 minutes)
  3. Iowa (30.5 minutes)
  4. Vermont (31.3 minutes)
  5. North Dakota (32.6 minutes)

Meanwhile, the states with the longest average commutes for travelers taking public transportation are:

  1. Nevada (57.2 minutes)
  2. Idaho (56.3 minutes)
  3. New York (53.1 minutes)
  4. Alaska (51.6 minutes)
  5. California (51.4 minutes

Make the most of your commute

Sitting in traffic or being stuck on a train can be a frustrating way to start the day. However, you can maximize the time you spend in transit.

"When you spend at least some of your commute planning for the day or the week ahead, you'll arrive at work better prepared and therefore happier and more energetic and productive," Jon Jachimowicz, an expert on commuting and other work-related behaviors, writes in an article for Harvard Business Review. He recommends setting aside five minutes of your commute to mentally prep for the work day.

Or try listening to an inspiring podcast while en route. Podcasts that are good for go-getters and aspiring entrepreneurs include "Girlboss Radio," hosted by entrepreneur Sophia Amoruso; "Masters of Scale," hosted by LinkedIn co-founder Reid Hoffman; and NPR's "How I Built This" with Guy Raz.

And don't forget to reduce the price of that commute as well. The average cost of an American commute is $2,600, according to the Citi ThankYou Premier Commuter Index, SmartAsset reports. Carpool when you can, use a rewards credit card to purchase gas and check to see if your employer offers commuter benefits, which could give you a way to use pre-tax dollars on mass transit passes.

How I save over $1,000 a year on transportation
How I save over $1,000 a year on transportation