As summer road trip season cruises along, be strategic about where you go: A recent study by personal finance website WalletHub found that some states are better than others for hitting the road. And, surprisingly, beautiful states such as Rhode Island, Connecticut and Hawaii fare the worst.

To determine its ranking for the Best Road Trip Destinations for Summer for 2018, WalletHub looked at all 50 states across three key dimensions: costs, safety and activities. Those three dimensions were evaluated using 31 relevant metrics, including average gas prices, lowest price of a three-star hotel room, quality of roads, zoos and botanical gardens per capita, access to scenic byways and miles of shoreline.

Overall, the top spot for WalletHub's Best Road Trip Destinations for Summer goes to Wyoming, which boasts impressive rankings, including landing first in the cost category, 19th in the safety category and 22nd in the activities category.

North Carolina ranks second overall, with a seventh place ranking in the activities category, 11th in costs and 28th in safety. Minnesota rounds out the top three, with a first place ranking in safety, 19th in activities and 31st in costs.

If you're all about scenery, the top states for the most scenic byways metric include California (ranked 12th overall), North Carolina (second overall), Oregon (11th overall), Utah (ninth overall) and Idaho (27th overall).

In contrast, the states with the fewest scenic byways, according to WalletHub, are Michigan (ranked 19th overall), Tennessee (28th overall), Hawaii (47th overall), South Dakota (15th overall), Wisconsin (22nd overall) and Delaware (48th overall).

The worst overall state for summer road trips, WalletHub found, is Rhode Island: It ranked 48th in cost and 49th in the activities, dragging down its total score.

The other four states at the bottom of the list are Connecticut coming in 49th (due to low rankings in costs and activities), Delaware in 48th (thanks to low scores in costs, safety and activities), Hawaii in 47th (it has a last place ranking in costs) and New Mexico in 46th place (with low ranking in safety).

WalletHub's best road trip destinations for summer, and their corresponding score (out of 100) are:

1. Wyoming: 58.75

2. North Carolina: 56.24

3. Minnesota: 56.13

4. Texas: 55.46

5. Florida: 54.62

6. Louisiana: 54.40

7. Washington: 53.74

8. New York: 53.72

9. Utah: 53.44

10. Colorado: 53.06

WalletHub's study also looked at gas prices. While the national average price for regular gasoline has been creeping up, some regions fare much better than others: The lowest average gas prices can be found in the South, with Mississippi, Arkansas, Alabama, South Carolina and Missouri boasting the cheapest prices, according to WalletHub. Meanwhile, the highest average gas prices are out west in Nevada, Alaska, Washington, California and Hawaii, found the study.

This story has been updated.

Don't miss:

5 of the biggest travel booking mistakes people make—and how to avoid them

Inside the luxurious Royal Train Meghan Markle will be riding with the Queen

These are the most popular cruises for partying, relaxing and dining, according to Instagram