What happens inside a compost pile

Composting is a controlled rot. You pile up organic waste—food scraps, leaves, grass clippings, paper—and microorganisms (bacteria and fungi) break it down into a dark, crumbly material called humus that you can mix into soil. The process works because those organisms need three things: carbon (from dry materials like leaves and cardboard), nitrogen (from wet materials like food scraps and grass), and oxygen (from air moving through the pile). When you get the balance right, the pile heats up as microbes work, and in a few months to a year, you have finished compost.

The heat is a sign the system is working. A hot pile—one that reaches 130°F or higher in the center—breaks down material faster and kills weed seeds and harmful pathogens. A cold pile (room temperature or cooler) still composts, but it takes longer, sometimes a year or more. Both routes produce the same end product; hot composting is just faster.

Key Takeaways

  • Compost needs a mix of carbon-rich dry materials (leaves, cardboard) and nitrogen-rich wet materials (food scraps, grass) in roughly a 3-to-1 ratio by volume.
  • Oxygen is essential, so you need to turn the pile every week or two for hot composting, or leave it undisturbed for cold composting, which takes longer.
  • A hot pile reaches 130°F or higher and finishes in two to six months; a cold pile stays at room temperature and takes six months to two years.
  • Finished compost is dark, crumbly, and smells earthy; if your pile still smells like rotting food or ammonia, it needs more carbon or air.

Carbon and nitrogen: the fuel ratio

Microbes need carbon and nitrogen in roughly a 3-to-1 ratio by volume. Carbon comes from dry, brown materials: fallen leaves, shredded newspaper, cardboard, wood chips, straw, and sawdust. Nitrogen comes from wet, green materials: grass clippings, food scraps (vegetables, fruit, coffee grounds, eggshells), plant trimmings, and fresh manure from herbivores like horses or chickens.

If your pile is too wet and smells like ammonia or rotting eggs, you have too much nitrogen. Add more carbon—shredded leaves or cardboard will absorb moisture and feed the microbes a slower diet. If your pile is dry and not heating up, you have too much carbon. Add nitrogen-rich material or water to speed decomposition. The smell tells you what is wrong: ammonia means excess nitrogen; musty or earthy means the pile is balanced.

Do not compost meat, dairy, oils, or pet waste. These either attract pests or introduce pathogens that cold composting does not kill. Diseased plants and weeds with seeds should go in a hot pile only, where the heat destroys them.

How oxygen keeps the pile alive

Microbes that break down compost need oxygen. Without it, anaerobic bacteria take over, and your pile smells like a swamp. Oxygen reaches the center of the pile through air pockets between materials, so the structure of what you pile matters.

For hot composting, turn the pile every week or two with a pitchfork or shovel. Turning mixes materials, brings cooler outside material to the hot center, and lets fresh air in. Each turn speeds decomposition and raises the temperature again. For cold composting, you do not turn the pile at all—you just let it sit. Decomposition happens more slowly because oxygen diffuses in naturally, but you get finished compost eventually with almost no work.

Some people use a compost bin with air vents or a tumbler (a barrel you rotate by hand) to manage oxygen without turning. These work, but they are not necessary. A straightforward pile on the ground works fine if you turn it or leave it undisturbed, depending on which method you choose.

The stages of decomposition

Composting happens in overlapping phases. In the first week or two, mesophilic bacteria (the ones that work at room temperature) colonize the pile and begin breaking down straightforward-to-digest material. The pile may warm slightly. After a few days to a week, if you have the ratio right, thermophilic bacteria take over and the pile heats up rapidly—this is the hot phase.

During the hot phase, which lasts weeks to months depending on pile size and how often you turn it, the pile breaks down most of the material. Temperature peaks and then drops as material becomes harder to digest. When the pile cools, mesophilic bacteria and fungi return and finish the job, breaking down tougher stuff like woody material and cellulose. This cooling phase can take weeks to months.

Finished compost looks dark brown or black, crumbles in your hand, and smells like soil after rain. You should not see the original materials—they are unrecognizable. If you still see leaves or food scraps, the pile is not done. Sift out the unfinished material and return it to a new pile, or just use the finished portion and let the rest keep breaking down.

Pile size and location matter

A pile needs to be at least 3 feet by 3 feet by 3 feet to hold enough material and generate heat. Smaller piles compost more slowly because they do not heat up as much. Larger piles (4 feet by 4 feet by 4 feet or bigger) heat faster and stay hot longer, but they are harder to turn.

Place your pile on bare ground, not on concrete or wood, so organisms from the soil can move in and water can drain. Choose a spot with partial shade—full sun can dry the pile out, and full shade may keep it too wet. Make sure air can flow around it. If you live in a wet climate, a bin with a lid helps shed rain; in a dry climate, a pile in the open is fine.

Troubleshooting common problems

Pile smells like ammonia or rotten eggs: Too much nitrogen. Add carbon (leaves, cardboard, wood chips) and turn the pile to introduce air. The smell should fade within a few days.

Pile is not heating up: Either too much carbon, not enough nitrogen, or not enough moisture. Add nitrogen-rich material (grass, food scraps) and water until the pile feels like a wrung-out sponge. If it still does not heat, you may have a cold-composting pile, which is fine—it just takes longer.

Pile attracts flies or rodents: You are composting meat, dairy, or oils, or you buried food scraps too shallowly. Bury food scraps 8 to 12 inches deep in the center of the pile, away from the edges. Do not compost meat or dairy. If pests are already there, turn the pile to bury exposed food and raise the temperature.

Pile is soggy and not decomposing: Too much moisture or not enough air. Add carbon (leaves, cardboard) to absorb water and turn the pile to introduce oxygen. If water is pooling, improve drainage by moving the pile or adding a layer of sticks at the base.

When your compost is ready to use

Finished compost is ready when it is dark, crumbly, and you cannot identify the original materials. It should smell earthy, not sour or ammonia-like. Mix it into garden beds at a depth of 2 to 4 inches, or use it as mulch around plants. You can also brew it into compost tea by soaking finished compost in water for a day or two, then straining and using the liquid to water plants.

If your pile is still producing heat or you see unfinished material, let it sit longer or sift out the finished portion and return the rest to a new pile. There is no penalty for waiting—compost does not go bad. Some people keep adding to the same pile year-round, pulling finished compost from the bottom while fresh material goes on top.

Frequently Asked Questions

Can I compost in an apartment or small space?

Yes. A small bin (12 to 18 inches on a side) works for food scraps if you add shredded paper or cardboard and turn it weekly. Vermicomposting (using worms in a shallow bin) also works indoors and produces finished compost in two to three months. Both methods are odor-free if managed correctly.

How long does composting actually take?

Hot composting with regular turning takes two to six months. Cold composting takes six months to two years. The difference depends on pile size, how often you turn it, temperature, and the mix of materials. Smaller piles and colder climates take longer.

Do I need to buy a special bin or tumbler?

No. A pile on the ground works fine. Bins and tumblers are convenient if you have limited space or want to keep pests out, but they are not necessary. A straightforward three-sided enclosure made from pallets or wire fencing costs almost nothing.

What if my compost pile smells bad?

Smell means the balance is off. Ammonia or rotten-egg smell means too much nitrogen—add dry leaves or cardboard and turn the pile. Musty or earthy smell means it is working correctly. Sour smell means too much moisture—add carbon and improve air flow.

Can I use finished compost right away, or does it need to cure?

You can use it right away. Some people let finished compost sit for a month or two before using it, but this is optional. If you are using it on seedlings or very young plants, letting it age slightly reduces the risk of nitrogen burn, but mature plants tolerate fresh compost fine.