Understanding the compost C:N ratio calculator — concept and principle
The carbon-to-nitrogen (C:N) ratio is the main recipe number in composting. Microbes need carbon for energy and nitrogen to build protein, and they work fastest when the two are in the right proportion. This calculator finds the C:N ratio of a mix of two materials, such as straw or dry leaves (carbon-rich "browns") and grass clippings or food scraps (nitrogen-rich "greens").
How it is calculated
- Mix C:N = Σ(mass × N% × C:N) ÷ Σ(mass × N%)
- mass × N% is the nitrogen in each material; multiplying by its C:N gives its carbon, because C = N × (C:N).
- The mix ratio is total carbon divided by total nitrogen.
Masses should be on the same basis as the nitrogen percentage, ideally dry mass, because water contains neither carbon nor nitrogen.
The principle
Ratios cannot be averaged directly. A material with C:N 60 and one with C:N 15 do not give 37.5 when mixed equally, because the nitrogen-poor material contributes little nitrogen. The correct method converts each material back to absolute amounts of carbon and nitrogen, adds them, and then divides. In effect, each material's C:N is weighted by how much nitrogen it supplies.
Worked example
- Inputs: material 1 = 10 kg, C:N 60, N 0.7%; material 2 = 10 kg, C:N 15, N 2.5%.
- Nitrogen (in % × kg units): 10 × 0.7 = 7 and 10 × 2.5 = 25; total 32.
- Carbon: 7 × 60 = 420 and 25 × 15 = 375; total 795.
- Mix C:N = 795 ÷ 32 = 24.84, i.e. about 25 : 1.
| Material 1 C:N | Mix C:N |
|---|---|
| 15 | 15 |
| 30 | 18.28125 |
| 45 | 21.5625 |
| 60 | 24.84375 |
| 75 | 28.125 |
| 90 | 31.40625 |
| 120 | 37.96875 |
How to read the result
The usual target for an active pile is about 25–30 : 1, and the example sits just at the lower edge. Much above 30–40 : 1, decomposition slows because nitrogen runs out; much below about 20 : 1, surplus nitrogen tends to escape as ammonia and the pile can smell. To raise the ratio, add more carbon-rich material; to lower it, add more nitrogen-rich material. Typical values are roughly 50–80 : 1 for straw, 30–80 : 1 for dry leaves, 12–25 : 1 for grass clippings and 15–25 : 1 for vegetable scraps, but they vary widely.
Common mistakes
- Averaging the two C:N values instead of weighting by nitrogen.
- Using wet mass for one material and dry mass for another.
- Ignoring how available the carbon is: wood chips have a high C:N but decompose slowly.
- Forgetting moisture and aeration, which matter as much as the ratio.
Frequently asked questions
How do I mix to reach exactly 30 : 1?
Increase the carbon-rich material in steps and recalculate until the result reaches 30, or solve the formula for the mass that gives 30.
Is the C:N of finished compost different?
Yes. Carbon is lost as CO₂ during composting, so mature compost usually has a lower ratio, often around 10–20 : 1.
Can I mix more than two materials?
Yes. Add a carbon term and a nitrogen term for each material to the sums.
Sources: R. T. Haug, The Practical Handbook of Compost Engineering, Lewis Publishers, 1993 · Cornell Waste Management Institute, Cornell Composting: Compost Chemistry