What Causes Toenail Fungus? Sources and Risk Factors

Toe fungus is caused by microscopic fungi that feed on keratin, the tough protein your nails are made of. Dermatophytes, a group of fungi specially adapted to break down keratin, are responsible for about 90% of toenail infections. The rest are caused by yeasts and environmental molds. But the fungus itself is only half the story. Whether an infection actually takes hold depends on a combination of how you’re exposed, the conditions your feet live in, and how well your body fights it off.

The Fungi Behind the Infection

One species dominates: Trichophyton rubrum, the single most common cause of toenail fungus worldwide. A related species, Trichophyton mentagrophytes, is the next most frequent culprit. Both are dermatophytes, meaning they produce enzymes that dissolve keratin and allow the fungus to burrow into the nail plate, using it as both a home and a food source.

The remaining 10% of cases come from non-dermatophyte molds (about 8%) and yeast (about 2%). Mold infections are almost exclusively found in toenails rather than fingernails. These organisms are less specialized at attacking keratin but can still colonize nails that are already damaged or weakened.

How the Fungus Gets In

Fungi don’t bore through a healthy, intact nail very easily. They need an entry point. The most common route is through the free edge of the nail, where the tip meets the nail bed. From there, the fungus works its way backward toward the cuticle. In some cases, it enters from the opposite direction, invading near the cuticle and growing outward. Either way, any gap or disruption in the nail’s structure makes the job easier.

That’s why nail trauma is one of the strongest risk factors. This doesn’t have to be a dramatic injury. Stubbing your toe, wearing shoes that press against your nails, running long distances, or even getting an aggressive pedicure can create micro-damage that compromises the nail’s natural barrier. Runners and athletes are especially prone to this kind of repetitive, low-grade trauma.

Where You Pick It Up

The fungi that cause toenail infections thrive in warm, damp environments. Public swimming pools, gym showers, locker rooms, and communal changing areas are classic transmission sites. Research on public pool facilities found that dressing room floors were by far the most contaminated surface, with fungal particles shed by infected people who walk barefoot. Pool edges and foot-washing areas also harbored fungi, though less frequently.

Your own household can be a source of infection too. Studies have found evidence of fungal transmission in 44% to 47% of households where at least one person has a nail infection. The fungus spreads through shared slippers, bathroom floors, carpets, bedding, and nail tools. Even nail polish can carry it: one study showed that the most common dermatophyte species survived in nail polish for 60 days at room temperature. Nail clippers, files, and scissors likely pose a similar risk, though they haven’t been formally studied.

The Environment Inside Your Shoes

Fungi need moisture and warmth to grow. Your shoes create exactly that environment, especially if they’re tight fitting or made of non-breathable materials. Socks trap sweat against the skin, and people who sweat heavily from their feet are at higher risk. Athletes face a compounding effect: occlusive footwear, heavy sweating, repeated nail trauma, and shared facilities all converge.

Switching to moisture-wicking synthetic socks and well-ventilated mesh shoes has been shown to reduce moisture buildup and lower infection risk. Keeping feet dry matters more than most people realize, because a fungus that lands on dry skin is far less likely to establish an infection than one that lands in a warm, soggy shoe.

Age, Circulation, and Immune Function

Toenail fungus affects up to 20% of adults over a lifetime, but it becomes far more common with age. People over 60 have the highest rates. Several things change as you get older: nails grow more slowly (giving fungi more time to establish), blood flow to the extremities decreases, and immune surveillance weakens. A slow-growing nail in a foot with poor circulation is an ideal environment for a fungal colony to settle in.

Diabetes amplifies nearly all of these factors. People with diabetes are up to three times more likely to develop toenail fungus than the general population. High blood sugar damages small blood vessels in the feet, reducing the immune cells that reach the area. It also impairs the function of the white blood cells that would normally fight off a fungal invader. At a deeper level, chronically elevated blood sugar causes changes to the proteins in nail tissue that may actually make it easier for fungi to latch on. Reduced sensation in the feet, common in diabetes, also means minor injuries go unnoticed and untreated, creating more entry points for infection.

Peripheral vascular disease, obesity, and conditions that suppress the immune system (including HIV and immunosuppressive medications) all raise risk through similar mechanisms: less blood flow, fewer immune defenses, or both.

Why Some People Get It and Others Don’t

Almost everyone encounters dermatophytes at some point, yet not everyone develops a nail infection. The difference comes down to how many risk factors overlap. A young, healthy person who walks barefoot in a gym shower might never develop a problem because their immune system clears the fungus before it takes hold, their nails grow fast enough to outpace it, and their feet stay relatively dry.

But stack a few factors together, and the odds shift. An older person with diabetes who wears tight shoes, sweats heavily, and shares a bathroom with someone who already has an infection is facing a very different equation. The fungus has easy entry, a favorable environment, and weakened defenses. That’s why toenail fungus is so common in certain populations and so stubborn once it appears. The nail itself has almost no blood supply, making it a kind of immune blind spot where fungi can persist for years without the body mounting an effective response.

Genetics also play a role. Some people appear to have an inherited susceptibility to dermatophyte infections, which helps explain why toenail fungus runs in certain families beyond just shared bathroom floors.

Preventing Reinfection

Understanding the causes matters most for prevention, especially since toenail fungus has a high recurrence rate even after successful treatment. Keeping feet dry, wearing breathable footwear, and alternating shoes so each pair has time to air out all reduce the moisture fungi depend on. Protecting your feet with sandals or shower shoes in public wet areas cuts off a major transmission route.

At home, avoid sharing nail clippers, files, or footwear with household members. If someone in your household has an active infection, disinfecting shared shower surfaces regularly and avoiding walking barefoot on bathroom floors can reduce the roughly 45% transmission rate that studies have documented. For people with diabetes or circulation problems, keeping nails trimmed short and inspecting feet regularly helps catch early infections before they become deeply entrenched in the nail plate.