Compost Calculator
The carbon-to-nitrogen ratio of a compost mix of greens and browns, weighted by the nitrogen each one brings, and how much of the last material reaches a target such as 30:1.
Result…
How it's calculated
%C = %N × C:N Nitrogen of a material = amount × (100 − moisture %) ÷ 100 × N % ÷ 100 · carbon = nitrogen × C:N Mix C:N = Σ carbon ÷ Σ nitrogen Last material for a target R = (C others − R × N others) ÷ (R × N per unit − C per unit)
Microbes in a compost pile use carbon for energy and nitrogen to grow, and Cornell’s composting guide gives about 30:1 as the usual starting ratio. Greens (grass, food scraps, manure) are low in C:N; browns (dry leaves, straw, wood) are high. You cannot average the ratios: a material with little nitrogen counts for little, so the mix is total carbon over total nitrogen, each worked out from the amount, moisture, nitrogen % and C:N, as in Cornell’s formula. The example reproduces Cornell’s 10 kg of grass and leaves, where about 3.5 kg of leaves gives 30:1 and 6.8 kg gives a little under 37:1.
Your numbers, step by step
About the Compost calculator
This compost calculator finds the carbon-to-nitrogen ratio of a mix of greens and browns, and how much of the last material on your list brings the pile to a target such as 30:1. For each material you enter the amount, its nitrogen %, its C:N ratio and its moisture %. The calculator works out the carbon and nitrogen each one actually brings, on a dry-weight basis, and divides total carbon by total nitrogen, the method Cornell's composting guide uses. That matters because you cannot simply average the ratios: a material with little nitrogen counts for little. It also shows the moisture of the mix, since a pile can be right on carbon and still too wet. Amounts can be in kilograms, pounds or any unit, and every step is shown. Material values vary, so use test results or a published table for yours.
How to use it
- In “Materials, one per line”, write each material's name, amount, nitrogen %, C:N and moisture %, separated by commas.
- Put the material you want to adjust, often the browns, on the last line.
- Choose what the “Amounts in” are, and set the “Target C:N”.
- Read the mix C:N, how much of the last material reaches the target, and the mix moisture.
Worked example
Cornell's example: 10 kg of grass clippings (77% moisture, 2.4% nitrogen, C:N 18.75) and 6.8 kg of dry leaves (35% moisture, 0.75% nitrogen, C:N 66.67). The grass is 2.3 kg dry, bringing 0.0552 kg of nitrogen and 1.035 kg of carbon; the leaves are 4.42 kg dry, bringing 0.0332 kg of nitrogen and 2.21 kg of carbon. C:N = 3.245 ÷ 0.0884 = 36.7:1, and the mix moisture is 60%. To hit 30:1 instead, the calculator gives about 3.47 kg of leaves for the 10 kg of grass.
Updated
Questions people ask
How do I calculate the C:N ratio of a compost mix?
Work out the carbon and nitrogen in each material from its dry weight, nitrogen % and C:N, add them up, and divide total carbon by total nitrogen. Cornell's C/N ratio page sets out the same formula with moisture included.
What is the ideal carbon-to-nitrogen ratio for compost?
About 30:1 at the start is the usual recommendation, and Cornell notes the best value varies with how easily the carbon and nitrogen break down. Finished compost ends nearer 10:1.
Can I just mix equal parts greens and browns?
It is a rough starting rule, but the result depends on the materials. Equal weights of 40:1 leaves and 20:1 grass do not give 30:1 unless they carry the same nitrogen, which is why this calculator weights by nitrogen.
What is a common mistake with compost ratios?
Averaging the C:N numbers of the materials. A brown low in nitrogen adds lots of carbon but little nitrogen, so the plain average is usually too low; total carbon over total nitrogen is the right sum.
Why does moisture matter as well as C:N?
A pile that is too wet goes anaerobic and smells, and one too dry stops working. Cornell's guidance is about 50–60% moisture by weight for the mix. To spread the finished compost, the mulch calculator works out volumes for beds.