Science August 15, 2026

How Does Composting Work?

A 6-minute read

Your kitchen scraps don't just rot. They undergo one of nature's most elegant industrial processes, powered by billions of microorganisms that transform waste into some of the richest soil on earth.

Your banana peel does not become soil overnight. But given the right conditions, and in the presence of the right microorganisms, it will eventually get there. The process is not glamorous. It happens quietly, at scale, below the surface of almost every forest floor and garden bed on earth. And it is one of the most efficient recycling systems nature ever devised.

Composting is the controlled biological decomposition of organic matter into a stable, soil-like material called humus. It is not the same as rotting. Rotting is chaotic anaerobic decomposition that produces methane and foul-smelling compounds. Composting is aerobic: it requires oxygen, and the microorganisms that drive it exhale carbon dioxide and water vapor instead. The result is not waste. It is one of the most nutrient-dense soil amendments available to gardeners and farmers.

The short answer

Composting is a managed process in which bacteria, fungi, and other microorganisms break down organic materials like food scraps and yard waste. These microorganisms consume carbon for energy and nitrogen for growth, and they work best in a well-aerated environment with a moisture level roughly equivalent to a wrung-out sponge. The process generates heat, progresses through distinct temperature stages, and takes anywhere from weeks to months to produce finished compost.

The full picture

The microbial workforce

The engine of composting is not one organism but thousands. Bacteria are the primary decomposers, particularly during the initial high-temperature phase. Fungi, including saprophytic mushrooms and molds, colonize later and break down tougher materials like woody stems and cellulose. Actinomycetes, which look like fungal threads but behave like bacteria, decompose compounds like chitin (the material in insect shells) that most other organisms cannot touch. Protozoa and nematodes prey on the bacteria and fungi, releasing nutrients in forms that plants can absorb.

Each group operates optimally at different temperatures, which is why the composting process changes character over time.

The four stages of decomposition

The composting process unfolds in a predictable sequence that skilled composters learn to read.

Mesophilic phase: The pile begins at ambient temperature, but microbial activity kicks in quickly. Mesophilic (moderate-temperature) bacteria get to work first, consuming the easiest compounds: sugars, starches, and proteins. As they multiply, their metabolic heat raises the pile temperature into the 20-40 degrees Celsius range (68-104 Fahrenheit). This phase typically lasts a few days.

Thermophilic phase: At temperatures above 40 degrees Celsius (104 Fahrenheit), thermophilic (heat-loving) bacteria take over. These organisms generate extraordinary heat, pushing the pile to 55-65 degrees Celsius (131-150 Fahrenheit). At these temperatures, pathogenic bacteria from meat, dairy, or diseased plants are killed. The thermophilic phase is what separates true composting from simple rotting. This stage can last several days to a few weeks depending on how well the pile is managed.

Cooling phase: As the easily decomposable materials are exhausted, temperatures drop back into the mesophilic range. Fungi and actinomycetes become more active, targeting the more resistant compounds: cellulose, hemicellulose, and lignin. This is a slower phase that can last weeks.

Curing phase: The final stage involves stabilization. The material becomes dark, crumbly, and earthy-smelling. Fully cured compost should feel like a moist, rich soil and should not heat up again when rewetted. This stage typically lasts two to four weeks.

The carbon-to-nitrogen ratio

Carbon is the energy source for microorganisms. Nitrogen is essential for building proteins and reproducing. The balance between them, expressed as the C:N ratio, is the single most important factor in composting speed and quality.

The ideal ratio is roughly 25-30 parts carbon to 1 part nitrogen by weight. Most home composters achieve this by mixing two types of materials.

Browns are carbon-heavy materials: dried leaves, straw, wood chips, cardboard, paper, and sawdust. They provide energy but decompose slowly.

Greens are nitrogen-rich materials: food scraps, grass clippings, coffee grounds, and fresh plant material. They decompose quickly and feed the microbial population.

A common mistake is overloading with greens, which creates a slimy, anaerobic, foul-smelling pile. Too many browns, and decomposition slows to a crawl. A practical ratio for a backyard bin is roughly three parts browns to one part greens by volume.

What controls the speed

Beyond the C:N ratio, three other factors determine how fast composting happens.

Oxygen: Aerobic decomposition is roughly twenty times faster than anaerobic. Turning the pile with a fork or adding bulking agents like coarse wood chips introduces oxygen. Commercial operations often use forced aeriation.

Moisture: Microorganisms need water to function, but not too much. The sweet spot is 50-60% moisture content by weight. Below 40%, activity slows dramatically. Above 70%, water displaces air and anaerobic conditions take over.

Particle size: Smaller particles expose more surface area to microbial attack. Chipping or shredding branches and woody materials dramatically accelerates the process. Oversized materials slow decomposition.

Vermicomposting: worms as the workforce

Vermicomposting uses earthworms, primarily red wigglers (Eisenia fetida), instead of (or alongside) bacterial decomposition. Worms ingest organic matter and excrete it in a form that is already partially digested and rich in beneficial microorganisms. The resulting material, called worm castings, is exceptionally nutrient-dense and contains plant-growth hormones produced by the worms’ digestive system. Research published in Biology and Fertility of Soils has documented the microbial diversity and plant-growth benefits of vermicompost in controlled trials.

Red wigglers are not the same as nightcrawlers. They are surface-dwelling worms that thrive in the top 20 centimeters of soil and tolerate the warm, moist conditions of a compost bin. They cannot burrow into ordinary garden soil, which is why vermicomposting requires a dedicated system.

Why it matters

The EPA estimates that roughly 30% of the material Americans throw in the trash could be composted instead. Food scraps and yard waste together represent the largest fraction of landfill-bound waste. When this material decomposes in a landfill, it undergoes anaerobic decomposition and produces methane, a greenhouse gas roughly 25 times more potent than carbon dioxide over a 100-year period. Composting eliminates methane production entirely.

For gardeners and farmers, the appeal is simpler: finished compost is one of the most effective soil amendments available. It improves soil structure, increases water retention in sandy soils and drainage in clay soils, provides a slow-release source of nitrogen and phosphorus, and introduces beneficial microorganisms that suppress plant diseases. A single cubic yard of compost applied to 100 square feet of garden can supply most of a season’s nutritional needs for vegetables.

Common misconceptions

“Composting is just letting things rot.” Rotting and composting look similar but are fundamentally different processes. Anaerobic rotting produces methane, hydrogen sulfide, and other foul compounds. Aerobic composting produces carbon dioxide, water vapor, and stable humus. The distinction matters: a properly managed compost pile should smell like earth, not like garbage.

“Composting is too complicated or takes too much work.” There are management-intensive methods, but at its simplest, composting requires only layering greens and browns, keeping the pile moist, and occasionally turning it. Even with minimal intervention, a backyard pile will eventually produce usable compost, though it may take a full season instead of a few weeks. The effort required is far less than most people assume.

“Composting attracts pests like rats and flies.” Properly managed compost does not attract pests. The key is avoiding meat, dairy, and oily foods, which attract rats and cause odors. Vegetable scraps, coffee grounds, and yard waste are relatively low-risk. Keeping the pile hot (above 55 degrees Celsius) kills any fly larvae that might develop, and covering fresh food scraps with a layer of browns prevents fruit flies from establishing.

Key terms

Humus: The stable, dark, soil-like end product of composting. Fully decomposed organic matter that resists further rapid decay and improves soil structure and water retention.

C:N ratio: The ratio of carbon to nitrogen in a material or a compost mixture. The target of 25-30:1 represents the balance that allows microorganisms to work efficiently.

Browns: Carbon-rich composting materials like dried leaves, straw, cardboard, and wood chips. They provide energy for microorganisms and give compost its light, airy structure.

Greens: Nitrogen-rich composting materials like food scraps, fresh grass clippings, and coffee grounds. They provide the protein and nutrients that allow microorganisms to reproduce.

Thermophilic phase: The high-temperature stage of composting, typically 40-65 degrees Celsius (104-150 Fahrenheit), driven by heat-loving bacteria. This stage kills pathogens and accelerates decomposition.

Vermicomposting: Composting that uses earthworms, primarily red wigglers, to break down organic matter. Produces worm castings, a nutrient-dense soil amendment.

Curing: The final stage of composting where the material stabilizes and matures. Finished compost is dark, crumbly, and earthy-smelling, and will not reheat when rewetted.