Imagine you’re diving on a coral reef.
A brightly coloured fish darts between coral bommies. A few years later, you return to the same reef and spot what appears to be an entirely different fish occupying the same territory.
The colours are different. The behaviour is different. Even its role within the group has changed.
What you may actually be looking at is the same fish.
Some reef fish can change sex during their lifetime — one of the most remarkable adaptations found anywhere in the ocean.
How Common Is It?
Changing sex might sound unusual, but among fish it is surprisingly widespread.
Scientists have documented sex change in more than 500 fish species worldwide, representing roughly 2% of all known fish species. Many of these species live on coral reefs, where competition for mates, territories, and resources can be intense.
Far from being a biological curiosity, sex change is a strategy that has evolved repeatedly because it can provide an advantage under the right circumstances.
Why Do Fish Change Sex?
At first glance, changing sex seems incredibly complicated. So why evolve the ability at all?
The answer is that changing sex can increase a fish’s chances of reproducing successfully as its circumstances change. Different species use the strategy for different reasons.
- Size – In some species, larger females can produce far more eggs than smaller females. In others, larger males are better able to defend territories or attract mates. Changing sex allows a fish to take advantage of whichever role is most beneficial as it grows.
- Social structure – Many reef fish live in groups with a clear hierarchy. The loss of a dominant individual can trigger a sex change in another fish, allowing it to take over the vacant role.
- Population balance – If one sex becomes scarce, the ability to replace it can help maintain breeding populations.
- Environmental conditions – In some fish, factors such as temperature, water chemistry, parasites, and pollution can influence how sex develops.
Three Ways Fish Change Sex
Not all fish change sex in the same way. Some begin life as males and later become females. Others do the opposite. A few can even switch back and forth depending on the circumstances.
Male to Female: Clownfish
Clownfish live within a strict social hierarchy inside a sea anemone.
At the top is a dominant breeding female. Below her is a breeding male, followed by several smaller non-breeding males.
If the female dies, the breeding male changes sex and becomes the new female. One of the smaller males then moves up the ranks to become the breeding male.
The group effectively reorganises itself without needing to find a new mate.
Female to Male: Parrotfish and Wrasses
Many wrasses and parrotfish follow the opposite strategy.
These fish often live in groups where a single large male controls a territory or breeds with multiple females. Because larger males are usually more successful than smaller males, it makes sense for individuals to begin life as females and transition to males only after reaching a larger size.
If the dominant male disappears, the largest female may begin changing sex and eventually take over his role.
Both Directions: Gobies
Some reef fish are even more flexible.
Certain coral-dwelling gobies can change sex in either direction depending on the circumstances. If two fish meet and form a breeding pair, one may switch sex regardless of whether it started life as a male or female.
For fish that spend much of their lives within a small patch of coral, this flexibility can be a major advantage.
More Than Just a Change in Reproductive Organs
Changing sex involves far more than a change in reproductive function.
Hormones shift. Reproductive organs are reorganised. Behaviour changes. In many species, appearance changes as well.
Some parrotfish and wrasses undergo such dramatic colour transformations that males and females were once mistaken for entirely different species.
The birdnose wrasse provides a striking example. Juveniles are bright green with dark stripes, females are black and white with a distinctive red snout, and males are predominantly green. During the transition, individuals can display a mixture of both colour patterns as the transformation takes place.
A fish that appears to have vanished from a reef may simply have changed sex and adopted a completely new appearance.
How Long Does It Take?
The speed of sex change varies between species.
Behavioural changes can begin within hours or days of a shift in social conditions. Physical changes often take longer as reproductive organs and hormone levels adjust.
One of the fastest-known examples is the bluehead wrasse, a Caribbean reef fish. When the dominant male disappears, the largest female begins changing sex. Her behaviour changes almost immediately, while the transformation of her reproductive organs can be completed in little more than a week.
Visible colour changes may continue for several weeks after the process begins.
For a transformation that involves changes to behaviour, anatomy, hormones, and appearance, the speed can be remarkable.
Why This Strategy Works So Well
Coral reefs are dynamic places.
Predators remove individuals. Storms reshape habitats. Dominant fish disappear. Competition for mates and territories is constant.
For species capable of changing sex, these disruptions do not necessarily prevent reproduction. Social groups can reorganise themselves and adapt to changing circumstances without relying on a fixed number of males and females.
Over millions of years, this flexibility has proven remarkably successful, helping make sex-changing fish a common feature of reef ecosystems around the world.
A Different Set of Rules
The next time you see a clownfish guarding its anemone or a parrotfish grazing across a coral reef, remember that you are looking at an animal living by a very different set of biological rules.
Hidden among the coral are fish that can become male, become female, or even switch back and forth depending on the circumstances. It’s one of the ocean’s most remarkable adaptations — happening on reefs around the world, often without anyone noticing.

