The anus in an earthworm serves as the exit point of its digestive system, expelling processed waste known as castings from the body’s final segment. While that sounds simple, the anus plays a surprisingly important role in both the earthworm’s biology and the health of the soil it lives in. It also sits in a region of the body involved in the worm’s growth.
Where the Anus Is Located
An earthworm’s body is made up of repeating ring-like segments. The very last segment, called the pygidium, houses the anus. The digestive tract runs the entire length of the worm, starting with the mouth at the front segment (the peristomium) and ending at the anus in the pygidium at the tail end. Food travels through the pharynx, esophagus, crop, gizzard, and intestine before the leftover material is pushed out through the anus as waste.
How It Fits Into Digestion
An earthworm eats by swallowing soil and decomposing organic matter, like dead leaves and plant roots. The gizzard grinds this material using tiny grains of sand and grit the worm has swallowed. The intestine then absorbs the nutrients the worm needs. What remains, a mix of processed soil and organic residue, continues through the gut and exits the body through the anus as small pellet-like deposits called worm casts.
This process is continuous. Earthworms eat and excrete constantly as they burrow, meaning the anus is essentially always at work pushing out material. Because the digestive tract is a straight tube from mouth to anus with no branching, waste moves in one direction only, making the system efficient for an animal that lives inside its own food source.
What Comes Out: Worm Castings
The waste expelled through the anus is far from garbage. Earthworm castings are richer in nutrients than the surrounding soil. Analysis of castings shows they contain high levels of iron, sulfur, calcium, nitrogen, phosphorus, and potassium, with a fertilizer-grade NPK rating of roughly 5-5-3. The digestive process concentrates these nutrients and makes them more accessible to plant roots.
As the USDA puts it, what goes in comes out much better. The earthworm’s gut is a moist, microbe-rich environment, and as soil passes through it, beneficial bacteria multiply and organic carbon is broken down into forms that improve soil structure. The anus deposits this enriched material directly into the burrow or onto the soil surface, where it mixes with the surrounding earth.
Why Castings Matter for Soil
The act of eating soil at one end and depositing castings at the other is one of the most important things earthworms do for ecosystems. As worms burrow and excrete, they move and mix nutrients between soil layers. The tunnels they leave behind improve aeration and water drainage, while the castings themselves act as a slow-release fertilizer that binds soil particles together into stable clumps.
Carbon processed through the earthworm’s gut is a key building block of well-structured soil, according to USDA soil scientist Amanda Ashworth. Soils with healthy earthworm populations tend to hold more water, resist erosion better, and support stronger plant growth, all partly because of the steady stream of enriched waste deposited through millions of tiny earthworm anuses across a landscape.
Role in Growth and Segment Formation
The pygidium, where the anus sits, also has a developmental function. When an earthworm grows, new body segments are not added at the tail tip or the head. Instead, they form just in front of the pygidium, in a zone of actively dividing cells. The anus and its surrounding segment essentially stay in place at the very end of the body while new segments are inserted ahead of it, pushing the pygidium backward as the worm lengthens. This means the anus marks the oldest part of the worm’s posterior body, even as the animal continues to grow throughout its life.

