Despite the physical ravages of age, older people are actually happier than younger adults.

So finds a new study, published in the Journal of Clinical Psychiatry, in which researchers analyzed data collected from a random sample of 1,546 people from ages 21 to 99 in San Diego. After a phone interview, the people in the study filled out a long survey asking about their physical, cognitive and mental health. Question topics included how happy and satisfied with life they were, as well as how depressed, anxious or stressed they were.

“There’s this idea that old age is bad, it’s all gloom and doom and older people are usually depressed, grumpy and unhappy,” says study author Dr. Dilip Jeste, a geriatric psychiatrist and director of the Center on Healthy Aging at the University of California, San Diego. Happiness and wellbeing are thought to take a U-shaped curve throughout life, dipping down in middle age before inching up again later in old age.

But that’s not what the surveys said. Older people were physically more disabled and had more cognitive impairment than younger ones—the natural deterioration of aging—but in mental health, the advantage flipped. People in their 20s and 30s reported having the highest levels of depression, anxiety and stress, plus the lowest levels of happiness, satisfaction and wellbeing. Older people, surprisingly, were the happiest.

The study was just a snapshot in time; it didn’t follow people to track how their answers changed throughout their own lives. But taken as a whole, “as they got older, it looks like things started getting better for them,” Jeste says. “It suggests that with age, there’s a progressive improvement in mental health.”

What’s so terribly hard about being young? After the turbulence of adolescence, real life begins, with its many financial, educational, romantic and career-oriented demands, Jeste says. “There is constant peer pressure: you’re looking at others and always feeling bad that you’re not succeeding like some of them, and you feel like you have lots of choices but you’re not really making use of them.”

Older people are much better able to brush off life’s small stressors and accumulate a valuable thing called wisdom: being emotionally stable and compassionate, knowing yourself and being able to make smart social decisions, Jeste says.

Some evidence suggests that life today also really is easier for older folks than it used to be; one study found that depressive symptoms in late life have declined from 1998 to 2008. Other research supports a worsening trend for younger adults, who seem to have more depression and anxiety than youth in recent decades.

Though the reasons why aren’t yet clear, “it is conceivable that the changes in societal functioning because of progressive globalization, technology development, increased competition for higher education and for better paying jobs and changing roles of women in the society are likely to impact young women and men more than they might affect older people,” Jeste says. “Any relatively rapid changes tend to bring in stress for the people most affected.”

Write to Mandy Oaklander at mandy.oaklander@time.com.