Marriage and having close friends may help protect against dementia, according to Loughborough University researchers.
The study, published in Journals of Gerontology, followed 6,677 adults for just under seven years.
The quality of a person's social circle appeared more important than the overall size, the research team said.
The Alzheimer's Society said it was essential to help patients to maintain "meaningful social connections".
None of the participants had dementia at the start of the trial, but 220 were diagnosed during it.
The research group compared the traits of those who did and did not develop dementia to find clues as to how social lives affect risk.
One finding was that when it comes to friends, it's quality, not quantity, that counts.
Prof Eef Hogervorst said: "You can be surrounded by people, but it is the number of close relationships that is associated with a reduced risk for dementia… it's not about the quantity."
She thinks having close friends acts as a "buffer" against stress, which is linked to poor health.
- Mid-life hearing loss – responsible for 9% of the risk
- Failing to complete secondary education – 8%
- Smoking – 5%
- Failing to seek early treatment for depression – 4%
- Physical inactivity – 3%
- Social isolation – 2%
- High blood pressure – 2%
- Obesity – 1%
- Type 2 diabetes – 1%
These risk factors – which are described as potentially modifiable – add up to 35%. The other 65% of dementia risk is thought to be potentially non-modifiable.
The study also suggested that single people had twice the risk of developing dementia during the study than those who were married.
Dr Doug Brown, director of research at the Alzheimer's Society, said: "This amounts to about one extra diagnosis in each 100 unmarried people."
As the study only follows people over time it cannot prove cause and effect.
Dementia is known to start in the brain decades before it is diagnosed and some of these early changes may affect people's ability to socialise.
Either way, Dr Brown said loneliness was a real issue in dementia.
He said: "If people are not properly supported, dementia can be an incredibly isolating experience.
"It is essential people with dementia are supported to maintain meaningful social connections and continue living their life as they want."