Scientists often determine measurements using the International System of Units (SI), also known as the metric system. The metric system offers numerous advantages, such as ease of conversion between units. You can convert the mass of a substance in metric units of grams (g) to the corresponding volume in units of liters (L) by using two conversion steps. In this conversion you will make use of the concept of density, which is the mass of a unit volume of substance, and, in metric, is usually given in grams per milliliter (g/mL).
Enter the numerical value of the grams of substance into the calculator. For example, if you had 100 grams of a compound, you would enter 100.
Divide the value you just entered by the density of the compound, in units of grams per milliliter (g/mL). These are the units which scientists commonly use to describe density. If you do not know the density of your particular chemical compound, you can find it from the manufacturer's information for that substance, for instance, from the material safety data sheet. This calculation will give you the volume of the substance in milliliters (mL). If the density of the compound in the example was 1.05 g/mL, you would calculate 100/1.05 = 95.24 mL.
Divide the volume in milliliters which you just calculated by 1,000. Since there are 1,000 milliliters in a liter, this calculation will convert the units of volume into liters. In the case of the example, the calculation would be 95.24/1000 = 0.09524 L.
TL;DR (Too Long; Didn't Read)
The density of a substance can change with temperature, so ensure that the density value you use is valid for the temperature you are working at.