Some families seem to have “all boys” or “all girls,” raising the question: is a baby’s gender really a 50/50 chance? A new study published in Science Advances suggests it might not be that simple.

Researchers analyzed data from more than 58,000 U.S. women who each had at least two children. They found that baby gender isn’t always an even toss-up—it’s more like each family has its own “weighted coin,” making one outcome slightly more likely than the other.

For example, in families with three boys, the odds of having a fourth boy were 61 percent. In families with three girls, the odds of another girl were 58 percent. While it’s still entirely possible to have a child of the opposite gender, the chances can tilt in one direction.

So, what factors might influence these patterns? The study found that older maternal age at the time of a first birth was linked to a slightly higher likelihood of having children of the same sex. Other potential factors—such as genetics or demographics—were not strongly tied to a child’s sex, leaving much of the process still a mystery.

While this research suggests that baby gender may not always be a perfect 50/50 chance, it’s far from predictable. Family patterns, maternal age, and even genetics may play small roles, but there’s still plenty left to learn. For now, whether you end up with all boys, all girls, or a mix of both, it’s mostly nature—and a little bit of a chance.