Smoking, drinking alcohol, and gambling are all — when done in excess — widely recognized as bad for your health. Yet millions of people enjoy such vices on a daily basis in the United States. To encourage healthier lifestyles, cover the eventual social costs, or help generate revenue some states tax these behaviors. All told, so-called sin taxes across the 50 states amounted to $55.43 billion in 2015.

Varying state regulations largely account for the differences in the proportions of revenue from sin taxes. For example, some states have fewer sin revenue streams than others, as commercial casinos are only legal in about half of all states. Similarly, seven states do not have lotteries.

8. Pennsylvania
> Pct. total revenue from sin: 3.8%
> Most profitable sin: Casino tax
> Revenue from sin: $3.50 billion (3rd highest)
> Population 18 and older: 79.0% (8th highest)

Though Pennsylvania has the sixth largest population, its 2015 sin tax revenue of $3.50 billion was the third highest of all states. Pennsylvania profits immensely from casinos. The Keystone State’s tax revenue from casinos of $1.38 billion was more than any state, including Nevada. Since gambling was legalized in the state in 2006, revenues at the state’s 12 casinos totaled $21.23 billion from slot machines and $4.66 billion from table games. State residents are also taxed on out-of-state gambling winnings.

Following legislation signed by Pennsylvania Gov. Tom Wolf last year, cigarette taxes rose by a dollar a pack in order to meet annual budget obligations. The current excise tax on cigarettes in the state, at $2.60 per pack, is 10th highest of all states.

Overall, states’ revenue from lotteries totaled $21.36 billion in 2015, the most of any sin revenue. Smoking was the second largest sin revenue stream, as the 50 states collected $17.71 billion in tobacco taxes that year.

To determine the states profiting the most from sin, 24/7 Wall St. calculated the share of sin taxes out of total revenue for each state. Sin taxes are proceeds from lottery ticket sales, as well as taxes on casino gaming, beer and liquor, and tobacco.

Click here to see the states profiting the most from sin.
Click here to see our detailed findings and methodology.