The American Petroleum Institute established API gravity measure as a measure of the density of petroleum liquids relative to water. The greater the API gravity, the less dense the liquid. The scale of API gravity was adjusted so that most petroleum liquids fall between 10 and 70 degrees API gravity. The formula can be reversed to find the density of the petroleum liquid.

Add 131.5 to the API gravity. The formula for API gravity is API = (141.5/SG) -131.5 where SG is the specific gravity of the petroleum liquid being measured. For example, for an API gravity of 50, add 131.5 to obtain 181.5.

Divide 141.5 by (131.5 + API gravity) to obtain the specific gravity of the oil. Continuing the example, divide 141.5 by 181.5 from the last step to get .7796.

Multiply the specific gravity of the oil by the density of water to obtain the density of the oil. This follows from the formula of specific gravity where SG = density(oil)/density(water). Concluding the example, .7796 * 1 grams per cubic centimeter = .7796 g/cc.