If you're looking for a laugh, head to the Windy City.

Chicago topped the list of the nation's funniest cities in a new study released Sunday by the University of Colorado-Boulder. (See the full list below.)

“We found humor often has a local flavor,” Peter McGraw, associate professor of marketing and psychology at CU-Boulder’s Leeds School of Business said in a statement. “The jokes that get laughs at comedy clubs in Denver seem unlikely to fly with a cartoon editor at The New Yorker, for example. The kind of torturous game shows that some Japanese find amusing would likely fall flat to a sitcom producer in Los Angeles.”

Researchers took the following factors into account to determine which city was the funniest of them all:

Number of comedy clubs per square mile in each city

Traveling comedians' ratings of each city's comedy-club audiences

Number of famous comedians born in each city, divided by city population

Number of famous funny tweeters living in each city, divided by city population

Number of comedy radio stations available in each city

Frequency of humor-related web searches originating in each city