As life expectancy increases, churches should expect to see more gray hair and fewer young people in the pews.

That's the result of a new analysis of people's religious decisions. The analysis takes an economic approach to understanding people's choices about attending religious services, weighing the spiritual and social benefits of religion against the time spent participating.

"We show that higher life expectancy discounts [the] expected benefits in the afterlife and is therefore likely to lead to postponement of religiosity," study researcher Elissaios Papyrakis at the University of East Anglia said in a statement. In other words, young people who expect to live a long time put off worrying about what will happen to them after they die. Thus, they don't feel the need to visit a church, mosque or temple until they get older and closer to death. (Another recent study found that being close to death increases belief in intelligent design.)

Life and death

The economic analysis can't take into account all of the factors that make people religious, including a possible genetic predisposition toward God. But there is some real-world evidence to link life expectancy to religious backsliding. (Life expectancy is defined as the number of years a person born today is expected to live if current trends continue.)

Papyrakis and his colleagues used global data on religiosity and life expectancy from the World Value Survey Dataset and the World Bank. They found that people's religious attendance and likelihood of describing themselves as "religious" went down as life expectancy went up. Ten extra years of life expectancy correlated to an 8.4 percent drop in people's likelihood to call themselves religious.

Similarly, an increase of 10 years of life expectancy was linked to a decrease in religious service attendance of between 15 percent to 17 percent. These numbers held true even after controlling for income, past communism (which tends to decrease religiosity), prevalence of Catholicism and Islam in the country, and variations on religious beliefs about God, heaven and hell.

Earthly benefits

Papyrakis and his colleagues said that cost-benefit decision-making could explain some of the slippage of church attendance in the U.K., where formal religion has been on the decline for 50 years. Specifically, older adults in the U.K. attend more than twice as often as younger adults, according to a 2008 study by the Christian Research organization. That study found that 26 percent of those over 65 attend services regularly compared with 11 percent of those between ages 16 and 44. [Read: Is Religion Good for Your Health?]

The United States has higher church attendance, according to a 2010 Gallup poll, which found that 43 percent of Americans attend religious services weekly or almost weekly. However, the United States shows a similar pattern in which older adults fill more pews. The survey found that 53 percent of Americans over 65 attend services regularly, compared with 43 percent of 50- to 64-year-olds and 41 percent of those between the ages of 30 and 49. Young people had even lower attendance, with 35 percent of 18- to 29-year-olds saying they regularly visited a church, mosque or temple.

Papyrakis said churches should attract young people by pitching the earthly rather than the heavenly benefits of religion.

"In light of rising life expectancy, it is important to emphasize socioeconomic and spiritual benefits … for example, expanding a person's social circle, communal activities, spiritual fulfillment, support and guidance, rather than uncertain rewards in the afterlife," Papyrakis said. "These benefits can counterbalance the negative impact of life expectancy on religiosity, which in effect reduces concern about life after death."

You can follow LiveScience senior writer Stephanie Pappas on Twitter @sipappas.