A single gene may control why some people are sensitive to the slightest smell of sweat, while others appear oblivious to the odour.
For some people deodorant is completely ineffective
A team from Israel found people who carried at least one working version of a gene called OR11H7P were hypersensitive to the smell.
The PLoS Biology study found women were slightly more sensitive to many smells than men.
However, they found social factors, as well as genes, were important.
Our sense of smell often takes a back seat to our other senses - but humans can perceive up to 10,000 different odours.
Like mice, we have about 1,000 different genes for the smell-detecting receptors in our olfactory system.
However, over half of these genes have become defunct in the last few million years.
Some of these genes are "broken" in all people, while others still function in some of the population.
Researchers from the Weizmann Institute asked volunteers to sniff varying concentrations of compounds that smelled like banana, eucalyptus, spearmint, or sweat.
They compared their ability to detect each odour with their patterns of receptor gene loss.
One gene - OR11H7P - appeared to be associated with the capacity of smelling sweat.
When participants had two genes with disrupting mutations, they were likely to be impervious to the odour, while those that were hypersensitive to the smell had at least one intact gene.
However, the researchers found that genes were not the only factor behind differences in perception of smells.
Lead researcher Professor Doron Lancet said: "OR11H7P is most probably part of a story that might involve other genes.
"It generally appears that different individuals in different contexts find sweat anywhere between pleasant and repulsive."
Dr Mark Whiteley, a consultant surgeon who treats people who suffer from excessive sweating, said the research was interesting.
He said: "For years researchers have been trying to find out the basis of attraction - and lack of attraction - between humans.
"Although pheromones [chemical smells produced by the body] are well understood in the insect kingdom, the role of such chemicals in the human world is more complex.
"Even more interesting is the social normal of modern humans in western societies where we go out of our way to not only destroy the odour by washing - but then cover it up by perfumes and deodorants."