Significantly, the decline in new dementia cases, or incidence, occurred only with people who had at least a high school diploma. High school graduates were also the only ones whose cardiovascular health, except for obesity and diabetes, improved steadily over the same 40 years.

“Whether education is beneficial in itself or whether education is a marker for other things like poverty and unhealthy lifestyle, we didn’t parse that out,” said Dr. Sudha Seshadri, a neurologist at Boston University Medical Center and a senior investigator with the Framingham Heart Study.

Dr. Seshadri said the study did not yield strong evidence that college-educated people had even lower dementia risk, but with small numbers of college graduates in the study’s early groups, it was hard to tell. The study led by Dr. Langa, which compared a nationally representative survey of about 10,000 Americans aged 65 and over in 2000 with a similar group in 2010, found more college correlated with less dementia.

“We find the more education the better,” said Dr. Langa, whose study indicated that people in 2010 averaged almost a year more education than those in 2000 and that education explained about one-half the decline in dementia in that decade.

There are many theories about why education may help stave off dementia, including that it leads to better economic opportunity, which can propel healthier habits and better access to medical care. Another theory is that learning generates more neural connections, allowing brains to compensate longer when memory and cognitive functions falter.

“That’s a major puzzle: What is the causal effect of education on dementia and cognitive function later in life?” said Michael D. Hurd, the director of the RAND Center for the Study of Aging.

Dr. Hurd, who led a study in 2013 estimating that the cost of dementia care would more than double by 2040, said it was too early to say if that estimate should now be lower. Some people will be living longer with dementia, needing, say, 10 years of nursing home care, instead of three, he said, adding that “Framingham is not the U.S. population.”