As grams are a unit of mass and milliliters are a unit of volume, you need to know the density of the substance you are measuring in milliliters in order to convert the measurement from milliliters to grams. In the case of water, 1 gram = 1 milliliter, so 15 milliliters of water = 15 grams.
- Find the substance's density
You can find density tables online and in books. Density varies by temperature. For example, the density of water at 4 degrees Celsius is 1 gram per milliliter. The density of gold is 19.3 grams per milliliter.
- Convert the volume to milliliters (if necessary)
The table you use may state densities in grams per centimeter squared or in grams per liter. One milliliter equals 1 centimeter squared, so calculation isn't needed; just change the volume unit symbol from c^3 to ml. In the case of gold, 19.3 grams/c^3 = 19.3 grams/milliliter. One liter equals 1,000 milliliters, so divide the amount in grams per liter by 1,000 to get the amount in grams per milliliter. In the case of gold, (19,300 grams /liter) ÷ 1,000 = 19.3 grams/milliliter.
- Multiply the density of the substance by the initial amount measured in milliliters
To get the mass in grams, multiply the amount in milliliters by the density. For gold, using the 15 milliliter initial measurement and gold's density of 19.3 grams per milliliter, the calculation is: 15 milliliter x 19.3 grams/milliliter = 289.5 grams.