Heptanoic acid is an organic compound composed of a seven-carbon chain terminating in a carboxylic acid. It is an oily liquid with an unpleasant, rancid odor. It contributes to the odor of some rancid oils. It is slightly soluble in water, but very soluble in ethanol and ether. The methyl ester of ricinoleic acid, obtained from castor bean oil is the main commercial precursor to heptanoic acid. It is hydrolyzed to the methyl ester of undecenoic acid and heptanal, which is then air oxidized to the carboxylic acid. Ricinoleic acid is the main precursor to heptanoic acid.Heptanoic acid is used in the preparation of esters, such as ethyl heptanoate, which are used in fragrances and as artificial flavors. Heptanoic acid is used to esterify steroids in the preparation of drugs such as testosterone enanthate, trenbolone enanthate, drostanolone enanthate and methenolone enanthate (Primobolan). It is also one of many additives in cigarettes.