The City That Never Sleeps apparently doesn’t smile all that much, either.

New York City has been declared America’s unhappiest city by researchers from the University of British Columbia and Harvard.

The paper, “Unhappy Cities,” leaned on survey data from the federal Centers for Disease Control and Prevention that asked respondents: “In general, how satisfied are you with your life?”

Researchers then tweaked that data for control factors such as race, education, marital status and family size. They concluded that New York, Pittsburgh, Louisville, Milwaukee and Detroit are, in that order, America’s least happy cities.

But “unhappiest” Big Apple residents are not fleeing Gotham, as New York’s all-time-high 8.4 million population would show.

UBC researcher Joshua Gottlieb said other factors, such as New York’s high individual income, might keep Big Apple residents in town despite other feelings of unhappiness.

“Our research indicates that people care about more than happiness alone, so other factors may encourage them to stay in a city despite their unhappiness,” Gottlieb said in the report.

“This means that researchers and policymakers should not consider an increase in reported happiness as an overriding objective.”

The five US cities and metro areas with their frowns turned upside down are led by No. 1 Richmond, Virginia. The next most happy metro areas of America were Norfolk, Virginia; Washington, DC; Raleigh-Durham, North Carolina; and Atlanta, Georgia.