A recent study of the Upper East Side confirms what some New Yorkers have long practiced: Take off your shoes before entering your home, or you risk carrying in a buttload of germs.

The study, which was recently published in the journal Indoor and Built Environment, shows the Upper East Side isn’t only home to museums and soon-to-be-demolished hot dog restaurants — but also approximately 31,000 fecal bacteria per travel-sized bottle of street puddle water.

A student and professor team from the neighborhood’s Marymount Manhattan College made this discovery by counting the number of enterococci bacteria in samples taken from sidewalks, carpets and uncarpeted floors around the small undergraduate campus. These intestinal microbes are considered “fecal indicator bacteria” — in other words, if you detect them in water or on a surface, someone or something has probably pooped there or carried poop there.

In addition to the sidewalk contamination, the pair of researchers found high concentrations of the fecal bacteria on student volunteers’ shoe soles and on carpets in highly trafficked areas. Uncarpeted floors and quieter parts of the campus, meanwhile, were markedly less disgusting.

Alessandra Leri, a chemistry professor at Marymount and the study's co-author, said the findings won’t surprise most New Yorkers. But they’re a strong argument for leaving your outside shoes at the door when you get home.

Last year, city officials promised a crackdown on failures to remove canine waste. But New Yorkers still logged more than 2,000 complaints via 311.

“Taking your shoes off is a no-brainer,” she said. “Shoe soles are disgusting.”

The findings also speak to New York City’s long battle against the scourge of unscooped dog poop. Failure to remove canine waste is technically a violation of state law, and negligent non-scoopers face a $250 fine. Last year, city officials promised a crackdown — but New Yorkers have still logged more than 2,000 complaints via the 311 hotline about forsaken feces in the last year alone, city data shows.

“It is dirty outside,” said Harris Theophanous, who spoke to Gothamist this week while walking his dog, a Shih Tzu named Lulu, a block from the Marymount campus.

How the fecal germs were spotted

For the study, Leri and her undergraduate research partner Marjan Khan borrowed a technique from water quality assessment, which uses enterococci concentration as a proxy measure for other nasty fecal microbes, like E. coli. (The city’s health department uses a comparable approach to determine if beaches and waterways are safe for swimming.)

The testing method requires a liquid sample, so the researchers used pipettes — handheld devices that suck up small amounts of liquid — to collect water from sidewalk puddles near the Marymount campus. They specifically focused on parts of the sidewalk that weren’t visibly soiled, Leri said.

“There was a lot of crouching on the sidewalk with sterile pipettes,” she added.

The researchers created a cartoon to accompany their new fecal bacteria study. The diagram shows how poop bacteria spreads from the street to the indoor environment.

For the indoor portion of the study, Khan and Leri used bits of clear tape to pull up samples from various floors throughout the school building, then bathed them in sterile water to extract the bacteria. Khan even convinced a handful of student volunteers to let her borrow their shoes for 10 or 15 minutes, so she could sluice off bacterial samples with a tub of sterile liquid.

Khan and Leri let the bacteria feast on fluorescent nutrients, which made the enterococci light up like Christmas trees. After letting the specimens rest overnight, the researchers counted up the number of bright spots.

The researchers found about 22,000 enterococci per square meter of carpeted entryway floor on average, compared to just 100 of the germs per square meter of uncarpeted floor in the same area.

The bacteria were less plentiful, and the differences less dramatic, in lower-traffic areas like conference rooms. Leri and Khan only counted three enterococci per square meter of uncarpeted conference room floor, for example. Shoe soles ranged widely, from 15 to 2,000-plus enterococci per 100 milliliters of shoe juice.

“Right by the entryway was a major reservoir of fecal pathogens,” Leri said “Makes sense, right? People wipe their feet off on that entryway carpet.”

Theodore Muth, a biology professor at Brooklyn College who wasn’t involved in the study, noted that contaminated carpets don’t necessarily translate to increased risk of bacterial illness.

“In most cases people are getting infected with E. coli from contaminated food, not from floors, sidewalks or soles of shoes,” he said.

Still, the news was distressing, if not surprising, to Robin Walker, an Upper East Sider strolling leisurely on Second Avenue this week with a fuzzy black terrier in tow.

“Of course there is,” she said when told about the presence of poop bacteria on the streets of her neighborhood. “How could there not be?”

Walker said she regularly removed her own shoes indoors, but disliked being asked by others to do the same — enterococci be damned.

“You know, you wanna wear your shoes,” she said. “It goes with your outfit.”