Lelifi·tools

Compost Calculator

Twenty pounds of grass clippings and twenty pounds of dry leaves mix to about 34 to 1, a touch heavy on carbon for the 30 to 1 target. Adding 14.7 pounds more grass clippings brings the pile to 30 to 1. The pile holds 19 pounds of carbon and 0.56 pounds of nitrogen.

Add the greens and browns you have, and this calculator returns the carbon to nitrogen ratio of your pile plus exactly how much of the other material to add to reach 30 to 1.

By the Lelifi editors ·

Key takeaways

The carbon to nitrogen scale for compostToo much N10Ideal25Workable30Too much C408030 to 1
Below 20 to 1 the pile smells. Above 40 to 1 it stalls. The sweet spot is 25 to 30.
The math behind the calculator20 lb grass clippings + 20 lb dry leaves- carbon: (20 x 0.45) + (20 x 0.50) = 19 lb- nitrogen: (20 x 0.02) + (20 x 0.008) = 0.56 lb- ratio: 19 / 0.56 = 34 to 1= add 14.7 lb more grass to reach 30 to 1
Equal weights of grass and leaves leave the pile short on nitrogen.
On this page
  1. Why the carbon to nitrogen ratio decides everything
  2. How this calculator works
  3. Worked example: grass clippings and dry leaves
  4. Worked example: kitchen scraps and shredded cardboard
  5. Carbon to nitrogen ratios of common materials
  6. Fixing a pile that smells, dries out or stalls

Why the carbon to nitrogen ratio decides everything

Composting is a microbial meal. The microbes eating your kitchen scraps and leaves need carbon for energy and nitrogen to build protein, and they need those two in roughly the right proportion. Get it right and the pile heats up, breaks down in a few months, and smells like forest floor. Get it wrong and you get either a slimy pile that reeks of ammonia or a dry heap that sits unchanged for a year.

The target is around 30 parts carbon to 1 part nitrogen by weight. Penn State Extension's home composting guide gives a preferred range of 25 to 30 to 1, and the EPA's approaches to composting describes the same balance in kitchen terms: about three parts browns to one part greens by volume.

Those two statements are not in conflict. Browns like dry leaves and cardboard are bulky and light, so three buckets of leaves weigh far less than one bucket of wet grass clippings. This calculator works in pounds so the arithmetic holds up, and you can weigh a bucket once to learn what your own materials weigh.

What goes wrong when the ratio is off:

How this calculator works

Each material carries a typical carbon percentage and a nitrogen percentage by weight. Mixing two materials is just a weighted average of each element.

Total carbon is the pounds of greens times their carbon percentage, plus the pounds of browns times theirs. Total nitrogen works the same way. Divide carbon by nitrogen and you have the ratio of the pile.

To find how much of one material to add, solve for the amount that brings the ratio to your target. If the pile has too much nitrogen, you need more browns, and the amount is:

browns to add = (target x nitrogen - carbon) / (brown carbon% - target x brown nitrogen%)

If the pile has too much carbon, you need more greens, and the formula mirrors it:

greens to add = (carbon - target x nitrogen) / (target x green nitrogen% - green carbon%)

The percentages behind each material come from the classic compost tables, the same values the Cornell composting program's carbon to nitrogen calculator uses. They are averages for dry-weight composition, so treat them as good estimates rather than laboratory results. Your own leaves and grass will differ a little with species, season and how wet they are.

Worked example: grass clippings and dry leaves

The most common pile in a suburb is bagged grass clippings and raked leaves. Say you have 20 pounds of each, and you want 30 to 1.

That is close but a touch heavy on carbon, so the calculator returns 14.7 more pounds of grass clippings to land exactly on 30 to 1. Check it: adding 14.7 pounds of grass adds 6.6 pounds of carbon and 0.29 pounds of nitrogen, taking the pile to 25.6 pounds of carbon and 0.85 pounds of nitrogen, which is 30.1 to 1.

Note the practical implication. Equal weights of grass and leaves are not a balanced pile. You need roughly 1.7 pounds of grass for every pound of leaves you add, which is why a pile built from equal buckets of each tends to run a little short on nitrogen.

Worked example: kitchen scraps and shredded cardboard

Kitchen scraps are wet and nitrogen-heavy, which makes them the most likely material to turn a pile sour. Cardboard is the fix.

That pile is too hot on nitrogen and will smell. The calculator returns about 15 pounds more shredded cardboard to reach 30 to 1, which is roughly two pounds of cardboard for every three pounds of food scraps you keep adding.

Cardboard is a strong brown because its nitrogen content is so low. Pound for pound it corrects excess nitrogen about 1.5 times as effectively as dry leaves. Remove the tape, staples and any glossy coating first, and tear or shred it so it does not mat down into an airless layer.

Carbon to nitrogen ratios of common materials

The full list this calculator draws from, with the carbon and nitrogen percentages behind each ratio:

MaterialTypeCarbonNitrogenC:N ratio
Chicken manureGreen40%3.0%13 to 1
Fruit and vegetable scrapsGreen48%2.5%19 to 1
Grass clippingsGreen45%2.0%22 to 1
Coffee groundsGreen48%2.0%24 to 1
Horse manureGreen45%1.4%32 to 1
Dry leavesBrown50%0.8%62 to 1
StrawBrown48%0.6%80 to 1
Pine needlesBrown50%0.5%100 to 1
Shredded paperBrown44%0.2%220 to 1
Shredded cardboardBrown43%0.1%430 to 1
Wood chipsBrown50%0.1%500 to 1
SawdustBrown50%0.1%500 to 1

Horse manure at 32 to 1 is the odd one out. On its own it is already almost perfectly balanced, which is why aged manure is such a good compost ingredient. Wood chips and sawdust at the other end are so carbon-heavy that they stall a pile unless you add a lot of nitrogen with them, and they break down slowly because of the lignin.

Fixing a pile that smells, dries out or stalls

Once the ratio is right, three other variables decide whether the pile works.

If the pile smells like ammonia, add browns and turn. If it smells like rotten eggs, it is too wet and has gone anaerobic, so turn it and add dry material. If it does not heat up at all, it is short on nitrogen or water, or the pile is smaller than the 3-foot minimum.

What not to add to a backyard pile: meat, fish, dairy, grease, pet waste, and diseased plants. They either attract animals or carry pathogens that a home pile cannot reliably kill. For a full list of what belongs in a home compost bin, the EPA's composting pages are the place to check.

Frequently asked questions

What is the ideal carbon to nitrogen ratio for compost?

About 30 to 1. Penn State Extension puts the target at 25 to 30 parts carbon to 1 part nitrogen, and the EPA describes the working mix as roughly three parts browns to one part greens by volume.

How many browns do I add to 5 gallons of grass clippings?

About three times the volume, so roughly 15 gallons of loose dry leaves for 5 gallons of grass clippings. That matches the EPA's rule of thumb of about three parts browns to one part greens by volume.

What counts as greens and what counts as browns?

Greens are wet and nitrogen-rich: grass clippings, fruit and vegetable scraps, coffee grounds and manure. Browns are dry and carbon-rich: dead leaves, straw, cardboard, shredded paper and wood chips.

Why does my compost pile smell like ammonia?

Too much nitrogen. Add browns, turn the pile, and the smell fades within a day or two. Ammonia is nitrogen leaving your pile as gas, which means you are losing the nutrient you wanted.

Why is my compost pile not heating up?

Usually too little nitrogen or too little moisture. Add grass clippings or food scraps, water it to the feel of a wrung-out sponge, and turn it. A working pile reaches 130°F to 150°F within 3 days.

How much nitrogen is in coffee grounds?

Coffee grounds run about 2 percent nitrogen and 48 percent carbon, close to 24 to 1. They are one of the few kitchen scraps that behave almost like a green and a brown at once.

Can I compost meat, dairy or pet waste?

Not in a home pile. Meat, dairy, grease and dog or cat waste attract pests and can carry pathogens. Commercial composters reach temperatures that kill them, but a backyard pile usually does not.

How long does compost take?

Three to six months with regular turning, or 12 to 18 months in a cold pile you mostly ignore. Getting the ratio right is the single biggest thing that speeds it up.

How big should a compost pile be?

At least 3 feet by 3 feet by 3 feet, about one cubic yard. A pile smaller than that loses heat faster than the microbes can make it.

How wet should a compost pile be?

About 40 to 60 percent moisture, the feel of a wrung-out sponge. Squeeze a handful and one or two drops should come out. Too dry and nothing happens, too wet and it turns anaerobic and smells.

What is the carbon to nitrogen ratio of dry leaves?

About 62 to 1. Straw is 80 to 1, pine needles 100 to 1, shredded paper 220 to 1, and shredded cardboard or sawdust can pass 400 to 1. The higher the number, the more nitrogen the material soaks up.

Do I need to add soil or a starter?

No. The microbes are already on the material. A shovel of garden soil or a handful of finished compost adds them faster, but it is optional when the ratio, moisture and air are right.

Can I compost in winter?

Yes, but the pile goes dormant and stops heating below about 40°F. Keep adding material, keep it covered so it does not turn soggy, and it restarts in spring.

Spotted a wrong number or a broken result?

More Home Improvement tools

See all Home Improvement tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.