There is still uncertainty about the relative importance of genes and environments on human sexual orientation. One reason is that previous studies employed self-selected, opportunistic, or small population-based samples. We used data from a truly population-based 2005-2006 survey of all adult twins (20-47 years) in Sweden to conduct the largest twin study of same-sex sexual behavior attempted so far. We performed biometric modeling with data on any and total number of lifetime same-sex sexual partners, respectively. The analyses were conducted separately by sex. Twin resemblance was moderate for the 3,826 studied monozygotic and dizygotic same-sex twin pairs. Biometric modeling revealed that, in men, genetic effects explained .34-.39 of the variance, the shared environment .00, and the individual-specific environment .61-.66 of the variance. Corresponding estimates among women were .18-.19 for genetic factors, .16-.17 for shared environmental, and 64-.66 for unique environmental factors. Although wide confidence intervals suggest cautious interpretation, the results are consistent with moderate, primarily genetic, familial effects, and moderate to large effects of the nonshared environment (social and biological) on same-sex sexual behavior.