SACRAMENTO, Calif. (KTXL) — Sacramento coffee lovers rejoice. 

Sacramento is among the best coffee cities nationwide, according to personal finance website WalletHub. 

The company ranked the capital city at No. 9, ahead of cities like San Diego (No. 13), Long Beach (No. 14), Los Angeles (No. 16), and Oakland (No. 23). San Francisco was the only California city to be ranked ahead of Sacramento, getting the top spot in the rankings. 

To determine its rankings, WalletHub compared the 100 largest cities across the nation judging them on a scale from 0 to 100. 

Factors that were considered include coffee shops, coffee houses and cafes per capita, number of adult coffee drinkers, number of households that own coffee makers, Google search traffic that consists of the term “coffee” and the number of coffee-centric events in their respective city. 

Sacramento’s total score was 56.73 while San Francisco’s rating was 63.53. Detroit received the lowest ranking with a score of 23.37. 

According to a survey by the National Coffee Association, 66% of Americans drink coffee every day, with the average coffee drinker consuming three cups per day. Coffee consumption has risen 14% since January 2021.