There are some places in America where you can expect to pay a premium on everything — from food to your fuel bill. Out-of-control living expenses in some of these places may make it difficult for you and your family to enjoy the best possible quality of life. Each year, as part of CNBC’s exclusive America’s Top States for Business study, we consider Cost of Living as one of our key categories of competitiveness. That is because companies seeking to recruit the best possible workforce know that low costs can be a great way to attract talent. We rank all 50 states based on an index of basic items including average home and food prices, monthly energy bills and health costs. That gives us not only the cheapest states to live in but also the most expensive ones. Here are the 10 states that will cost you the most, along with prices for some basic items in each state’s most expensive area. (Price data is based on the 2017 Annual Average Cost of Living Index by the Council for Community and Economic Research, C2ER.)

10. New Jersey

In 2016 New Jersey raised its gasoline tax by 23 cents per gallon. Julio Cortez | AP

“What exit?” That simple question allows residents of the Garden State to instantly communicate to one another where they live in relation to the New Jersey Turnpike or the Garden State Parkway. And for years, getting from one exit to the next was easily affordable. New Jersey had some of the cheapest gas prices in the country — even though, to this day, self-service gasoline is illegal in the state. But in 2016 New Jersey raised its gasoline tax by 23 cents per gallon, ending one of the last cost advantages the state had. And there is talk of another increase as soon as this year. That could have some residents of this expensive state thinking about heading for the exits. 2018 Cost of Living score: 10 out of 50 points (Top States Grade: F) Most expensive area: Bergen-Passaic Counties Average home price: $555,231 Half gallon of milk: $2.30 Ribeye steak: $11.80 Monthly energy bill: $189.76 Doctor visit: $97.06

9. Rhode Island

Renting a two-bedroom apartment in Providence, Rhode Island, will cost you around $1,700 a month. Sean Pavone | iStock | Getty Images

America’s smallest state has the longest official name: The State of Rhode Island and Providence Plantations. Some of the prices here may seem inflated as well. Renting a two-bedroom apartment in Providence will cost you around $1,700 a month. That is nearly three times the going rate in Enid, Oklahoma. A sack of potatoes, at $3.79, is nearly twice what it would cost in Reno, Nevada. And in a state with some of the worst roads in the nation, you could find yourself making multiple trips to the tire store. Getting your wheels balanced in Rhode Island is likely to run around $50, or more than three times the cost in Winston-Salem, North Carolina. 2018 Cost of Living score: 9 out of 50 points (Top States Grade: F) Most expensive area: Providence Average home price: $435,485 Half gallon of milk: $2.39 Ribeye steak: $12.39 Monthly energy bill: $212.39 Doctor visit: $146.33

8. Connecticut

Joe Sohm | Universal Images Group | Getty Images

Connecticut’s official nickname is the Constitution State, and these prices will test any self-respecting, parsimonious New Englander. A bottle of wine in Bridgeport will cost you roughly twice what a similar quality bottle would cost in Phoenix. If your tastes run more toward beer, no luck there either. A six-pack of Heineken will cost you twice as much here as it would in Honolulu. The prices may be enough to drive you to drink, but beware. The bottle of ibuprofen to nurse your hangover will cost roughly twice what it would cost in Birmingham, Alabama. 2018 Cost of Living score: 8 out of 50 points (Top States Grade: F) Most expensive area: Bridgeport-Stamford-Norwalk Metro Average home price: $681,279 Half gallon of milk: $1.96 Ribeye steak: $12.74 Monthly energy bill: $200.20 Doctor visit: $124.71

7. Maryland

A residence in Beaufort Park in Fulton, Maryland. Home prices in the D.C. suburbs are among the highest in the nation. Benjamin C. Tankersley | The Washington Post | Getty Images

Some historians say George Washington himself nicknamed Maryland the Old Line State, based on the Maryland Line, one of the most heroic regiments in the Revolutionary War. That is a more plausible explanation than anything about Maryland holding the line on prices, because that is just not happening. Home prices in the D.C. suburbs are among the highest in the nation. If you choose to rent instead, be prepared to pay twice what it would cost in Minneapolis. To ease the affordability crisis, the state in 2016 launched “SmartBuy,” which allows young borrowers to take out a mortgage and pay off their student loans at the same time. But some critics say it is just distorting the market. 2018 Cost of Living score: 7 out of 50 points (Top States Grade: F) Most expensive area: Bethesda-Gaithersburg-Frederick Average home price: $746,332 Half gallon of milk: $2.32 Ribeye steak: $13.62 Monthly energy bill: $176.24 Doctor visit: $94.00

6. Oregon

Fair-housing advocates worry about the number of Oregonians being priced out of the housing market. Here, a view of Nob Hill and Westover neighborhoods from West Burnside & 20th in Portland, Oregon. Getty Images

For the first time in 2018, Oregon began allowing motorists to pump their own gas, leaving New Jersey as the last state to prohibit self-service at the service station. Immediately, gas prices in Oregon plunged, right? No, they remain above the national average. But that is not the only issue in the Beaver State, which also faces a home affordability crisis. The median home price in Portland is more than twice the national figure. Renting is no bargain, either, with the average for a two-bedroom apartment at about $2,500 a month. Oregon is a big, diverse state, with some rural areas that are much more affordable. But fair-housing advocates worry about the increasing numbers of Oregonians being priced out of the market. 2018 Cost of Living score: 6 out of 50 points (Top States Grade: F) Most expensive area: Portland Average home price: $507,368 Half gallon of milk: $2.06 Ribeye steak: $12.94 Monthly energy bill: $145.24 Doctor visit: $107.61

5. Alaska

Whitney Shefte | The Washington Post | Getty Images

The Last Frontier is constantly blazing new trails when it comes to high cost of living. Imagine paying $5.25 for a loaf of bread in Juneau — twice what you would pay in Florence, Alabama. Or nearly $5 for a pound of hamburger — roughly twice the cost in Grand Rapids, Michigan. Many Alaskans consider their unique lifestyle and the rugged grandeur of their state worth at least twice the cost of living in the Lower 48. Plus, Alaskans get to offset some of their high costs through the state’s annual Permanent Fund Dividend — the yearly check for every man, woman and child that represents their share of Alaska’s oil wealth. But a massive budget shortfall has forced the state for the first time to use some of the fund to pay its bills. This year’s check, initially estimated at $2,700, has been reduced to $1,600. 2018 Cost of Living score: 5 out of 50 points (Top States Grade: F) Most expensive area: Juneau Average home price: $509,408 Half gallon of milk: $2.81 Ribeye steak: $13.59 Monthly energy bill: $262.85 Doctor visit: $193.50

4. New York

Craig Warga | Bloomberg | Getty Images

Manhattan prices do tend to skew New York State’s ranking among America’s most expensive states. After all, the average home price —in the borough more than $1.7 million — is the highest in the nation. But other parts of the state can be pricey as well. Even in Buffalo home prices are nearly twice what you will find in northern Ohio. Even so, nearly 20 million people call the Empire State home, even if they might have to pay a king’s ransom to live there. 2018 Cost of Living score: 4 out of 50 points (Top States Grade: F) Most expensive area: Manhattan Average home price: $1,739,037 Half gallon of milk: $3.24 Ribeye steak: $12.88 Monthly energy bill: $210.06 Doctor visit: $105.00

3. Massachusetts

The median price of a home in Boston is more than 70 percent higher than the national figure. Here, the Beaconsfield Terrace town houses in Brookline, Massachusetts. David L. Ryan | Boston Globe | Getty Images

The Bay State is one of the four states that refer to themselves as commonwealths (the others are Kentucky, Pennsylvania and Virginia). There is no practical difference between a commonwealth and a state, but in Massachusetts one might want to put the emphasis on “wealth,” because that is what it takes to live there. The median price of a home in Boston is more than 70 percent higher than the national figure. A trip to the dentist in Cambridge costs twice what it costs in Auburn, Alabama. Even going out for pizza will set you back: a 12-inch thin-crust pie in Boston will run around $11, or 40 percent more than in Hanover, Pennsylvania. 2018 Cost of Living score: 3 out of 50 points (Top States Grade: F) Most expensive area: Boston Average home price: $604,205 Half gallon of milk: $2.49 Ribeye steak: $12.14 Monthly energy bill: $217.29 Doctor visit: $151.91

2. California

The median price for a home in San Francisco is about $1.3 million, according to real estate site Zillow. Education Images | Universal Images Group | Getty Images

The discovery of gold at Sutter’s Mill in 1848 touched off the Gold Rush — an estimated 300,000 people descending on California to try and get in on the action. Pretty much ever since, people have been trying to get ahead here, with limited success. These days, making ends meet in California is harder than ever. Consider the housing shortage, which has reached the crisis stage. A 2016 report by the McKinsey Global Institute found 50 percent of California households cannot afford the cost of housing in their local market. It is basic supply and demand. The average home price in San Francisco is nearly $1.2 million. A two-bedroom apartment in or near the City by the Bay — if you can find one — will rent for more than $4,000 a month. 2018 Cost of Living score: 2 out of 50 points (Top States Grade: F) Most expensive area: San Francisco-Redwood City-South San Francisco Average home price: $1,182,092 Half gallon of milk: $2.72 Ribeye steak: $12.94 Monthly energy bill: $235.44 Doctor visit: $142.61

1. Hawaii

Agnieszka Szymzak | Getty Images