After graduating from Long Beach Polytechnic High School, Professor Gagnon enrolled at the University of Chicago, where he drifted from one subject to the next while scraping together tuition money working at the Continental Can Company and the aircraft-engine division of Ford Motors. After receiving a bachelor’s degree in liberal arts in 1955, he continued to graduate studies at the University of Chicago, where he ended up concentrating on sociology by process of elimination.

In the meantime, he found work as the assistant warden of the Cook County Jail, an experience that offered rich material for his first book, “Sex Offenders,” written after he began working for the Institute for Sex Research in 1959.

In 1968, after editing the essay collection “Sexual Deviance: A Reader” with Professor Simon, he joined the sociology faculty at what is now the State University of New York at Stony Brook, on Long Island. Because he had not gotten around to writing a dissertation, he was given the entry-level title of lecturer, which was upgraded to associate professor after he was awarded a doctorate in 1969.

In the late 1980s, working with two colleagues at the University of Chicago and the National Opinion Research Center, Professor Gagnon designed the first comprehensive survey of sexual behavior since the 1948 and 1953 Kinsey reports, which had been based on interviews conducted as early as the late 1930s.

Unlike the Kinsey studies, which were based on selected samples and anecdotal evidence, Professor Gagnon’s survey used sampling techniques to arrive at a representative population of about 3,400 adults between 18 and 59. It offered a more accurate picture of American sex lives, with reliable numbers on gay men and their behavior that were desperately needed as the AIDS crisis deepened.

In contrast to the Kinsey reports, the survey asked respondents to reflect on why they had sex and what they thought about it. “We don’t just want to list what people do; we want to begin to explain why they do what they do,” Professor Gagnon told Science magazine in 1989.

The survey was published in 1994 as “The Social Organization of Sexuality: Sexual Practices in the United States.” A companion volume, aimed at a general audience, was published the same year under the title “Sex in America.”