This year, you’ve probably been spending more time than you ever expected at home. You might be sharing space with family members, roommates, pets—and an entire universe of microbes. In The Great Indoors: The Surprising Science of How Buildings Shape Our Behavior, Health, and Happiness, science journalist Emily Anthes investigates homes, offices, schools, hospitals, and other places where we live, work, and play. She looks at how the design of our surroundings affects major aspects of our lives, even when we don’t realize it. In this excerpt, she explores the thriving communities of bacteria and fungi with which we share our abodes—and what they reveal about us.

In 2010, microbiologist Noah Fierer made his first foray into the indoor microbial world, cataloging the bacteria present in 12 public restrooms at the University of Colorado Boulder, where he teaches. (Among the findings: The floor and the toilet handles were home to similar kinds of bacteria, suggesting that some bathroom-goers were flushing the toilet with their feet—“a practice well known to germaphobes and those who have had the misfortune of using restrooms that are less than sanitary,” Fierer and his colleagues reported.) The following year, he studied the microbes in residential kitchens and partnered with Rob Dunn to launch the Wild Life of Our Homes project. They began with a small pilot study in North Carolina, recruiting 40 families to run cotton swabs across seven surfaces inside their homes: a countertop, a cutting board, a refrigerator shelf, a pillowcase, a toilet seat, a TV screen, and the trim around an interior doorway.

The homes were crawling with microbial squatters—more than two thousand types, on average. Different locations within the homes formed distinct habitats: kitchens harbored bacteria associated with food, while doorways were covered in species that typically live in leaves and soil. From a microbiological perspective, toilet seats and pillowcases looked strikingly similar; both were dominated by bacteria that typically live on our skin and in our mouths.

Beyond these commonalities, there was a lot of variation among the homes, each of which had its own microbial profile, sheltering a slightly different collection of organisms. But the researchers couldn’t explain why. So Fierer and Dunn launched a second study, asking more than one thousand families living across the United States to swab the dust that had collected on the trim around their interior doorways.

“We focused on that because nobody ever cleans it,” Fierer told me. “Or we don’t clean it very often—maybe you’re an exception.” (I am not.) Because the dust collects over months or years, the duo hoped it would give them the broadest possible look at indoor life, an inventory of the organisms that had floated, crawled, and skittered through the homes over the previous months and years. As Dunn put it: “Each bit of dust is a microhistory of your life.”

Back in the lab, the team analyzed the DNA fragments present in each dust sample, listing every organism that made an appearance. The numbers were staggering. In total, the indoor dust contained DNA from more than 116,000 species of bacteria and 63,000 species of fungi. “The shocker was the diversity of fungi,” Dunn told me. There are fewer than 25,000 species of named fungi in all of North America, which means that our houses could be teeming with organisms that are essentially unknown to science. In fact, when the researchers compared the indoor dust to samples that the volunteers had taken from the trim around an exterior door, they found that there was more microbial diversity inside the homes than outside of them.

Scientific American/Farrar, Straus and Giroux

Some of the species that Fierer and Dunn identified originate outside, hitching rides into our homes on our clothes or drifting in through open windows. (And they may not all be alive by the time they turn up inside; DNA sequencing can identify the organisms that are present in a sample, but it can’t distinguish between living creatures and dead ones.) Other kinds of bacteria actually grow in our homes—in our walls and our pipes, our air conditioning units, and our dishwashers. Some sprout on our houseplants or our food.

And a lot of indoor microbes, it turns out, are living on us. “We’re constantly shedding bacteria from every orifice and body part,” Fierer said. “It’s nothing to be grossed out about. It’s just the way it is.” Our individual microbiomes—the collection of microorganisms that live in and on our bodies—are unique, and we each leave our own microbial signatures on the places we inhabit. In one innovative study, re- searchers tracked three families as they moved into new homes; each family’s distinct blend of microbes colonized its new residence within hours. The scientists—led by Jack Gilbert, a microbial ecologist then at the University of Chicago—could even detect the individual microbial contributions of each family member. “People who spent more time in the kitchen, their microbiome dominated that space,” Gilbert explained. “People who spent more time in the bedroom, their microbiome dominated there. You could start to forensically identify their movement.”

Indeed, the bacteria that turn up inside a home depend enormously on who lives there. Fierer and Dunn found that Lactobacil­lus bacteria, which are a major component of the vaginal microbiome, were most abundant in homes in which women outnumbered men. When men were in the majority, different bacteria thrived: Roseburia, which normally live in the gut, and Corynebacterium and Derma­bacter, which both populate the skin. Corynebacterium is known to occupy the armpit and contribute to body odor. “Maybe it means that men’s houses smell more like armpits,” Dunn ventured. “Microbially, that’s a fair assessment.” The findings may be due to sex differences in skin biology; men tend to have more Corynebacterium on their skin— and to shed more skin microbes into the environment—than women do. (The researchers also acknowledge the possibility that a bachelor pad’s bacterial profile could be the result of “hygiene practices.”) In a subsequent study, Fierer and his colleagues showed that they could accurately predict the sex of the students living in a college dorm room simply by analyzing the bacteria in its dust.

Meanwhile, dogs introduce their own drool and fecal microbes into a home and track soil dwellers in from outside. (Dog owners never seem too bothered when Dunn tells them that Fido is smuggling an entire microbial zoo into their homes. “It’s a pretty fine conversation most of the time,” he told me. On the other hand, he noted, “If I say that every time your neighbor comes over, that he brings over a mix of beneficial microbes and pathogens, it just makes people scrub.”) Cats change a home’s microbial makeup more modestly, perhaps because they are smaller and venture outside less often. Using the dust DNA alone, Fierer and Dunn were able to predict whether a home contained a dog or a cat with roughly 80 to 90 percent accuracy.

While the bacteria in our homes mostly comes from us (and our pets), the fungi are another story. Fungi are much less abundant in our own microbiomes, and our houses are dominated by fungal species that originate outdoors. A home’s fungal signature, Fierer and Dunn found, was largely determined by where it was located. Houses in eastern states had different fungal communities than those in western ones. Ditto homes in humid climates compared with those in dry ones. The geographic correlation was so strong that Fierer and Dunn could use fungal DNA to determine, to within about 150 miles, where a house dust sample originated.

Fierer and Dunn did identify more than 700 kinds of fungi that were more common indoors than out, including a variety of household molds, yeasts, edible mushrooms, and fungi that live on human skin. Homes with basements had different fungi than those without them. And because some species of fungi feed on wood and other building materials, what our homes are made of affects the fungi that live there. “It’s kind of a ‘three pigs’ thing,” Dunn told me. “A stone house feeds different fungi from a wood house from a mud house. Because unlike the bacteria, they’re eating the house.”

Some of the microbes that inhabit our homes are known to cause disease. Black mold, which grows in and on our walls, can trigger allergies and respiratory problems. Aspergillus fumigatus, a fungus that can cause lung infections in people with weakened immune systems, lives in our pillows. Legionella pneumophila, a bacterium that causes Legionnaires’ disease, loves indoor plumbing. It nestles inside hot water tanks, cooling towers, and faucets, and spreads through airborne, or aerosolized, droplets of water. Streptococcus bacteria—which can cause strep throat, sinus and ear infections, pinkeye, meningitis, and pneumonia—are more abundant inside our homes than outside them, Fierer and Dunn found. Though the mere presence of these microbes isn’t necessarily dangerous, and not all strains cause illness, buildings can provide an infrastructure that helps diseases spread. Airborne influenza can waft through an office building’s ventilation system; a spray of Strepto­coccus can turn a doorknob into a booby trap.

But many indoor microbes are completely innocuous, and some may even have lifelong health benefits. In recent decades, the rates of asthma, allergies, and autoimmune diseases have skyrocketed in industrialized nations. Some scientists have theorized that the increasing prevalence of these diseases may be the fault of our modern lifestyles, which keep us at a distance from the robust microbial menageries that surrounded our ancestors for most of human evolution. As a result, our immune systems never get properly trained.

Evidence has been accumulating to support this theory. Studies show that children who live with dogs, which increase the richness and diversity of bacteria in a home, are less sensitive to allergens and less likely to develop asthma. (A dog might be the immune system’s best friend.) Children who grow up on farms, and are exposed to livestock and their microbes, appear to be similarly protected from allergies and asthma.

Some of the most compelling evidence comes from research on two American farming communities: the Amish and the Hutterites. Although the groups have much in common—including large families and Central European ancestry—just 5 percent of Amish kids have asthma, compared to 21 percent of Hutterite children. The communities also have distinct farming customs. The Amish, who generally eschew electricity, live on single-family farms and employ traditional agricultural methods, using horses to plow their fields. It’s not uncommon for Amish children to play in the family barns, which are typically located near their homes. The Hutterites, on the other hand, live together on big, industrial farms, complete with high-tech tools and equipment, and their children have less contact with livestock.

These differences may affect the children’s microbial exposures and the development of their immune systems. In 2016, scientists reported that house dust collected from Amish households had higher levels of endotoxins—molecules contained in the cellular membranes of some bacteria—than dust from Hutterite homes. What’s more, when they drew blood from kids in both communities, they found that compared to Hutterite children, Amish children had more neutrophils, white blood cells that help the body fight infection, and fewer eosinophils, which play a critical role in allergic reactions.

The researchers also whipped up some house-dust cocktails, mixing dust samples from Amish and Hutterite homes with water, and then shooting the slurries into the nasal passages of young mice. Then they exposed the mice to allergens. The mice that had received the Hutterite dust responded as expected; their airways trembled and twitched. But the mice that had received the Amish dust continued to breathe relatively freely, seemingly protected from this allergic response.

Although there’s still a lot to learn, the science suggests that a healthy home is one that’s full of uninvited guests. “We are exposed to microbes every day, and a lot of these are harmless or potentially beneficial,” Fierer told me. “We don’t want a sterile house.” Which is good, because it turns out that I don’t have one.