For some two million years our hominin ancestors enjoyed a long-term relationship with Mother Nature. Up until about 10,000 years ago—a mere hiccup in evolutionary terms—our survival completely depended upon successfully negotiating her ups and downs. Though we grew apart, man still harbors a meaningful affinity for nature, an adaptive holdover, some scientists say, from prehistoric times.Though it’s been centuries since we began substituting environmental reliance with human wit, researchers believe that nature left a deep evolutionary mark on our psyches. A growing body of scientific evidence links nature with health benefits, including a reduction in stress and disease and a heightened sense of overall well-being.

READ MORE: Daily Affirmations for People Who Hate Daily Affirmations

Until now, however, how nature affects our experience of immediate, in-the-moment happiness remained a more elusive question. “Most people would agree that natural environments are happier places than other places,” says George MacKerron, Ph.D., a lecturer in economics at the University of Sussex in the United Kingdom. “We know they’re lovely, but ultimately, we wanted to know: How lovely are they?”

The best thing for happiness is to be in trees with your friends.-George MacKerron, Ph.D.

In other words, can you measure  nature’s immediate effect on happiness—right this second?To quantify the mood boost (or lack thereof) of being in nature, MacKerron built an iPhone app called Mappiness that randomly checks in with users twice a day to see what they’re up to and how they’re doing. Users report whether they’re with friends, at the movies, at work, getting ready for bed or doing any of the other countless activities that consume our waking hours. They also share how they feel at the moment by ranking their happiness on a sliding scale, ranging from “not at all” (i.e. hating the world) at one end to “extremely” (utter karmic bliss) at the other.

QUIZ: Test Your Happiness

Around 20,000 people installed the app and provided more than 1.1 million data points over a period of six months. The app automatically paired responses with local weather data and GPS coordinates. A computer program classified those coordinates’ corresponding nature-y-ness using images taken from Google Earth. “The happiness measure is subjective, but everything else—the satellite classifiers, the data—was highly objective,” MacKerron says.Nature did not disappoint. Even after controlling for variables like weather, day of the week, activities and company, natural environments provided significantly more moments of happiness than urban ones, MacKerron and his co-author report in the journal Global Environmental Change. On a scale of zero (least happy) to 100 (most happy), being in nature tended to add an extra three to six points to the baseline average of 66—a boost equivalent to the difference between doing housework and going to a museum. Coastal environments ranked highest of the natural settings, especially among women—along with woodlands and farms. Other activities that prompted a happiness boost of a similar magnitude included hanging out with a partner or friend, and exercising or playing sports. “The best thing is to be in trees with your friends,” MacKerron says.

READ MORE: The Beauty of Rock Climbing

Aside from evolutionary throwbacks, he explains, our affinity with nature may also have something to do with natural environments’ relative purity. Navigating amidst honking horns and the reek of rotting garbage on a crowded New York City street is no doubt more stressful an experience than breathing in the sweet air of a forest or meadow. “It’s quieter and more peaceful in nature, and also lower in various bad characteristics—particularly noise and pollution,” MacKerron says. “Perhaps we’re evolved to like natural environments because they’re good for us.

READ MORE: Hiking Boosts Creativity

The study does leave some unanswered questions. One of its drawbacks is its geographic fuzziness—a single tree would not register as nature, for example—so the researchers cannot say what the minimum green area is that a person needs to feel happier. Nor can they tell how long you have to spend among the trees to reap the benefits. Still, there is hope for urbanites who have access to parks and gardens. Though squarely in the middle of the city, Hyde Park in London registers as a mix of grasslands, trees and water. And lo and behold, people were happier when they were in it.

Since most of the people who participated in the study live in urban environments, it’s hard to say whether those who live or work in the country get as much of a thrill from basking in the great outdoors as green-starved city dwellers who normally spend their time trapped in a cubicle. Generally speaking, research finds that country folk have higher levels of life satisfaction than city folk, but there are too many factors involved to understand the relationship.

READ MORE: Beauty Treatments that Relieve Stress

The lesson should not be “Green is great, cities are bad,” warns Mirko Moro, Ph.D., a lecturer in economics at the University of Stirling in Scotland who was not involved in the research. “Most people still want to live in big cities,” he points out. “Cities offer the most opportunities to exchange ideas and experience culture.”Rather than ditch your successful career and city friends in favor of a life of bliss in the country, he says, “Whenever you have some time off, just try to go outside in a green space and you’ll probably feel much better.” While a trek to the Catskills or Yosemite would be ideal, an afternoon jogging along the Hudson River or reading in Golden Gate Park should also do the trick. Even the busiest urbanite can still pen a happiness boost into her schedule by taking her next coffee break in the park.

QUIZ: Is Pollution Making You Look Old?