1. A method for determining in situ the carbon content of a formation traversed by a borehole, comprising: (a) measuring the carbon/oxygen elemental ratio of said formation; (b) determining the porosity of the formation; (c) obtaining the oxygen content and density of the fluid in said formation; (d) obtaining the oxygen content and density of the minerals in said formation; (e) determining the total carbon content of said formation from said carbon/oxygen ratio, said oxygen content and density of the fluid in said formation, and said oxygen content and density of the minerals in said formation.