This compost calculator works out how to mix a nitrogen-rich “green” and a carbon-rich “brown” to reach the composting sweet spot — a carbon-to-nitrogen ratio near 30:1 — where a pile heats up fast and doesn’t smell like regret.
The Algebra of Rot (the Good Kind)
Microbes eat carbon for energy and nitrogen for protein, in roughly a 30:1 dietary ratio. Too much nitrogen (all grass) and the excess escapes as ammonia — the classic slimy stink pile. Too much carbon (all leaves) and the pile naps for a year. Mixing two materials to a target ratio is weighted-average algebra, which this tool solves on the dry-weight carbon and nitrogen contents of common materials. Part of our Ecology Calculators collection.
Worked Example (Verified)
- Grass clippings + dry leaves, target 30:1 (defaults): the solver lands on 50% green : 50% brown by dry weight (a 10 kg batch = 5 kg + 5 kg) — because grass (C 48%, N 2.4%) and leaves (C 48%, N 0.8%) share similar carbon, and 48 ÷ (0.8 + 1.6×0.5) = 30 exactly
- Fresh grass is ~75% water, so 5 kg dry means roughly 20 kg of fresh clippings — the bucket-count translation that surprises every first composter
- Coffee grounds surprise people: at ~17:1 they’re a green despite being brown in color — compost colors lie; chemistry doesn’t
- Sawdust pairings push the brown share tiny (a few % by weight can swing a mix) — carbon-dense materials are potent; add them like spice
Pile Management Beyond the Ratio
- Size matters: a pile needs ~1 m³ of mass to insulate its own heat; small bins compost slowly and that’s okay.
- The thermometer verdict: 55–65 °C core temperature = the hot zone that kills weed seeds and pathogens; below 40 °C it’s a cold pile on a long timeline.
- Smell diagnostics: ammonia = too much green (add browns); sour/anaerobic = too wet/compacted (add chunky browns, turn); nothing at all = too dry or too carbon-heavy.
- Finished compost loses 50–70% of the starting volume — plan bin space and expectations accordingly.
Related Tools
- Garden Soil Calculator — where the finished compost gets blended in
- Plant Spacing Calculator — beds the compost feeds
- Ecology Calculators — the full collection
Frequently Asked Questions
What is the ideal C:N ratio for compost?
Around 25–30:1 at build time. Microbes consume carbon faster than nitrogen as they work, so a pile started at 30:1 finishes near 10–15:1 in the cured compost. This calculator mixes two materials to any target you set, defaulting to the classic 30:1.
Are coffee grounds a green or a brown?
A green — spent grounds run about 17–20:1 C:N with ~2% nitrogen, despite their color. The green/brown labels describe nitrogen content, not appearance: if it’s moist, fresh and protein-bearing (grass, scraps, manure, grounds) it’s a green; dry and woody (leaves, straw, paper) means brown.
Why does my compost smell like ammonia?
Too much nitrogen for the available carbon — the surplus escapes as ammonia gas (and your nitrogen literally floats away). Fork in browns (leaves, shredded paper) until the mix approaches the ratio this calculator suggests, and turn to restore air.
Can I compost with just leaves?
Yes, slowly — leaf mold is its own venerable product (1–2 years, fungal-driven, excellent soil conditioner). But without a nitrogen source it won’t heat or move at compost speed. Even a few kg of grass clippings or coffee grounds per bin transforms the timeline.
Does the mix ratio use fresh or dry weight?
Dry weight — water contributes neither carbon nor nitrogen but dominates fresh weights (grass is ~75% water, scraps ~80%). The calculator’s amounts say so explicitly; the practical shortcut is that fresh greens count for roughly a quarter of their scale weight in the mix.
Is this compost calculator free?
Yes — free, instant, no sign-up.