Compost C:N Ratio Calculator
The carbon-to-nitrogen ratio, written C:N, is the single most useful number for a healthy compost pile. It compares how much carbon there is to how much nitrogen, because the microbes that break down organic matter need carbon-rich browns such as dry leaves, straw and cardboard for energy and nitrogen-rich greens such as grass clippings, vegetable scraps and coffee grounds to build their bodies. Get the balance right and the pile heats up and decomposes quickly without odour; get it wrong and it either crawls along, when there is too much carbon, or turns wet and smelly as excess nitrogen escapes as ammonia. The widely cited target is about 25 to 30 parts carbon to 1 part nitrogen. This calculator divides the carbon parts you enter by the nitrogen parts to give the C:N ratio as a single number against one part nitrogen, so you can check whether your mix is close to that ideal. A practical bench rule is roughly two to three parts browns to one part greens by volume, adjusting if the pile is too slow or too smelly. Composting also keeps organic waste out of landfill. Every figure here is computed deterministically from the formula below, with a worked example that reconciles exactly to the calculator.
The compost C:N ratio is carbon parts divided by nitrogen parts: C:N = carbon / nitrogen. With 300 parts carbon and 10 parts nitrogen, the ratio is 30:1, right in the ideal range of about 25 to 30 to 1.
C:N ratio formula
C:N ratio = carbon parts / nitrogen parts
carbon = carbon content of the materials
nitrogen = nitrogen content of the materials
expressed as the ratio to one part nitrogen
Dividing carbon by nitrogen gives the number of carbon parts per single part of nitrogen. A result near 30 indicates a well-balanced pile.
Worked example
A pile contains 300 parts carbon and 10 parts nitrogen.
- Divide carbon by nitrogen: 300 / 10.
- C:N ratio = 30.
- Written as a ratio: 30:1, within the ideal 25 to 30 to 1 range.
The C:N ratio is 30:1. These are the calculator's default inputs, so the result above matches the widget exactly.
Approximate C:N of common materials
| Material | Approximate C:N |
|---|---|
| Vegetable scraps (green) | 15 to 20:1 |
| Grass clippings (green) | 15 to 25:1 |
| Dry leaves (brown) | 40 to 80:1 |
| Cardboard, sawdust (brown) | 300 to 500:1 |
General guidance; consult local composting and food-waste resources.
Compost C:N ratio calculator: frequently asked questions
What is the carbon-to-nitrogen ratio in compost?
The carbon-to-nitrogen ratio, written C:N, compares the amount of carbon to the amount of nitrogen in a compost pile. Carbon-rich browns such as dry leaves and cardboard feed the microbes' energy needs, while nitrogen-rich greens such as grass clippings and food scraps build their bodies. The balance between the two sets how fast and how well a pile breaks down.
What ratio should I aim for?
A C:N ratio of about 25 to 30 parts carbon to 1 part nitrogen is widely cited as ideal for efficient composting. Too much carbon and the pile breaks down slowly; too much nitrogen and it can become wet and smelly as excess nitrogen is lost as ammonia. Aiming for roughly 30:1 keeps microbes working quickly without odour.
How is the ratio calculated here?
This calculator divides the carbon parts you enter by the nitrogen parts to give the C:N ratio as a single number to one part nitrogen. For example, 300 parts carbon and 10 parts nitrogen gives 300 divided by 10, which is 30, written 30:1. Use consistent units for both, such as the carbon and nitrogen content by weight.
What are browns and greens?
Browns are carbon-rich, dry and woody: dead leaves, straw, sawdust, paper and cardboard. Greens are nitrogen-rich, moist and fresh: grass clippings, vegetable scraps, coffee grounds and manure. A practical rule of thumb is to layer roughly two to three parts browns to one part greens by volume, then adjust if the pile is too slow or too smelly.
Why does the right ratio matter for the environment?
Composting diverts organic waste from landfill, where it would otherwise generate methane, a potent greenhouse gas. A well-balanced pile composts efficiently and produces a useful soil amendment. Government environmental agencies encourage home composting as a way to cut waste and improve soils, and a sensible C:N balance makes the process work.
Official sources
- Food waste reduction and composting guidance: US Food and Drug Administration (FDA). As at 25 June 2026.
Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.