Agriculture, Livestock & Landscaping Soil Fertility, Fertilizer & Amendments Dry-weight mass balance of carbon and nitrogen

Compost Carbon to Nitrogen (C:N) Ratio Calculator

A compost pile heats when its carbon to nitrogen ratio lands somewhere near 30:1 on a dry-weight basis, and this calculator gets you there arithmetically instead of by feel. Enter the wet weight, moisture content, nitrogen percentage and C:N of a carbon-rich feedstock and a nitrogen-rich one, and it returns the ratio of the resulting mix, the moisture of the mix, and the weight of the carbon source you would need to hit your target exactly. Every step runs on dry weight, because water carries no carbon and no nitrogen but dominates the number on the scale.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Carbon source wet weightAs-received weight of the brown, high-carbon material — leaves, straw, sawdust, chips.400 lb
Carbon source moisturePercentage of the wet weight that is water; oven-dry a sample or use a published typical value.35 %
Carbon source nitrogenTotal nitrogen as a percentage of dry matter, from a feedstock analysis or a reference table.0.9 % N dry
Carbon source C:N ratioParts carbon per part nitrogen by dry weight; the calculator multiplies it by the nitrogen percentage to get carbon.54 :1
Nitrogen source wet weightAs-received weight of the green, high-nitrogen material — grass, manure, food scraps.200 lb
Nitrogen source moistureGreens are usually wet; fresh grass and food waste commonly run above 75%.82 %
Nitrogen source nitrogenTotal nitrogen as a percentage of dry matter for the green material.2.4 % N dry
Nitrogen source C:N ratioParts carbon per part nitrogen by dry weight for the green material.17 :1
Target C:N ratio for the mixMost thermophilic composting recipes aim between 25:1 and 35:1; 30:1 is the usual starting point.30 :1

It returns

  • C:N ratio of the mix — Total carbon divided by total nitrogen, both on a dry-weight basis.
  • Moisture of the mix
  • Carbon source needed to hit the target
  • Total wet weight of the batch
  • Total dry weight of the batch
  • Total carbon in the batch
  • Total nitrogen in the batch

The formula

CN=iminiRiimini
wA=NB(TRB)(1MA)nA(RAT)
M=iwiMiiwi

In plain text: C:N of mix = Σ(dry massᵢ × Nᵢ% × C:Nᵢ) / Σ(dry massᵢ × Nᵢ%), dry massᵢ = wet massᵢ × (1 − moistureᵢ)

  • mᵢDry mass of feedstock i: wet mass × (1 − moisture fraction) (lb)
  • nᵢNitrogen content of feedstock i as a fraction of dry matter (decimal)
  • RᵢCarbon to nitrogen ratio of feedstock i (—)
  • C, NTotal carbon and total nitrogen mass in the batch (lb)

Carbon is derived as nitrogen mass multiplied by the feedstock's C:N, so an analysis giving %N and C:N is sufficient. The ratio of the mix is a weighted average by nitrogen mass, not by weight, which is why a small quantity of a high-nitrogen material moves the number so far.

Updated Category Soil Fertility, Fertilizer & Amendments Verified against published test cases Reading time 11 min

What the C:N ratio controls in a compost pile

Composting is microbial metabolism, and microbes need carbon for energy and nitrogen to build protein. They consume the two in roughly a fixed proportion, so the ratio of carbon to nitrogen in what you feed them determines which one runs out first and therefore how fast the pile works.

Above roughly 40:1 the pile is carbon-rich. There is plenty of energy and not enough nitrogen to build the microbial biomass that would use it, so the population stays small, heat production stays low, and the pile takes many months. Below roughly 20:1 the pile is nitrogen-rich. The microbes take what they need and the surplus nitrogen leaves as ammonia, which you can smell from the far side of the yard and which is fertility walking out of the batch.

Between about 25:1 and 35:1 both are supplied in step, the population grows quickly, and the pile self-heats into the thermophilic range where it will stay for days or weeks. That is the range this calculator is built around, and 30:1 is the conventional target because it sits comfortably inside it.

One point causes most of the confusion: the ratio is a dry weight ratio. Fresh grass clippings are more than four fifths water. Weighing wet material and treating the number as feedstock mass will lead you badly astray, which is why this calculator asks for moisture before it asks for anything else.

Why the mix ratio is not the average of the two ratios

The temptation is to average. Mix a 54:1 material with a 17:1 material half and half and you might expect 35.5:1. You will not get it, and the reason is worth understanding because it changes recipes materially.

Carbon and nitrogen add as masses, and the ratio of the mix is total carbon divided by total nitrogen. Write it out. For each feedstock, dry mass is wet mass times (1 − moisture). Nitrogen mass is dry mass times the nitrogen percentage. Carbon mass is that nitrogen mass times the feedstock's own C:N. Sum the carbon, sum the nitrogen, divide.

What falls out is a weighted average of the two ratios weighted by nitrogen mass, not by total mass. Because the green material contains far more nitrogen per dry pound, it pulls the mix ratio toward its own value much harder than its weight suggests. In the default figures on this page, 400 pounds of leaves against 200 pounds of grass gives a mix at 44.0:1 — nowhere near the midpoint of 54 and 17 — because after moisture is removed the grass contributes only 36 pounds of dry matter against the leaves' 260.

Solving the recipe backwards is a one-line rearrangement. Hold the green material fixed, let the wet weight of the brown be a, and require total carbon over total nitrogen to equal the target T. That gives a × kA × (RA − T) = NB × (T − RB), where kA is nitrogen per pound of wet brown material. The answer only exists when the target lies between the two feedstock ratios, which is a real physical constraint rather than a limitation of the arithmetic: no blend of two materials can land outside the interval they span.

Worked example: 200 lb of grass clippings, balanced with dry leaves

You have 200 pounds of fresh grass clippings at 82% moisture, 2.4% nitrogen on a dry basis, C:N 17. Your carbon source is autumn leaves at 35% moisture, 0.9% nitrogen, C:N 54. Target 30:1.

  1. Dry the grass on paper. 200 × (1 − 0.82) = 200 × 0.18 = 36 lb dry matter.
  2. Nitrogen in the grass. 36 × 0.024 = 0.864 lb N.
  3. Carbon in the grass. 0.864 × 17 = 14.688 lb C.
  4. Nitrogen per wet pound of leaves. (1 − 0.35) × 0.009 = 0.65 × 0.009 = 0.00585 lb N per wet lb.
  5. Solve for the leaves. a = 0.864 × (30 − 17) ÷ [0.00585 × (54 − 30)] = 0.864 × 13 ÷ (0.00585 × 24) = 11.232 ÷ 0.1404 = 80 lb of leaves.
  6. Check it. 80 lb of leaves is 80 × 0.65 = 52 lb dry, carrying 52 × 0.009 = 0.468 lb N and 0.468 × 54 = 25.272 lb C. Totals: C = 25.272 + 14.688 = 39.96 lb, N = 0.468 + 0.864 = 1.332 lb. 39.96 ÷ 1.332 = 30.0:1.
  7. Check the moisture. Water = 80 × 0.35 + 200 × 0.82 = 28 + 164 = 192 lb, out of 280 lb total. 192 ÷ 280 = 68.6%, which is above the 65% ceiling.

That last step is the one that catches people. The recipe is chemically correct and physically too wet, because the carbon needed to balance 200 pounds of grass is only 80 pounds of leaves and that is not enough dry bulk to soak up 164 pounds of water. The fix is not more leaves — that would push the ratio past 30:1 — but a drier or coarser carbon source. Substitute straw at 12% moisture and 80:1, and both the ratio and the moisture land in range with less material. Run the numbers again with those figures to see it.

Reading the two numbers together

Judge the mix on ratio and moisture at the same time, because a pile fails on whichever is worse. A perfect 30:1 at 75% moisture will go anaerobic within days: water fills the pore space, oxygen cannot diffuse in, and the pile turns to a sour, ammonia-smelling mass. A perfect 50% moisture at 60:1 will simply sit there, cool and intact, for a year.

The working windows are 25:1 to 35:1 for the ratio and 40% to 65% for moisture, with 50% to 60% preferred. Moisture is the easier of the two to fix on site — you can add water, and you can add dry bulking agent — while the ratio is set when you build the pile and is awkward to change afterwards. So get the ratio right on paper and correct moisture with the hose.

A pile that is genuinely in range will reach 130 to 150 °F within two to four days and hold there. If it does not, look first at moisture, then at particle size and porosity, and only then at the ratio. Sawdust at 442:1 will not heat even when the arithmetic says the mix is 30:1, because most of its carbon is lignin that microbes cannot reach quickly. The ratio assumes carbon is available; woody carbon largely is not.

Squeeze test: a handful of correctly moist compost feels like a wrung-out sponge, holds together when squeezed, and yields at most a drop or two of water. That test agrees with the 50 to 60% band well enough to check your moisture entries against reality.

Typical C:N ratios and moisture contents of common feedstocks

Average values for planning. Every one of these is the midpoint of a wide range, so use a laboratory analysis when the batch matters.
FeedstockC:N (typical)Moisture % (wet basis)Role
Fresh grass clippings17:182Nitrogen source
Fruit and vegetable waste15:180Nitrogen source
Poultry manure, fresh10:174Nitrogen source
Dairy or beef manure19:181Nitrogen source
Deciduous leaves54:138Carbon source
Wheat straw80:112Carbon source and bulking
Sawdust442:139Carbon source, slow
Corrugated cardboard563:18Carbon source, slow
Newspaper625:16Carbon source, slow

Values as tabulated in the On-Farm Composting Handbook (NRAES-54) and reproduced by the Cornell Waste Management Institute. Ranges around these midpoints are wide — leaves alone span roughly 35:1 to 85:1 by species and season.

High-carbon materials are not interchangeable

A pound of carbon in fresh straw and a pound of carbon in sawdust do not behave alike. The formula treats all carbon as equally available, which is a simplification the microbes do not honour: cellulose is broken down in weeks, lignin in years. Woody materials with C:N above roughly 300 should be treated as bulking agents that also happen to supply some carbon, not as the main carbon component of a recipe.

If you build a mix that is 30:1 mostly on paper because of a large sawdust fraction, expect it to behave like a much wider ratio in practice, and expect a fraction of the nitrogen to be immobilised for a long time when the finished product goes to the field.

Mistakes that ruin a compost recipe

  • Using wet weights as if they were dry. Fresh grass is four fifths water. Skipping the moisture step overstates the nitrogen source's contribution by roughly a factor of five.
  • Averaging the two ratios. The mix ratio is weighted by nitrogen mass, not by weight, so the green material dominates far more than its share of the pile suggests.
  • Working in volume rather than weight. A cubic yard of leaves and a cubic yard of manure differ enormously in bulk density. Convert volumes to weights with a measured bulk density before using this calculator.
  • Ignoring moisture after fixing the ratio. Balancing a wet green material with a small quantity of a very carbon-rich brown gives a chemically correct, physically waterlogged pile.
  • Trusting table values for manure. Manure analysis varies with species, bedding, diet and storage more than almost any other feedstock. Send a sample.
  • Forgetting that particle size sets the rate. Two mixes with identical ratios and moisture will compost at very different speeds if one is shredded and the other is whole branches.

Where the finished compost fits in a fertility plan

Compost is a soil amendment first and a fertiliser second. A finished product will typically carry a fraction of the nitrogen the raw feedstocks contained, in a slow-release organic form, and the ratio will have narrowed toward 15:1 or below as carbon left as carbon dioxide. Do not credit compost nitrogen the way you would credit fertiliser nitrogen; treat it as a multi-year release and confirm with soil tests.

If you are composting manure rather than yard waste, the nutrient side of the decision usually dominates the carbon side, and the right tool is the manure application rate calculator, which converts an analysis into tons per acre against a crop nitrogen requirement. When you need to top up what the compost does not supply, the custom fertilizer blend calculator turns a target N-P-K rate into pounds of urea, DAP and potash. And if the soil test that prompted the whole exercise showed a low pH, correct that first with the agricultural lime requirement calculator, because nutrient availability is a pH problem before it is a supply problem.

For a garden or market plot, the practical follow-on question is how far a finished pile spreads. Work out the area from your bed layout with the row spacing calculator, and remember that a one-inch application over 1,000 square feet is roughly three cubic yards of material.

Frequently asked questions

What C:N ratio should compost start at?

Aim for 30:1, and accept anything between 25:1 and 35:1. Below 20:1 the pile loses nitrogen as ammonia; above 40:1 it heats slowly because nitrogen limits how much microbial biomass can form. The finished product will end up much narrower — commonly 15:1 or below — because carbon leaves as carbon dioxide while most of the nitrogen stays.

Is the C:N ratio by weight or by volume?

By dry weight, always. Volume ratios such as "three parts browns to one part greens" are rough field shortcuts that happen to work for a particular pair of materials at particular bulk densities. If you want to use volumes, weigh a measured bucket of each material first to get a bulk density, then convert to weight before entering it here.

Do I need both the nitrogen percentage and the C:N ratio?

Yes, because together they determine the carbon content: carbon percentage equals nitrogen percentage multiplied by the C:N ratio. A feedstock analysis usually reports both, and reference tables list both. If you only have the C:N ratio, you cannot compute how much a given weight of material contributes — only the ratio it would produce in isolation.

Why can I not reach my target ratio?

Because a blend of two materials always lands between their two ratios. Mixing a 17:1 material with a 54:1 material can produce anything from just above 17:1 to just below 54:1 and nothing outside that. If your target sits outside the span, you need a third feedstock — a very high-carbon material such as straw or shredded cardboard to go higher, a high-nitrogen material such as manure to go lower.

What moisture content should the mix be?

Between 40% and 65% of wet weight, with 50% to 60% preferred. Below 40% microbial activity slows sharply because there is not enough water film around particles; above 65% water displaces air from the pore space and the pile turns anaerobic. The field check is the squeeze test: the material should feel like a wrung-out sponge and release at most a drop or two.

Does adding water change the C:N ratio?

No. Water contains neither carbon nor nitrogen, so wetting a pile changes the moisture number on this page and leaves the ratio untouched. That is exactly why the calculation is done on dry weight: it separates the chemistry, which you fix at build time, from the water balance, which you can adjust with a hose at any point.

How do I handle a mix with more than two feedstocks?

Combine materials of similar character into one entry using a weighted dry-mass calculation, or run the calculator twice: blend the first two, read off the mix's dry weight, nitrogen mass and ratio, then treat that result as one feedstock against the third. The mass balance is additive, so the answer is the same either way.

Why does my pile smell of ammonia even though the ratio looks right?

Usually because the ratio is right on paper but much of the carbon is not biologically available. Lignin-rich materials such as sawdust, wood chips and cardboard contribute large carbon numbers that microbes cannot access at composting speed, so the effective ratio is far narrower than the calculated one. The other common cause is excess moisture: an anaerobic pile releases ammonia regardless of the ratio.

References

  • On-Farm Composting Handbook (NRAES-54) — Northeast Regional Agricultural Engineering Service, Cornell University
  • Compost Chemistry: Carbon to Nitrogen RatioCornell Waste Management Institute, Cornell University
  • The Practical Handbook of Compost Engineering — Roger T. Haug, Lewis Publishers