Given the many benefits of exercise — ranging from physical fitness and chronic disease prevention to improved mood — it may seem logical that the more you do, the better. But a large new study suggests that’s not always the case, at least when it comes to mental health.

It’s well-established that exercise can improve mental health, and potentially even alleviate or prevent depression. But how much is enough to see a change? The new research, published Wednesday in the Lancet Psychiatry, says that just two hours of any form of exercise each week may make a significant impact.

“One of the nice things is the accessibility of this,” says study co-author Adam Chekroud, an assistant professor of psychiatry at Yale University. “It seems like some of the benefits are pretty in reach for most people.”

For the study, the researchers analyzed data provided by more than 1.2 million U.S. adults who responded to the Centers for Disease Control and Prevention’s Behavioral Risk Factor Surveillance System survey between 2011 and 2015. These individuals answered questions about their exercise regimens, lifestyle habits, health histories and the number of days per month they experienced poor mental health.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

On average, people reported 3.36 days of poor mental health per month. But those who said they exercised — through activities ranging from housework to running — experienced about 1.5 fewer gloomy days per month than sedentary peers, according to the research.

When digging further into the numbers, the researchers noticed an interesting pattern: People who exercised for a moderate amount of time (about 45 minutes per session) saw better mental health results than those who favored marathon workouts. Similarly, sweating three to five times a week was associated with a bigger reduction in poor mental health days than either not exercising at all or hitting the gym more than five times a week, according to the research. Together, these results led the researchers to conclude that exercising for two to six hours a week may be the sweet spot for mental health.

Federal physical activity guidelines, meanwhile, recommend 75 minutes of vigorous aerobic activity or 150 minutes of moderate aerobic activity per week, plus twice-weekly strength training sessions, to reap the health benefits of exercise.

Chekroud says the new study didn’t look at why six hours may be the upper limit on mental health gains (or whether exercise actually causes the patterns reflected in the data), but speculates that excessive exercise may be indicative of mental health issues.

“Some people get obsessed with exercise, and some people run themselves into the ground. You can definitely see why someone who’s exercising a lot, or maybe obsessively, might have worse mental health,” he says.

On the flip side, Chekroud says people who don’t exercise at all may miss out on the mood-boosting effects of fitness, which he says may actually change the way the brain functions.

“There’s a lot of literature suggesting that people who are depressed and taking antidepressants who also exercise generally do better than people who just take antidepressants,” he says. “I think there’s for sure something going on neurobiologically in people who have depression that’s being helped by exercise.”

Chekroud’s study provides some support for that hypothesis. Among individuals previously diagnosed with depression — who tend to have a higher-than-average number of poor mental health days — those who exercised had 3.75 fewer poor mental health days per month than those who didn’t.

And while just about any form of physical activity is good for your body and brain, the researchers found that certain types of exercise were associated with slightly more mental health benefits than others. Team sports led the pack with a 22.3% reduction in mental health burden, followed by cycling (21.6%) and aerobic/gym exercises (20.1%). In a separate analysis, Chekroud and his colleagues also found that mindfulness exercises, such as yoga and tai chi, bestowed better mental health benefits than walking and many other types of exercise. These findings are in line with research that says social support and mindfulness may each improve mental health.

Chekroud, who’s also a co-founder of the mental health startup Spring Health, says he hopes to use this data to develop a platform that could recommend customized mental-health-boosting exercise regimens, depending on a person’s demographic profile, symptoms and preferences. That service could be available within the next year, he says.

But in the meantime, he says the study results should be encouraging for anyone looking to make a healthy lifestyle change. “A lot of people exercise for physical health benefits or weight loss,” Chekroud says, “but the concept of exercising for mental health benefits, explicitly, is pretty exciting.”

Write to Jamie Ducharme at jamie.ducharme@time.com.