Do people get happier or crankier as they age? Stereotypes of crotchety neighbors aside, scientists have been trying to answer this question for decades, and the results have been conflicting. Now a study of several thousand Americans born between 1885 and 1980 reveals that well-being indeed increases with age—but overall happiness depends on when a person was born.

Previous studies that have compared older adults with the middle-aged and young have sometimes found that older adults are not as happy. But these studies could not discern whether their discontent was because of their age or because of their different life experience. The new study, published online January 24 in Psychological Science, teased out the answer by examining 30 years of data on thousands of Americans, including psychological measures of mood and well-being, reports of job and relationship success, and objective measures of health.

The researchers found, after controlling for variables such as health, wealth, gender, ethnicity and education, that well-being increases over everyone's lifetime. But people who have lived through extreme hardship, such as the Great Depression, start off much less happy than those who have had more comfortable lives. This finding helps to explain why past studies have found conflicting results—experience matters, and tough times can influence an entire generation's happiness for the rest of their lives. The good news is, no matter what we've lived through, we can all look forward to feeling more content as we age.