Various non-human animal species exhibit behavior that can be interpreted as homosexual or bisexual, often referred to as same-sex sexual behavior (SSSB) by scientists. This may include same-sex sexual activity, courtship, affection, pair bonding, and parenting among same-sex animal pairs. Various forms of this are found among a variety of vertebrate and arthropod taxonomic classes. The sexual behavior of non-human animals takes many different forms, even within the same species, though homosexual behavior is best known from social species.

Scientists observe same-sex sexual behavior in animals in different degrees and forms among different species and clades. A 2019 paper states that it has been observed in over 1,500 species. Although same-sex interactions involving genital contact have been reported in many animal species, they are routinely manifested in only a few, including humans. Other than humans, the only known species to exhibit exclusive homosexual orientation is the domesticated sheep (Ovis aries), involving about 10% of males. The motivations for and implications of these behaviors are often lensed through anthropocentric thinking; Bruce Bagemihl states that any hypothesis is "necessarily an account of human interpretations of these phenomena".

Proposed causes for same-sex sexual behavior vary across species. Theories include mistaken identity (especially for arthropods), sexually antagonistic selection, balancing selection, practice of behaviors needed for reproduction, expression of social dominance or submission, and social bonding. Genetic, hormonal, and neurological variations as a basis for individual behavioral differences within species have been proposed, and same-sex sexual behavior has been induced in laboratory animals by these means.

In relation to humans

Applying the term homosexual to animals The term homosexual was coined by the Hungarian writer and campaigner Karl Maria Kertbeny in 1868 to describe same-sex sexual attraction and sexual behavior in humans.The first known use of the word Homoseksuäl is found in Benkert Kertbeny, K. M. (1869): Paragraph 143 des Preussischen Strafgesetzebuches vom 14/4-1851 und seine Aufrechterhaltung als Paragraph 152 im Entwurf eines Strafgesetzbuches fur den Norddeutschen Bundes, Leipzig, 1869. Reprinted in Jahrbuch fur sexuelle Zwischenstufen 7 (1905), pp. 1–66 Its use in animal studies has been controversial for two main reasons: animal sexuality and motivating factors have been and remain poorly understood, and the term has strong cultural implications in western society that are irrelevant for species other than humans. Thus homosexual behavior has been given a number of terms over the years. According to Bagemihl, when describing animals, the term homosexual is preferred over gay, lesbian, and other terms currently in use, as these are seen as even more bound to human homosexuality.

Bailey et al. says:Homosexual: in animals, this has been used to refer to same-sex behavior that is not sexual in character (e.g. 'homosexual tandem running' in termites), same-sex courtship or copulatory behavior occurring over a short period of time (e.g. 'homosexual mounting' in cockroaches and rams) or long-term pair bonds between same-sex partners that might involve any combination of courting, copulating, parenting and affectional behaviors (e.g. 'homosexual pair bonds' in gulls). In humans, the term is used to describe individual sexual behaviors as well as long-term relationships, but in some usages connotes a gay or lesbian social identity. Scientific writing would benefit from reserving this anthropomorphic term for humans and not using it to describe behavior in other animals, because of its deeply rooted context in human society.Animal preference and motivation is always inferred from behavior. In wild animals, researchers will not be able to map the entire life of an individual, and must infer from frequency of single observations of behavior. The correct usage of the term homosexual is that an animal exhibits homosexual behavior or even same-sex sexual behavior; however, this article conforms to the usage by modern research, applying the term homosexuality to all sexual behavior (copulation, genital stimulation, mating games and sexual display behavior) between animals of the same sex. In most instances, it is presumed that the homosexual behavior is but part of the animal's overall sexual behavioral repertoire, making the animal "bisexual" rather than "homosexual" as the terms are commonly understood in humans.

Nature The observation of homosexual behavior in animals can be seen as both an argument for and against the acceptance of homosexuality in humans, and has been used especially against the claim that it is a peccatum contra naturam ("sin against nature"). For instance, homosexuality in animals was cited by the American Psychological Association and other groups in their amici curiae brief to the United States Supreme Court in Lawrence v. Texas, which ultimately struck down the sodomy laws of 14 states.

Research A majority of the research available concerning homosexual behavior in animals lacks specification between animals that exclusively exhibit same-sex tendencies and those that participate in heterosexual and homosexual mating activities interchangeably. This lack of distinction has led to differing opinions and conflicting interpretations of collected data amongst scientists and researchers. For instance, Bruce Bagemihl, author of the book Biological Exuberence: Animal Homosexuality and Natural Diversity, emphasizes that there are no anatomical or endocrinological differences between exclusively homosexual and exclusively heterosexual animal pairs. However, if the definition of "homosexual behavior" is made to include animals that participate in both same-sex and opposite-sex mating activities, hormonal differences have been documented among key sex hormones, such as testosterone and estradiol, when compared to those who participate solely in heterosexual mating.

Many of the animals used in laboratory-based studies of homosexuality do not appear to spontaneously exhibit these tendencies often in the wild. Such behavior is often elicited and exaggerated by the researcher during experimentation through the destruction of a portion of brain tissue, or by exposing the animal to high levels of steroid hormones prenatally. Information gathered from these studies is limited when applied to spontaneously occurring same-sex behavior in animals outside of the laboratory.

Homosexual behaviour in animals has been discussed since classical antiquity. The earliest written mention of animal homosexuality appears to date back to 2,300 years ago, when Aristotle (384–322 BC) described copulation between pigeons, partridges and quails of the same sex. The Hieroglyphics of Horapollo, written in the 4th century AD by the Egyptian writer Horapollo, mentions "hermaphroditism" in hyenas and homosexuality in partridges. The first review of animal homosexuality was written by the zoologist Ferdinand Karsch-Haack in 1900.

Academic research into the ubiquity of same-sex sexual behavior was not carried out on a large scale, possibly due to observer bias caused by social attitudes to same-sex sexual behavior, innocent confusion, lack of interest, distaste, scientists fearing loss of their grants or even from a fear of "being ridiculed by their colleagues". Georgetown University biologist Janet Mann states "Scientists who study the topic are often accused of trying to forward an agenda, and their work can come under greater scrutiny than that of their colleagues who study other topics." They also noted "Not every sexual act has a reproductive function ... that's true of humans and non-humans." Studies have demonstrated homosexual behavior in a number of species, but the true extent of homosexuality in animals is not known.

Some researchers believe this behavior to have its origin in male social organization and social dominance, similar to the dominance traits shown in prison sexuality. Others, particularly Bagemihl, Joan Roughgarden, Thierry LodéThierry Lodé La guerre des sexes chez les animaux Eds O Jacb, Paris, 2006, and Paul Vasey suggest the social function of sex (both homosexual and heterosexual) is not necessarily connected to dominance, but serves to strengthen alliances and social ties within a flock. While reports on many such mating scenarios are still only anecdotal, a growing body of scientific work confirms that permanent homosexuality occurs not only in species with permanent pair bonds, but also in non-monogamous species like sheep. One report on sheep found that 8% of rams exhibited homosexual preferences—that is, even when given a choice, they chose male over female partners. In fact, apparent homosexual individuals are known from all of the traditional domestic species, from sheep, cattle and horses to cats, dogs and budgerigars. In October 2023, biologists reported studies of animals (over 1,500 different species) that found same-sex behavior (not necessarily related to human orientation) may help improve social stability by reducing conflict within the groups studied.

Basis Sexual behaviors often require a significant energy investment. When sexual behaviors produce offspring, there is an obvious benefit for the animal. However, the benefit from performing homosexual behaviors (which cannot result in the production of offspring) is less obvious, and some scientists have called it a "Darwinian paradox" because it is non-reproductive. A number of non-exclusive different explanations for the emergence of such traits have been put forward.

Physiological basis A definite physiological explanation or reason for homosexual activity in animal species has not been agreed upon by researchers in the field. Numerous scholars are of the opinion that varying levels (either higher or lower) of the sex hormones in the animal, in addition to the size of the animal's gonads, play a direct role in the sexual behavior and preference exhibited by that animal. Others firmly argue no evidence to support these claims exists when comparing animals of a specific species exhibiting homosexual behavior exclusively and those that do not. Ultimately, empirical support from comprehensive endocrinological studies exist for both interpretations. Researchers found no evidence of differences in the measurements of the gonads, or the levels of the sex hormones of exclusively homosexual western gulls and ring-billed gulls.

Additional studies pertaining to hormone involvement in homosexual behavior indicate that when administering treatments of testosterone and estradiol to female heterosexual animals, the elevated hormone levels increase the likelihood of homosexual behavior. Additionally, boosting the levels of sex hormones during an animal's pregnancy appears to increase the likelihood of it birthing a homosexual offspring.

Genetic basis Researchers found that disabling the fucose mutarotase (FucM) gene in laboratory mice – which influences the levels of estrogen to which the brain is exposed – caused the female mice to behave as if they were male as they grew up. "The mutant female mouse underwent a slightly altered developmental programme in the brain to resemble the male brain in terms of sexual preference" said professor Chankyu Park of the Korea Advanced Institute of Science and Technology in Daejon, South Korea, who led the research. His findings were published in the BMC Genetics journal on July 7, 2010. Another study found that by manipulating a gene in fruit flies (Drosophila), homosexual behavior appeared to have been induced. However, in addition to homosexual behavior, several abnormal behaviors were also exhibited apparently due to this mutation.

Neurobiological basis