Eastern oysters are protandrous hermaphrodites. An individual usually spawns first as a male in its first season, and as it grows larger a substantial fraction becomes female in a subsequent year. The change is not necessarily one-way, and individuals have been recorded reverting.
The pattern fits a size-related logic. Producing eggs is far more expensive than producing sperm, and egg output scales steeply with body size, so a small animal gets more reproductive return from being male and a large one from being female. Well-fed oysters in productive water tend to shift to female earlier than food-limited ones.
Spawning is broadcast: gametes are released into the water and fertilisation occurs there, with a single large female capable of releasing tens of millions of eggs in a season. What is easy to overstate is precision. The proportion of females at a given size varies between populations and years, so the rule is a strong tendency rather than a fixed schedule, and there is no single age at which the switch reliably happens.

