Cigarette smoking is at an all-time low, but the benefits of this public health achievement are not being shared equally by all Americans.

A new analysis of health data from the nation’s 500 largest cities shows that the people who live in neighborhoods with the highest smoking rates are more likely to be poor, less likely to be white, and more likely to have chronic heart or lung diseases.

The study was published Monday by the journal JAMA Internal Medicine.

“The degree of inequity was surprising,” said study leader Eric Leas, who conducted the work as a postdoctoral scholar at the Stanford Prevention Research Center.

Smoking may be a choice, but if you want to live a long and healthy life, it’s a bad one. In the U.S., life expectancy is at least 10 years lower for smokers than for nonsmokers, and smoking is responsible for roughly 20 percent of deaths each year, according to the Centers for Disease Control and Prevention.

The U.S. surgeon general says smoking can be blamed for more than 80 percent of deaths due to lung cancer and about 80 percent of deaths due to chronic obstructive pulmonary disease (the country’s third-leading cause of death). Smokers also face increased risks of heart ­disease, stroke, asthma, diabetes and at least 10 other kinds of cancer.

In 1965, when the National Center for Health Statistics began tracking tobacco use, 42 percent of U.S. adults were cigarette smokers. By 2017, that figure was 14 ­percent.

Leas and his former Stanford colleagues wondered how the resulting health gains were spread across the country. To find out, they examined data from the 500 Cities Project, a joint effort of the CDC and the Robert Wood Johnson Foundation that gauges health risk factors in 27,204 census tracts in America’s largest cities.

They found that smoking was more popular in some census tracts than others — and that there were certain things these census tracts had in common.

For starters, the people living in neighborhoods with higher smoking rates tended to make less money than people in neighborhoods with lower smoking rates. The researchers calculated that a $10,000 increase in a census tract’s median household income corresponded with a 0.92 percentage-point decrease in smoking prevalence.

In addition, neighborhoods with higher smoking rates were more likely to be populated by blacks and Latinos, while the reverse was true for non-Hispanic whites. A 10 percentage-point increase in a census tract’s white population corresponded with a 0.84 percentage-point decrease in the prevalence of smoking.

The Stanford team also found that the popularity of smoking and the prevalence of diseases rose or fell in tandem. For instance, if the smoking rate in a neighborhood were to increase from 10.7 percent (the 10th percentile of all census tracts) to 27.6 percent (the 90th percentile), the prevalence of coronary heart disease would rise by 27 percent, asthma would jump by 39 percent, and chronic obstructive pulmonary disease would climb by 120 percent.