Planning a road trip? Try to avoid these cities

Driving to work can be a painful experience, especially if the trip includes heavy traffic, requires expensive gas, or means you have to pay for parking.

These annoyances are particularly acute for people in certain parts of the country, inspiring WalletHub to determine the best and worst cities to be a driver.

By using 21 metrics, ranging from the cost of insurance to the number of car washes, WalletHub ranked the 100 most populated cities. Did yours make the list?

First up, the worst...

—By Ali Montag, special to CNBC Posted 19 June 2015

96. Detroit, Michigan

Cars drive down Grand River Avenue in Detroit with the city's skyline in the background.

Jeff Kowalsky | Bloomberg | Getty Images

Detroit's low ranking stems from its title as the city with the highest rate of auto thefts. Cars in Detroit are 27 times more likely to be stolen than in the safest city, Irvine, California.

97. San Francisco, California

Mitchell Funk | Photographer's Choice | Getty Images

San Francisco has some of the most expensive gas prices in the country, according to WalletHub, ranking in the top five. That mirrors the city's overall cost of living, which is one of the highest in the U.S.

98. Philadelphia, Pennsylvania

Jamie Betts Photo | Moment | Getty Images

You'd better bring a sponge and some soap to visit Philadelphia, because this city has the third fewest car washes per capita. Boston and New York are the only cities that have fewer car washes available.

99. Washington, DC

Pennsylvania Avenue at dusk, Washington D.C.

Jon Hicks | Photographer's Choice | Getty Images

Washington, D.C. has the highest average annual hours of traffic delays. Traffic costs add up to $1,700 for each American household, according to data company INRIX.

100. New York City, New York

Michael Marquand | Lonely Planet Images | Getty Images

New York City is the worst place to be a driver. In addition to congestion, the Big Apple charges the highest parking rates in the U.S.

Now onto the top five...

5. Tuscon, Arizona

Walter Bibikow | AWL Images | Getty Images

Be sure to fill up your tank in Tuscon, Arizona, which ranked as No. 1 for the lowest gas prices, according to WalletHub.

4. Greensboro, North Carolina

Sean Pavone | Getty Images

Greensboro, North Carolina, is home to the cheapest parking. In fact, it's 14 times cheaper than parking in the most expensive city, New York.

3. Lincoln, Nebraska

Denis Tangney Jr. | Getty Images

There is plenty of room to wander in Nebraska's capital city. With approximately 96,725 miles of open road, Lincoln ranked as the third-best place to be a driver.

2. Corpus Christi, Texas

Richard Cummins | Robert Harding World Imagery | Getty Images

If your car breaks down in Corpus Christi, Texas, no sweat! This city ranked in the top five cheapest places for auto maintenance.