It's a prediction often met with worry: In 20 years, there will be more Americans over 60 than under 15. Some fear that will mean an aging society with an increasing number of decrepit, impaired people and fewer youngsters to care for them while also keeping the country's productivity going.

The concerns are valid, but a new Stanford study shows there's a silver lining to the graying of our nation. As we grow older, we tend to become more emotionally stable. And that translates into longer, more productive lives that offer more benefits than problems, said Laura Carstensen, the study's lead author.

"As people age, they're more emotionally balanced and better able to solve highly emotional problems," said Carstensen, a psychology professor and director of the Stanford Center on Longevity. "We may be seeing a larger group of people who can get along with a greater number of people. They care more and are more compassionate about problems, and that may lead to a more stable world."

Between 1993 and 2005, Carstensen and her colleagues tracked about 180 Americans between the ages of 18 and 94. Over the years, some participants died and others aged out of the younger groups, so additional participants were included.

For one week every five years, the study participants carried pagers and were required to immediately respond to a series of questions whenever the devices buzzed. The periodic quizzes were intended to chart how happy, satisfied and comfortable they were at any given time.

Carstensen's study – which was published online Monday in the journal Psychology and Aging – was coauthored by postdoctoral fellows Bulent Turan and Susanne Scheibe as well as Stanford doctoral students and researchers at Pennsylvania State, Northwestern, the University of Virginia and the University of California's campuses in San Francisco and Los Angeles.

While previous research has established a correlation between aging and happiness, Carstensen's study is the first to track the same people over a long period of time to examine how they changed.

The undertaking was an effort to answer questions asked over and over again by social scientists: Are seniors today who say they're happy simply part of a socioeconomic era that predisposed them to good cheer? Or do most people – whether born and reared in boom times or busts – have it within themselves to reach their golden years with a smile? The answer has important implications for future aging societies.

"Our findings suggest that it doesn't matter when you were born," Carstensen said. "In general, people get happier as they get older."

Over the years, the older subjects reported having fewer negative emotions and more positive ones compared with their younger days. But even with the good outweighing the bad, older people were inclined to report a mix of positive and negative emotions more often than younger test subjects.

"As people get older, they're more aware of mortality," Carstensen said. "So when they see or experience moments of wonderful things, that often comes with the realization that life is fragile and will come to an end. But that's a good thing. It's a signal of strong emotional health and balance."

Carstensen (who is 56 and says she's happier now than she was a few decades ago) attributes the change in older people to her theory of "socio-emotional selectivity" – a scientific way of saying that people invest in what's most important to them when time is limited.

While teenagers and young adults experience more frustration, anxiety and disappointment over things like test scores, career goals and finding a soul mate, older people typically have made their peace with life's accomplishments and failures. In other words, they have less ambiguity to stress about.

"This all suggests that as our society is aging, we will have a greater resource," Carstensen said. "If people become more even-keeled as they age, older societies could be wiser and kinder societies."

So what, then, do we make of the "grumpy old man" stereotype?

"Most of the grumpy old men out there are grumpy young men who grew old," Carstensen said. "Aging isn't going to turn someone grumpy into someone who's happy-go-lucky. But most people will gradually feel better as they grow older."