The once-unfathomable octopus has revealed some of its most intimate details to science—its brain, its genome, its secret cities. But scientists are still in the dark about a supremely foundational aspect of this animal’s existence: its sex. What causes an octopus to be female or male?

No one knows.

Octopuses, for starters, seem to be missing sex chromosomes in any form as we know them. In humans and many other animals, two X chromosomes make an egg-producing female, while one X and one Y make a sperm-producing male. (Biologists use the word “female” to describe organs or organisms that produce eggs, and “male” for those that produce sperm; animals do not have socially constructed genders.) Octopuses possess no such familiar, tidy determinants.

Sex determinants can mix and change, even within a single species or a single individual. 

Is this simply another example of octopuses being oddballs? Not at all. Across the animal kingdom, chromosomes are only one of more than a dozen ways that sex is determined, and scientists are continuing to find more, expanding the notion of how—and why and when—animals produce one sort of sex cell over the other.

The effort to understand these dynamics goes beyond mere curiosity. Unraveling these unexpectedly complex patterns is helping scientists sharpen their understanding of evolution itself, by illustrating how conflicts between genes or between parasites and hosts can lead to new traits.

This research also helps scientists peer into the future. It’s no exaggeration to say that animal life on Earth depends on eggs and sperm. (A few fascinating species can reproduce with eggs alone, but everyone else, from earthworms to elephants, requires both types of sex cell to build the next generation.) Climate change and pollution can seriously impact the sex ratios of many animals. Thus, understanding how and why sex determination happens could also help us safeguard the future of many species on this rapidly changing planet.

In Body Image
A WRINKLE IN GENES: An unassuming amphibian, the Japanese wrinkled frog (Glandirana rugosa), pictured above, has developed two entirely different chromosome patterns for sex determination and reproduction. Some frogs have XY chromosomes like we do, and others have ZW chromosomes. Photo by Alpsdake / Wikimedia Commons.

Eggs and sperm go way back, but, interestingly, not as far back as sex itself. That began perhaps as much as 2 billion years ago, when single-celled organisms, which had been reproducing by making copies of themselves, began swapping genes in order to create genetically novel offspring. Some eventually facilitated the exchange by dividing themselves into sex cells that could fuse with other similarly sized sex cells. Two, four, or more “mating types” determined compatibility between cells.

Today, single-celled life, such as amoebas, as well as most fungi, still do their sexual reproduction with equal-sized sex cells and mating types. However, the ancestors of animals—as well as those of plants and of several kinds of algae—all evolved sex cells of two distinct sizes: large eggs packed with resources and small speedy sperm. Scientists don’t know why this happened in some types of life and not others, but they do know that this system of reproduction has since become entrenched.

For animals to produce the essential sex cell types, however, they need some deciding factor, some switch, determining which individuals will make which kind of cell. And herein lies the puzzle. “If that division [of egg and sperm] is ancient, why would you ever change the mechanism underpinning which of those you make?” asks zoologist Judith Mank, a zoologist at the University of British Columbia who has studied sex determination for more than two decades. “That’s one of the mysteries of sex.”

Scientists don’t know what switch or signal the earliest animals used to determine whether they would produce eggs or sperm. But since then, the methods have proliferated into a dizzying array.

For example, the worm on a hook, the fish that bites it, and the human holding the rod all reproduce with eggs and sperm, but the three animals have three very different ways of determining what type of sex cell they’ll make. Earthworms are simultaneous hermaphrodites, producing both eggs and sperm in the same body. Fish, depending on species, could be sequential hermaphrodites (maturing first as one sex then switching to the other) or have separate sexes determined by genes, environment, or both. Humans, of course, have X and Y chromosomes (a system that’s distinct from our diverse gender identities).

Climate change could wreak havoc for species that rely on temperature to generate females or males.

Before the discovery of sex chromosomes, people had developed a plethora of creative ideas about sex determination, primarily in humans—and also in farm animals. Their theories tended to be environmental, including: the heat of the surroundings, the heat of the parents’ passion, the nutrition of the mother, and the quantity of semen from the father. Biologists now know that many of these factors can indeed affect sex determination … but just not in humans, sheep, or cows.

The assumption of environmental sex determination acquired some holes in 1845, when male bees were found to develop from unfertilized eggs and female bees from fertilized ones. And the presumption was fully overturned with the 1905 discovery of XY sex chromosomes (first in beetles, then in mammals and a number of other animals) and the 1909 finding of the less widely known ZW sex chromosomes (first found in aphids, then in birds and various reptiles and fish). In this system, ZZ animals develop as male, ZW as female.

Sex appeared to be purely, simply genetic—until 1966, when a French zoologist discovered that the rainbow agama lizard did, in fact, rely on an environmental factor to determine sex. A higher temperature produced male rainbow agamas and a lower temperature, females. (The passion of the reptilian parents was not scrutinized.)

Things only got more complicated from there.

Sex determinants, scientists learned, can mix and change, even within a single species or a single individual. Such changes may occur as populations adapt to different environments, and they can help tease apart complex evolutionary histories.

The Japanese wrinkled frog has XY chromosomes in both eastern and western Japan, but frogs living between these two populations demonstrate two different systems: one with ZW chromosomes and one with distinct XY chromosomes that aren’t shaped like those of the eastern or western frogs. In 2022, scientists discovered that the eastern frogs had become a subtly different species, and where they had hybridized with western frogs, the result was chromosome chaos.1

Beyond sex determination, the wrinkly case of these Japanese frogs reveals the striking ability of evolution to flip traits from one state to another and back again.

In Body Image
ROLLING WITH THE FLOW: The humble roly poly (family Armadillidiidae), pictured above, has a surprisingly complicated sex history. The presence—or absence—of a parasite in flipping these bugs to be female or not proves that sex determination is far from an open-and-shut case. Photo by Mauro Rodrigues / Shutterstock.

Common pillbugs would seem to be a simpler example, with only ZW sex chromosomes to propagate new generations of roly-polies. But, like most other arthropods, they happen to be vulnerable to infection by a weird and wily parasitic bacterium called Wolbachia. Wolbachia is transmitted exclusively from mother to offspring, never via the father, so from Wolbachia’s point of view a male host is a dead end. It would prefer a host population dominated by females. Thus, Wolbachia has evolved the ability to feminize ZZ male pillbugs, creating egg-bearing ZZ individuals that can perpetuate its lineage.

This turns out to be just the beginning of the pillbug’s curious sex history.

In some populations, the feminizing influence of Wolbachia has been so powerful that, over millions of years, these pillbugs lost their ZW sex chromosomes altogether. Their sexes came to be determined entirely by a parasite: Infected individuals were female, uninfected male. That was peculiar enough. Then in the 1980s, scientists observed pillbugs from these populations that were clearly female—but had no Wolbachia infection.

The researchers turned to a relatively new idea at the time, horizontal gene transfer, and hypothesized that feminizing genes from Wolbachia had been incorporated into the pillbugs’ own genome. “It was a visionary hypothesis,” says biologist Richard Cordaux of the Centre National de la Recherche Scientifique and the University of Poitiers, who proved it with modern genetic sequencing in 2016. When he shared the news with the sole surviving member of the original scientific team, “He was very happy and amazed,” Cordaux recalls.

Subsequent research has uncovered sites throughout Europe and Japan where a pillbug’s sex might be determined by any one of these three factors: chromosomes, Wolbachia infection, or transferred genes. “If you have a female from such a population it becomes very difficult to tell just by looking at them,” says Cordaux—an example of the hidden, wondrous diversity right under our noses (or under the stones in our garden).

Another case of garden-variety sexual variance was discovered last year in the tiny aquatic bladder snails that are abundant in ponds and hobby aquariums. They’re hermaphrodites, able to have their eggs and fertilize them too. But even though each individual can produce both eggs and sperm, some of its genes are passed on only through eggs. Because it is to these genes’ advantage for snails to produce only eggs, they’ve acted, like Wolbachia themselves, as a feminizing influence. A subset of snails found recently in Lyon, France, have lost their male functionality and are now all effectively female.2 They live side by side with full hermaphrodites, successfully interbreeding. This curious situation, in which conflicts between genes cause male sterility, was previously known only in plants.

In addition to sex “overrides” created inside an organism, whether by genes or bacteria, these forces can come from the environment. Endocrine disrupting chemicals such as pesticides and BPA are now found all over the planet, and studies show they can tweak sex in either direction, biasing sex ratios toward male or female depending on the species.3 (Some also cause other reproductive issues, like reduced sperm or egg production.)

At the same time, climate change is cranking up the heat, which could wreak havoc for species that rely on temperature to, at least in part, generate females or males. Within temperature-dependent reptiles, some make “hot females,” some make “hot males,” and still others make females at both hot and cold extremes, with “lukewarm males” developing in the middle. Rising temperatures around the globe threaten to unbalance their sex ratios, or even erase one sex altogether.

“It is surprisingly easy to fashion a new sex-determining gene.”

Some reptile species have a limited ability to shift the pivotal temperature at which development switches between sexes.4 “We found it in painted turtles,” says Lisa Schwanz, an evolutionary ecologist at the University of New South Wales. “In a warmer year, it took a warmer temperature to make females.” However, this adjustment was too small to compensate for an environment-skewed sex ratio. “I suspect it won’t be strong enough to counteract climate change,” she says.

Rising temperatures seem to also be pushing some species into new sex determination mechanisms. Bearded dragons, for example, have a fairly standard ZW sex chromosome system. Extreme heat, however, causes ZZ individuals that would otherwise be male to develop into egg-bearing females. This phenomenon was first discovered in captivity, but just last year, researchers described sex-reversed wild females they had discovered in the warmest part of the bearded dragon’s natural Australian habitat.

“Do they have an advantage?” wonders Schwanz, who is one of the paper’s authors. “What sex do they act like?” In the laboratory, ZZ females explore more like males, but in the wild their movement is indistinguishable from that of ZW females. They don’t seem to be any more successful than their ZW sisters, but scientists have yet to determine what their role is in wild populations, which may already be shifting as the local temperatures rise. And it’s unclear how many other animal species might harbor this hidden capability, waiting to be let loose in a rapidly changing environment.

These accelerating shifts add a new urgency to research into animals’ ever-evolving symphony of sex strategies. Many animals seem ready to swap strategies at the drop of a hat, while mammals and birds have kept their staid sex chromosomes for hundreds of millions of years. And each new discovery adds to the proliferating questions about fluid and seemingly stable systems.

In a new paper published earlier this year, researchers uncovered surprising similarities in evolutionary trajectories between the divergent sex determination systems of the populations of Japanese wrinkled frogs. Another endemic Japanese species—this one a mammal—the Amami spiny rat, also recently revealed some surprises. These rodents are some of the extremely rare mammals who have lost their Y chromosome, and scientists finally figured out the genetic mutation that allows them to determine their sexes without it: a gene whose expression is toggled up or down.

It’s a long-standing question whether the tiny human Y chromosome is on its way to evolutionary obsolescence. The authors of a commentary on the spiny rat study, published in late 2022, offer this consolation: “It is surprisingly easy to fashion a new sex-determining gene. It should give hope to those that are distressed by a possible shriveling away of the human Y.”5

As the picture of sex determination—once thought simple and fixed—cracks into fractal-like complexity, scientists uncover more of these unseen dynamics, which underpin the future of animal life on Earth. But even if biologists one day understand what creates sex in all the world’s creatures, they now know even that knowledge will be transient.

The oddities of sex will continue to be fruitful and multiply. Life, it seems, would have it no other way.

Danna Staaf is a science writer and author of the upcoming book Nursery Earth: The Wondrous Lives of Baby Animals and the Extraordinary Ways They Shape Our World. She lives in San Jose, California, with her family and a frankly immoderate number of plush octopuses.

Lead image: Dudley Simpson / Shutterstock


1. Shimada, T., et al. Genetic and morphological variation analysis of Glandirana rugosa with description of a new species (Anura, Ranidae). Zootaxa 5174, 025-045 (2022).

2. David, P. et al. Extreme mitochondrial DNA divergence underlies genetic conflict over sex determination. Current Biology 32, 2325-2333 (2022).

3. Marlatt, V. L., et al. Impacts of endocrine disrupting chemicals on reproduction in wildlife and humans. Environmental Research 208, 112584 (2022).

4. Schwanz, L.E. & Georges, A. Sexual development and the environment: Conclusions from 40 years of theory. Sexual Development 15, 7-22 (2021).

5. Schartl, M. & Lamatsch, D.K. How to manage without a Y chromosome. Proceedings of the National Academy of Sciences 120, e2218839120 (2023).

Further Reading

Furman, B.L.S., et al. Sex chromosome evolution: So many exceptions to the rules. Genome Biology and Evolution 12, 750-763 (2020).

Kobayashi, Y., Nagahama, Y., & Nakamura, M. Diversity and plasticity of sex determination and differentiation in fishes. Sexual Development 7, 115-125 (2013).

Picard, M.A.L., Vicoso, B., Bertrand, S., & Escriva, H. Diversity of modes of reproduction and sex determination systems in invertebrates, and the putative contribution of genetic conflict. Genes 12, 1136 (2021).

Schwanz, L.E., Georges, A., Holleley, C.E., & Sarre, S.D. Climate change, sex reversal and lability of sex‐determining systems. Journal of Evolutionary Biology 33, 270-281 (2020).