Flush a toilet on Earth and gravity does the hard part: everything falls, neatly, away from you. Now take gravity out of the room. In orbit nothing falls. It just floats, in whatever direction it was already heading. That turns one of the most ordinary acts of being alive into a genuine engineering problem, and it explains why NASA has spent decades, and tens of millions of dollars, perfecting the space toilet.

The whole trick is airflow instead of gravity

Here's how astronauts poop in space: they use a toilet that swaps gravity for suction. The current model, the Universal Waste Management System, sits on the International Space Station and uses fans to pull a stream of air, and everything in it, away from the body and into a sealed container (NASA). The airflow even switches on automatically when the lid lifts, which keeps odors from drifting off into the cabin. No water swirling in a bowl. Just a steady, carefully tuned breeze doing the job gravity does down here.

There are two parts, because there are two jobs. Liquid waste goes into a specially shaped funnel on the end of a hose; solid waste goes onto a small seat, the recognizable toilet part. Both can be used at the same time, a feature NASA added after feedback from female astronauts.

Staying put is half the battle

On Earth you sit down and your own weight holds you in place. In microgravity, sitting on anything just bounces you gently back off it. So the space toilet comes with foot restraints and handholds to lock the astronaut in position (NASA). And the opening is small, far smaller than a household toilet's, because the suction only works with a tight seal and good aim. New astronauts actually train for this on the ground, practicing alignment before they ever leave the planet. The newest toilet is 65 percent smaller and 40 percent lighter than the station's old one, and much of that redesign came down to comfort, because when a crew lives somewhere for six months, the bathroom matters.

Your pee comes back as coffee

This is where it stops being gross and starts being genuinely clever. On the space station almost nothing is wasted, because hauling water up from Earth is brutally expensive. So the urine doesn't get thrown out. It's pumped into a recycling system that also captures sweat and the humidity from the crew's breath, distills it, and purifies it back into clean drinking water. The latest version recovers about 98 percent of all the water on board (NASA). NASA's own engineers describe the result with a line that's hard to forget: today's coffee is tomorrow's coffee. The water in an astronaut's cup has, more likely than not, been through a crewmate already.

Where the rest of it ends up

Solid waste can't be turned into anything useful, so it takes a different and frankly spectacular route. Each deposit is compacted and sealed into a removable canister, and the canisters are stored until a cargo resupply ship is ready to leave. When that ship undocks and is steered back toward Earth, it doesn't land. It plunges into the upper atmosphere and burns up completely, canisters and all (Canadian Space Agency).

So the next time you catch a streak of light crossing the night sky and go to make a wish on it, consider the possibility. A few of those brief, burning trails really are spacecraft packed with human waste, ending their orbit in a flash of fire. We spend a fortune solving a problem toddlers struggle with, and the solution turns the least dignified part of spaceflight into, of all things, a shooting star.

Keep wondering: life off the planet rearranges everything you take for granted, from how astronauts sleep strapped to a wall to why they come home taller, and even what space smells like once they're back inside.