Hint: It's a lot!

Sebastian Kaulitzki/Shutterstock

Attention men everywhere: You now have a great excuse to get it on in the bedroom. After all, it’s all in the name of science (and your health!)

That’s right! According to several studies, ejaculating frequently—during sex, masturbation, or while sleeping—can reduce men’s risk of prostate cancer.

A 2016 study got a bit more specific on what the researchers mean by “frequently.” After surveying 32,000 men from 1992 to 2010, the study found that participants who reported ejaculating at least 21 times per month during their 20s were 19 percent less likely to develop prostate cancer than those who ejaculated seven times per month or less. If you’re in your 40s, there’s even better news: frequent ejaculation reduces your prostate cancer risk by 22 percent. Here are the signs of prostate cancer you should never ignore.

“While our findings should be confirmed in studies that evaluate the potential biological mechanisms underlying the observed associations, the results of our study suggest that ejaculation and safe sexual activity throughout adulthood could be a beneficial strategy for reducing the risk of prostate cancer,” Jennifer Rider, lead author of the study, said in a press release.

This study wasn’t the first to make the connection, though. An Australian study of 2,338 men found that men who averaged 4.6 to seven ejaculations a week were 36 percent less likely to be diagnosed with prostate cancer before the age of 70 than men who ejaculated less than 2.3 times a week, on average. If you’re ready to test the theory for yourself, chow down on these aphrodisiac foods.

Still, ATTN says, “there’s no magic number of times a person should ejaculate to reduce their risk. What the study findings suggest is a dose-dependent relationship, where the risk becomes lower the more frequently a person ejaculates.”

Although the relationship between ejaculation and risk of prostate cancer has been more or less confirmed, researchers still don’t know why the two are linked.

Rider has one theory about the connection. Here’s what she told Reuters: “Ejaculation frequency is, to some extent, a measure of overall health status in that men at the very low end of ejaculation—zero to three times per month—were more likely to have other [medical problems] and die prematurely from causes other than prostate cancer.” Next, read about how many times you need to have sex to slow down aging.