What Causes Toenail Fungus and Who Is at Risk?

Toenail fungus is caused by microscopic fungi that feed on keratin, the tough protein your nails are made of. In 80% to 90% of cases, the culprit is a group of fungi called dermatophytes, with one species in particular responsible for the majority of infections. The condition is far more common than most people realize: a 2026 meta-analysis in the Journal of Epidemiology & Community Health estimated global prevalence at nearly 23%.

The Fungi Behind the Infection

Dermatophytes are fungi that have evolved specifically to digest keratin, which makes nails, skin, and hair their ideal food source. Within this group, two species cause most toenail infections. The first and most common thrives in warm, moist environments and is the same organism behind most cases of athlete’s foot. The second tends to cause a more superficial white infection on the nail surface.

Dermatophytes aren’t the only organisms involved. Yeasts account for 2% to 11% of toenail infections and are more commonly associated with fingernail problems. Non-dermatophyte molds make up another 2% to 10% of cases in the general population, though they become the dominant cause in people with weakened immune systems, particularly those living with HIV.

How Fungi Get Into the Nail

The infection process follows a consistent pattern. Fungi first colonize the skin around and beneath the toenail, especially the area where the nail meets the skin at the tip of the toe. From there, they invade the underside of the nail plate, which is the layer in direct contact with the nail bed. This is why most infections start at the free edge of the nail and creep backward toward the cuticle.

Once attached, the fungi produce enzymes that break down the bonds between cells in the nail. This enzymatic attack makes the nail tissue less dense and more porous, creating space for fungal threads (called hyphae) to push deeper into the nail structure. Spores also anchor themselves to the roughened surface. Over time, this process causes the thickening, discoloration, and crumbling that you see on an infected toenail.

Where You Pick It Up

Fungal spores are remarkably hardy and can survive on surfaces for extended periods. The most common places to encounter them are warm, wet, shared environments: pool decks, gym showers, locker room floors, and communal bathing areas. Walking barefoot in these spaces puts your feet in direct contact with spores shed by other people’s infected skin and nails.

Athlete’s foot and toenail fungus are caused by the same organisms, and an existing skin infection on your feet acts as a reservoir. The fungus can spread from the skin between your toes into the nail. This is one of the most common routes of infection and why people with recurring athlete’s foot are at higher risk of developing nail involvement.

Moisture, Shoes, and the Perfect Environment

Fungi need moisture and warmth to grow, and the inside of a shoe provides both. Feet produce significant sweat throughout the day, and closed-toe shoes trap that moisture against the skin and nails. This creates a microclimate that fungi thrive in. The combination of ill-fitting shoes and moisture is considered one of the primary drivers of toenail fungus.

Certain habits make the problem worse. Wearing the same pair of shoes every day without letting them dry out, keeping sweaty socks on after exercise, and regularly applying nail polish without breaks can all trap moisture in and around the nail bed. Synthetic materials that don’t wick moisture away from the foot compound the issue. People who work in jobs requiring heavy boots or steel-toed shoes for long hours are particularly susceptible.

Nail Damage Creates Entry Points

Healthy, intact nails are reasonably good at resisting fungal invasion. But even minor damage to the nail or surrounding skin gives fungi an opening. Repetitive microtrauma is one of the most overlooked causes. Runners, hikers, and athletes in sports that involve sudden stops frequently develop toenail injuries from the nail plate striking the inside of their shoe. These small, repeated impacts damage the nail structure enough to allow fungal entry, and long-term complications of this kind of trauma specifically include secondary fungal infections.

Nail biting, aggressive pedicures, stubbing your toe, or dropping something on your foot can all create similar vulnerabilities. Even the simple act of cutting nails too short or tearing them can leave microscopic breaks that fungi exploit.

Why Age Is the Biggest Risk Factor

Toenail fungus prevalence follows a clear age pattern. It’s rare in children, affecting less than 1% of those under 10. It peaks around age 41 to 50, where roughly 25% of people are affected, and stays elevated in older adults at around 21% for those over 60.

Several biological changes explain this trend. As you age, your nails grow more slowly, giving fungi more time to establish an infection before the nail can grow out and shed the affected tissue. The nail itself changes in thickness, texture, and composition, making it more susceptible to colonization. Blood circulation to the feet decreases with age, which weakens local immune defenses. Older adults are also more likely to have conditions like diabetes and peripheral vascular disease, both of which independently increase the risk. Years of accumulated minor nail trauma add up as well, and existing foot fungus may serve as a persistent reservoir feeding new nail infections.

Other Conditions That Raise Your Risk

Anything that suppresses your immune system makes toenail fungus more likely and harder to clear. Diabetes is one of the most significant risk factors because it affects circulation to the extremities and impairs immune function in the feet. People living with HIV face not only higher infection rates but also a different profile of organisms, with non-dermatophyte molds becoming predominant rather than the typical dermatophyte species.

Psoriasis and other conditions that affect nail structure can mimic or predispose you to fungal infections. Peripheral vascular disease reduces blood flow to the toes, slowing both nail growth and immune response. Even living in close quarters with others, particularly in hot, humid settings, increases transmission risk simply through more frequent exposure to contaminated surfaces.

How Toenail Fungus Is Confirmed

Not every thick or discolored toenail is fungal. Trauma, psoriasis, and other conditions can look nearly identical, which is why confirming the diagnosis before starting treatment matters. The most common office test involves dissolving a nail clipping in a chemical solution and examining it under a microscope to look for fungal elements. This catches about 67% of infections. Fungal culture, where the sample is grown in a lab to identify the exact species, picks up only about 42% of cases because the organisms don’t always survive the collection and transport process.

The most sensitive method is examining a thin slice of the nail under a microscope after special staining, which detects fungal elements in about 93% of true infections. In practice, combining two or three of these methods gives the most reliable answer, which is especially important if initial treatment isn’t working or the nail looks unusual.