Compost Calculator: C:N Ratio, Moisture and How Many Browns to Add
By FindMySum · Last reviewed
A compost pile is a microbial kitchen, and like any recipe it works best with the right proportions. The two that matter most are the carbon-to-nitrogen ratio (C:N) and the moisture. This compost calculator takes up to four materials and their weights, works out both for the mix, and tells you how much of one material to add or take out to hit a target ratio, plus how much water a dry pile needs.
Why carbon and nitrogen
The bacteria and fungi that break down organic matter use carbon for energy and to build their cells, and nitrogen for proteins. They need roughly 25 to 30 times as much carbon as nitrogen. With too little carbon (a low C:N, such as a pile of fresh grass clippings), the extra nitrogen escapes as ammonia, the pile smells and you lose nutrients. With too much carbon (a high C:N, such as a pile of dry leaves), the microbes run short of nitrogen and the pile sits there for months.
Gardeners call nitrogen-rich materials greens and carbon-rich ones browns, but the colour is only a hint. Fresh manure is brown and a green; straw is yellow and a brown.
How the calculator works
The Cornell Waste Management Institute's formula weighs each material's carbon and nitrogen by how much dry matter it contributes:
C:N of the mix = Σ (mass × %N × C:N × (100 − moisture)) ÷ Σ (mass × %N × (100 − moisture))
Each material's nitrogen and C:N come from Table A.1 of the On-Farm Composting Handbook, which lists typical values gathered from many studies. Moisture is a simple weighted average of the wet weights.
To balance the mix, the calculator holds every row except one fixed and solves for the weight of that row that gives your target ratio. If the material you chose is on the same side of the target as everything else (for example, trying to fix a nitrogen-heavy mix by adding more grass), no amount of it works, and the page says so.
Worked example: the default mix
The default is 10 kg of vegetable and fruit scraps, 10 kg of grass clippings and 5 kg of leaves:
- Vegetable scraps: 2.7% nitrogen, 19:1, 87% water
- Grass clippings: 3.4% nitrogen, 17:1, 82% water
- Leaves: 0.9% nitrogen, 54:1, 38% water
Only 6.2 kg of the 25 kg is dry matter. The mix comes out at 25.9:1, a little low, and 75.2% moisture, which is too wet. Holding the scraps and grass fixed, 8.8 kg of leaves (3.8 kg more) brings it to 30:1, and the extra dry leaves also bring the moisture down. The table shows each material's share of the nitrogen: here the grass supplies most of it.
The Cornell grass and leaves example
Cornell's own worked example mixes 10 kg of grass clippings (2.4% nitrogen, 45% carbon, 77% moisture) with leaves (0.75% nitrogen, 50% carbon, 35% moisture). For 30:1 you need 3.5 kg of leaves, but that mix is still over 66% water. For 60% moisture you need 6.8 kg of leaves, which pushes the ratio to a little under 37:1. Both answers are acceptable; real recipes are a compromise between the two targets, which is why the calculator shows both. You can reproduce the example with the two custom rows under the advanced options.
Getting moisture right
Microbes live in the thin film of water around each particle, so a dry pile stalls. A waterlogged one fills the gaps with water instead of air, turns anaerobic and smells. The handbook's preferred range is 50–60% by weight. In the hand, that is a wrung-out sponge.
If your mix is too dry, the calculator gives the water to add (in litres for a kilogram mix; a litre of water weighs a kilogram). If it is too wet, it gives the weight of your balancing material that would bring it down, provided that material is drier than the target. Wet greens and dry browns pull in opposite directions on both targets, so a mix that is too wet is usually also short of carbon.
Volume and pile size
The handbook lists loose bulk densities for most materials, and the calculator uses them to estimate the volume of your pile before it settles. Leaves are light (around 200 lb per cubic yard loose), so 5 kg of leaves takes much more room than 10 kg of food scraps. A backyard pile needs about a cubic metre to hold its heat; smaller piles still compost, but slowly and without killing weed seeds. Straw, food waste and corn stalks have no bulk density in the table, so they are left out of the volume and the page says which.
Limits of the numbers
The values in the table are averages, and real materials vary a lot: grass clippings range from 9:1 to 25:1 depending on the lawn and the season. Woody materials also hold carbon in forms microbes can't use quickly, so a sawdust or wood chip mix behaves as if its C:N were lower than calculated. Use the result as a starting recipe, then adjust by feel and smell. For farm-scale composting, a lab analysis of your own materials is worth the cost.
Related calculators
For the volume of soil, mulch or compost to cover a bed, use the mulch, gravel and soil calculator. The rainwater harvesting calculator sizes a barrel to keep the pile and garden watered, and the grass seed calculator covers the lawn that supplies the clippings.
More questions
Is the C:N ratio by weight or by volume?
By weight, and on a dry basis: carbon and nitrogen are measured as a percentage of dry matter, and a ratio of 30:1 means 30 g of carbon for every gram of nitrogen. Volume rules of thumb such as 'two or three buckets of browns per bucket of greens' only work because leaves and straw are fluffy and light; they say nothing about the chemistry.
Why does my compost smell of ammonia?
Too much nitrogen for the carbon available, often a pile heavy in grass clippings, food scraps or chicken manure. The surplus nitrogen leaves as ammonia gas, which wastes it as a nutrient. Mix in a carbon-rich brown such as leaves, straw, shredded cardboard or sawdust and turn the pile.
Why is my compost pile not heating up?
The usual causes are too little nitrogen (a C:N ratio well above 40:1), too little water, or a pile too small to hold its heat. Check the mix in the calculator, add greens or water as it suggests, and build the pile to at least about a cubic metre.
Is sawdust a good brown?
In small amounts. It is very carbon-rich (about 442:1 in the handbook's table) and much of its carbon is in lignin that breaks down slowly, so a mix that looks balanced on paper composts as if it had less carbon. Use it in thin layers, keep it under about a quarter of the mix by weight, and avoid sawdust from treated wood.
Can I put dog or cat waste in my compost?
Not in a home pile used for food crops. Pet waste can carry parasites and pathogens that a backyard pile does not get hot enough to kill. Municipal guidance in Canada and the US generally says to keep it out of backyard compost.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.