Composting Calculator
A compost pile breaks down fastest when the blend of carbon-rich browns and nitrogen-rich greens lands near a 30:1 carbon-to-nitrogen ratio. This calculator solves the weight-blended C:N target for you: enter the C:N of your browns and greens, the weight of greens you have, and your target ratio, and it solves for the weight of browns to add. It returns the brown weight, the total pile weight, and the resulting blended ratio so you can confirm the mix before you build the pile.
Composting mix formula
Let G = greens weight
Browns weight B solves the weight-blended C:N target:
(G * green C:N + B * brown C:N) / (G + B) = target
Rearranged: B = G * (target - green C:N) / (brown C:N - target)
Total weight = G + B
Blended C:N = (G * green C:N + B * brown C:N) / (G + B)
This uses a weighted-average (blended) C:N target by weight, treating each material's C:N as a fixed ratio. Adding browns raises the average C:N from the greens-only value toward the target. If the greens C:N already exceeds the target, no browns are needed and the result is shown as n/a.
Composting context
- The US EPA recommends a feedstock C:N ratio around 25 to 30 for efficient backyard composting.
- Browns include dried leaves, straw, cardboard and wood chips; greens include food scraps and grass clippings.
- Food scraps have a low C:N (around 15 to 20); dried leaves are high (around 50 to 60).
- Material C:N values vary by source; enter values from your extension service for best accuracy.
- Moisture (about a wrung-out sponge) and turning matter alongside the C:N ratio.
Composting: frequently asked questions
What carbon-to-nitrogen ratio should compost be?
The US EPA and university extension programs recommend a carbon-to-nitrogen (C:N) ratio of about 25 to 30 parts carbon per part nitrogen by weight for the feedstock mix. Within that band microbes break material down quickly without going slimy or stalling. This calculator targets a ratio you set, defaulting to 30.
What are browns and greens in composting?
Browns are carbon-rich, dry materials such as dried leaves, straw, cardboard and wood chips. Greens are nitrogen-rich, moist materials such as food scraps, grass clippings and coffee grounds. A workable pile combines both so the average C:N lands in the target range.
How does the calculator find the mix?
It treats each material's C:N as a known ratio and solves for the weight of browns to add to your greens so the blended ratio hits your target. The result is the weight of browns per unit weight of greens, plus the resulting total weight and blended ratio.
Do I weigh or measure by volume?
The C:N ratio is defined by weight, so the calculation uses weight. Because browns are usually much lighter and fluffier than greens, the volume of browns you add is typically several times the volume of greens even when the weights are close. Weigh where you can for accuracy.
Why did my pile stall or smell?
Too much brown (high C:N) starves microbes of nitrogen and the pile sits cold. Too much green (low C:N) creates excess nitrogen that off-gasses as ammonia and turns the pile slimy and smelly. Adjusting toward a 25 to 30 ratio, plus turning and moisture, usually fixes both.
Official sources
- U.S. Environmental Protection Agency: Composting At Home.
- U.S. Department of Agriculture: Natural Resources Conservation Service.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.