Human semen, If you separated it out, would on average hold a 50/50 mix of sex chromosomes - half of the sperm bearing the Y chromosome, and half the X chromosome.

Despite all the myths about choosing the sex of your baby through superstitious rituals, there's not a lot we can do about changing those odds. And current techniques to separate out X and Y sperm outside the body are expensive and can damage the DNA within the cells.

But now, Japanese researchers have accidentally discovered an uncomfortably simple method to separate out the X-carrying sperm from the Y in mice – and this could have huge implications for humans-to-be in the future.

To understand the importance, let's back up to some biology basics for a second. In all mammals (and a number of other animals) females have XX chromosomes, and males have XY.

When a female produces an egg (aka ovum), it will only ever have one of the two X chromosomes – never a Y.

But the male sperm has an equal proportion of X-carrying and Y-carrying swimmers. Hypothetically, if there was something slightly different between the X and Y sperm, you could separate them out if you only wanted either females or males.

Until now we thought that the sperm were pretty much identical, except for the DNA that they carry.

But while studying the differences between X and Y sperm in mice, the Hiroshima University team found that there were around 500 genes active in X sperm that aren't in Y.

That's not super important by itself, but 18 of those genes code for proteins that stick out on the surface of the cell. They homed in on two particular receptors – called Toll-like receptors 7 and 8 on the surface of X sperm.

Using a chemical called resiquimod to bind to the receptors and slow the swimming of the X sperm, they were then able to separate the Y and X sperm with surprising accuracy.

When the researchers used resiquimod, and then used the fastest swimmers to fertilise some mice, the litters ended up being 90 percent male; when the slowest swimmers were used, the mouse babies were 81 percent female.

Although that's not perfect sex separation, it's really high, especially for such a simple and cheap method.

"The differential expression of receptor genes by the two sex chromosomes provides the basis for a novel and potentially highly useful method for separating X and Y sperm and we have already succeeded the selectively production of male or female in cattle and pig by this method," said one of the researchers, Masayuki Shimada, a reproductive biologist from Hiroshima University.

"Nonetheless, use of this method in human reproductive technology is speculative at the moment, and involves significant ethical issues unaffected by the utility of this new technique."

There can be some really good reasons to use sex selection in animals. For example, male cattle are not used in dairy production, and neither are male chickens in egg production. Being able to limit the conception of males in these sorts of situations has the potential to create more ethical farming.

But in humans, things get considerably messier.

Women currently account for 49.6 percent of the world's humans, but in some regions, couples can have strong preferences for a male child. Sex-selective practices have already led to some "alarming" demographic trends in some countries, which can have unintended social and economical effects.

As Michael Le Page at New Scientist explains, allowing for this discovery to be used in people could lead to gels or other home-use items that could significantly change the likelihood of a couple conceiving a girl.

"I am concerned about the social impact of this," genomics researcher Alireza Fazeli of Tartu University in Estonia told Le Page.

"It's so simple. You could start to do it in your bedroom. Nobody would be able to stop you from doing it."

The research has been published in PLOS Biology.