The sperm is the smallest cell in human biology, but also one of the most complex. The egg meanwhile is the largest cell and similarly intricate. Looking further out into the natural world, the diversity of these sex cells, or gametes, is truly remarkable.

Most species have two gametes, which we term male and female.

"Gametes have two fundamental jobs: to carry resources to nurture the resulting offspring, and to find gametes of the same species and fuse with them. To be good at both is a challenge, because the two jobs create opposing drives across a size-number trade-off," explains Matthew Gage from the University of East Anglia, UK.

"One optimum is to produce gametes that maximise offspring survival, and so evolution makes large, nutritive gametes, which we call eggs produced by females.

The other optimum is to produce gametes that maximise fusions, and so evolution makes millions of gametes we call sperm, made by males."

Why sperm cells come in so many shapes and sizes is a rich area of research.

You would expect the smallest organisms to have the tiniest male sex cells but this is not always the case. In fact, the longest known sperm belongs to a fly.

The fruit fly Drosophila bifurca produces a sperm cell like a ball of string. When scientists unravelled the cell and measured it from end to end, they discovered that it was almost 6cm long. That is 20 times longer than the male fly's entire body.

In a study published in 2016, researchers argued that these "giant sperm" are the cellular equivalent of a peacock's tail. That is, they evolved because females favoured long sperm.

Yet bigger clearly is not always better. At the other end of the scale, the shortest known sperm belongs to a parasitoid wasp called Cotesia congregata. The sperm is less than 7 micrometres (0.0007cm) long.

According to Rhonda Snook of the University of Sheffield, UK, there are several potential explanations for the extreme variation in sperm size.

Snook's research has shown that natural selection filters out all but the most successful shapes and sizes of sperm. It might seem strange that both long and short sperm can be favoured, but it is all a matter of competition and choice.

When females mate with multiple males, sperm cells must compete because only the fittest will beat its rivals to fertilise the egg. This pressure has driven myriad adaptations, including those giant tails in fruit fly sperm. Other examples of super-competitive sperm include those of woodlice, which form "trains" that work co-operatively, and the seminal fluid of some flies and beetles, which poisons rival sperm.

The females of some species can select which sperm fertilise their eggs

One of the most widespread tactics used by males is a "mating plug", which prevents other males from getting into the female's reproductive tract. Mating plugs are used by spiders, bumblebees, squirrels and even some primates.

But in the game of reproduction, every male must either play for the numerical advantage by making lots of small sperm, or invest all his potential in a small number of stronger sperm. The best choice depends on several factors, including how far the sperm must swim, and how much energy the male has left after attracting a mate with dance, song or (in the case of mandrills) his vibrantly-coloured backside.

What's more, a 2015 study suggested that larger mammals produce smaller sperm because the female reproductive tract is larger. This makes sense when you think about it: if the pitch is bigger, you probably need more players.

On top of all that, there is the possibility of cryptic female choice: the females of some species can select which sperm fertilise their eggs. All of a sudden, nature's amazing variety of sperm cells does not seem so surprising.

"We don't know a lot about whether it's primarily sperm competition or cryptic female choice that is driving variation in sperm morphology," says Snook. "But like most scientific questions, it's most likely that it will be a combination of these selection pressures."

Female sex cells are just as complicated.

The largest egg produced by a living animal belongs to the ostrich. It is 20 times heavier than a chicken's egg and measures roughly 15cm tall and 13cm wide. In contrast, the smallest bird's egg is that of the tiny bee hummingbird: it measures less than 7mm, the size of a garden pea.

We are a bit inconsistent in the way we use the word "egg"

Tim Birkhead of the University of Sheffield in the UK is the author of The Most Perfect Thing: The inside (and outside) of a bird's egg. He says that, among birds, egg size is roughly proportionate to body size, but with a few notable exceptions to stop things being too easy.

"The raven (Corvus corax) and the common guillemot (Uria aalge) are similar in body size, weighing around 1kg," he says. "Yet a single raven's egg weighs only 3% of female body weight, whereas a guillemot's egg weighs around 12% of female body weight."

Birkhead says that one key factor in determining the sizes of eggs is how the species' young develops. "Species producing precocial – well-developed at hatching – chicks usually produce relatively larger eggs, as in the raven versus guillemot case," he says.

This gets particularly confusing, because we are a bit inconsistent in the way we use the word "egg".

This becomes obvious when you try to compare a human egg, with a diameter of 0.12mm, with a chicken's egg that is 55mm long. The point is that the chicken's egg is not just the egg cell: there is a lot of other stuff in there too.

If you want to see the smallest egg cells in the world, you will need some major magnification

While human females develop their offspring inside the womb, egg-laying species like chickens have to supply enough essentials for their young to develop outside of the mothers' bodies. To do this they make a structure – somewhat confusingly also called an egg – that combines food, water and protection from the elements. Much of the animal kingdom does this, including birds, insects and fish.

You could pinpoint the part of a chicken egg that develops into an embryo, but it could not do so without the connected nutrients and the shell. By that argument, the ostrich egg is still the largest egg cell on Earth.

According to Birkhead, there is again an evolutionary trade-off that drives egg size. In some cases fewer, larger eggs might be the best course of action, while other species play the numbers game.

What is clear is that if you want to see the smallest egg cells in the world, you will need some major magnification.

According to a 1994 review by entomologists at the University of Florida, parasites that lay their eggs in other tiny animals generally have the smallest eggs.

Perhaps unsurprisingly, data on such microscopic eggs are hard to find. According to the 1994 review, a tiny parasitoid fly called Clemelis pullata has the smallest eggs known. They measure 0.027mm by 0.02mm.

However, nobody has yet studied the sex cells of miniature parasitic wasps known as fairyflies. These minuscule insects are some of the smallest in the world, often measuring just 0.5 to 1mm long.

On the whole, it seems likely that their eggs are pretty small.

Join over six million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the BBC Earth email newsletter.