A carbon-to-nitrogen ratio (C/N ratio or C:N ratio) is a ratio of the mass of carbon to the mass of nitrogen in organic residues. It can, amongst other things, be used in analysing sediments and soil including soil organic matter and soil amendments such as compost.