(FOX40.COM) — Sacramento is among the best cities in the country for foodies, according to a new study. 

California’s capital city was ranked as the country’s third-best foodie city in a study from personal finance website WalletHub. 

Sacramento is also the highest-ranked foodie city in California, ahead of San Francisco (No. 5), San Diego (No. 7), Los Angeles  (No. 13), Oakland (No. 21), and Santa Ana (No. 23).   

To determine the best and cheapest local foodie scenes, WalletHub compared 182 cities across the country including the nation’s 150 most populated cities, grading metrics on a 100-point scale. 

The study’s analysis also includes measuring “affordability” and “diversity, accessibility and quality” of at least two of the most populated cities in each state.

Factors that were considered included the cost of groceries, cost of restaurant meals, sales tax, food tax, the average price of beer and wine, restaurants, food trucks, grocery stores and food festivals per capita. 

The analysis also took into account the number of coffee shops, craft breweries, wineries, ice cream and yogurt shops and gourmet specialty-food stores per capita.

The two cities that finished above Sacramento were Orlando, Florida and Portland, Oregon, which finished No. 1 and No. 2 in that order, respectively.  

Other California cities that made the top 100 were Anaheim (No. 40), Garden Gove (No. 44), Fresno (No. 51), San Jose (No. 52), Bakersfield (No. 72), Stockton (No. 86), Modesto (No. 87), and Santa Rosa (No. 90). 

Oceanside (No. 103), Glendale (No. 129), Huntington Beach (No. 135), Sanita Clarita (No. 138), Irvine (No. 141), Riverside (No. 148), Chula Vista (No. 158), Ontario (No. 159), Fremont (No. 161), San Bernardino (No. 165), Rancho Cucamonga (No. 171), Fontana (No. 174) and Moreno Valley (No. 176).