Aspirin is best known as an over-the-counter painkiller. But acetylsalicylic acid, as it’s called chemically, has many other health benefits, as well as side effects, in the body that have only become clear in recent years.

Here’s what the latest science says about the health benefits and side effects of aspirin, as well as which conditions it may treat and those it doesn’t appear to improve. (If you are taking aspirin for any reason other than for periodic pain relief, it’s best to consult with your doctor to confirm whether the benefits outweigh the risks in your particular case.)

How aspirin affects heart health

Aspirin’s second-best known effect is its ability to protect the heart. In people with heart disease who have already had a heart attack, it has been shown to lower the risk of having another. Studies consistently show that people who have had heart attacks or strokes and who take a low-dose aspirin (also known as baby aspirin, which at 81 mg is about a quarter of the dose of regular-strength aspirin) a day can significantly reduce their risk of having another event.

Its protective benefits come from aspirin’s ability to lower inflammation, a condition that can attract clot-building factors within blood vessel walls. These can rupture, plugging up tiny vessels in the heart and blocking blood flow.

Doctors now believe that taking a daily low-dose aspirin is also a cheap and easy way for people who do not yet have heart disease — but who have certain risk factors for it, including high cholesterol and obesity — to avoid first heart attacks. The U.S. Preventive Services Task Force (USPSTF), a government-appointed group of independent experts, recommends the regimen for people ages 50 to 59 who fall into this category. For them, the group concludes, the benefits of aspirin outweigh the potential risks of the drug, which include gastrointestinal bleeding.

How aspirin affects cancer risk

For years, doctors have been enthused about aspirin’s potential to lower the risk of certain cancers. Researchers noticed that people in heart studies who took daily aspirin not only had a lower risk of heart problems, but also had fewer cases of colon cancer compared to people who didn’t take aspirin.

This year, two separate studies, both published in JAMA Oncology, found that people who popped aspirin regularly tended to have lower rates of ovarian and liver cancers. It’s not yet clear what dose is best or how frequently people should be taking the drug to expect a cancer-lowering effect, but these results expand the list of potential cancers that aspirin may affect.