keepcalculator

06 Numbers and Powers

Milliliters to Grams Calculator: Convert mL to g

Card No. 06·1154 · Updated · Standard formula, shown below

The calculator on this card is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

This calculator converts a volume in milliliters (mL) to a mass in grams (g) using the density of the substance you select or enter. You input the volume in milliliters and choose or type a density (in g/mL), and the calculator returns the mass in grams. Because density varies by substance, the same volume of different materials will have different masses.

Formula

The conversion uses the fundamental density formula:

Mass (g) = Volume (mL) × Density (g/mL)

Where:

  • Volume is the amount of liquid or substance in milliliters (mL).
  • Density is the mass per unit volume of the substance, expressed in grams per milliliter (g/mL). For water at 4°C, density is exactly 1 g/mL, which is why 1 mL of water weighs 1 g.
  • Mass is the result in grams (g).

If you know the density in kg/L, note that 1 kg/L = 1 g/mL, so the numeric value is the same.

Worked Example

Using the default values: volume = 100 mL, substance = Water (density = 1 g/mL).

  1. Write the formula: Mass = Volume × Density
  2. Plug in the numbers: Mass = 100 mL × 1 g/mL
  3. Multiply: Mass = 100 g

The calculator shows 100.00 g for these defaults, matching the result.

Now try olive oil (density 0.91 g/mL) with the same 100 mL: Mass = 100 × 0.91 = 91 g. The same volume of oil is lighter than water.

Why Density Matters

A common misconception is that milliliters and grams are always equal. That is only true for water at standard temperature. Every substance has its own density, which changes with temperature and pressure. For example:

  • Water: 1.00 g/mL at 4°C, but 0.958 g/mL at 100°C (boiling).
  • Milk: about 1.03 g/mL (slightly denser than water due to solids).
  • Olive oil: about 0.91 g/mL (floats on water).
  • Honey: about 1.42 g/mL (much denser than water).
  • Ethanol: 0.789 g/mL at 20°C.

If you ignore density, you will get the wrong mass. For cooking, baking, or lab work, using the correct density is essential for accurate results.

How to Use the Calculator

  1. Enter the volume in milliliters. You can use any positive number; the calculator accepts up to 1,000,000 mL.
  2. Select the substance from the dropdown. If you choose “Custom”, a density input field appears (it is always visible, but only used when Custom is selected).
  3. For custom substances, type the density in g/mL. You can find density values online or on the product label.
  4. Click Calculate (or the equivalent button). The result shows the mass in grams, rounded to two decimal places.

If you enter a density of 0 or leave it blank, the calculator will show 0 g, which is a signal to check your input.

Common Mistakes and How to Avoid Them

  • Using 1 g/mL for everything: This is the most frequent error. Always check the density of your specific substance.
  • Confusing mL with liters: 1 L = 1000 mL. If your volume is in liters, multiply by 1000 first.
  • Ignoring temperature: Density changes with temperature. For precise work, use the density at the actual temperature of your substance.
  • Mixing units: Density can be given in g/cm³, g/mL, kg/L, or kg/m³. 1 g/cm³ = 1 g/mL = 1 kg/L. To convert from kg/m³, divide by 1000 to get g/mL.
  • Rounding too early: Round only the final result, not intermediate steps, to avoid accumulating errors.

Practical Applications

This conversion is used in many everyday situations:

  • Cooking and baking: Recipes often list ingredients in milliliters (e.g., milk, oil) but you may need grams for a scale. Use the density of the ingredient.
  • Nutrition: Food labels sometimes list volume and you want the mass for tracking macros.
  • Science experiments: Converting volumes to masses for chemical reactions requires density.
  • DIY projects: Mixing paints, resins, or adhesives often requires precise mass ratios.
  • Medicine (only with professional guidance): Liquid medications are usually measured by volume, but sometimes you need mass. Never self-convert for dosing; consult a pharmacist or doctor.

For water at room temperature, you can safely use 1 g/mL for most practical purposes, but for other liquids, always look up the density.

Limitations of the Formula

The density formula is simple, but it assumes a uniform, homogeneous substance. In reality:

  • Density varies with temperature and pressure. For gases, this is significant; for liquids, it’s usually small but can matter in precise work.
  • Mixtures (like saltwater) have densities that depend on concentration. You need the specific density of the mixture, not just the pure solvent.
  • Some substances (like flour) are measured by volume with air gaps, so their bulk density is much lower than the material density. This calculator works for liquids and homogeneous solids, not for powders unless you know the bulk density.
  • The calculator assumes a constant density. If you have a solution whose density changes with concentration, you must know the exact density at that concentration.

For high-precision work (e.g., pharmaceutical compounding), always use a calibrated scale and reference tables, and verify with a qualified professional.

Frequently Asked Questions

Is 1 mL always equal to 1 g?

No. Only for water at 4°C (or approximately at room temperature) does 1 mL weigh 1 g. For any other substance, the mass is different because density differs. For example, 1 mL of olive oil weighs about 0.91 g, and 1 mL of honey weighs about 1.42 g.

How do I convert grams back to milliliters?

Use the same density formula rearranged: Volume (mL) = Mass (g) ÷ Density (g/mL). For instance, 50 g of water (density 1) is 50 mL, but 50 g of honey (density 1.42) is about 35.2 mL.

What is the density of water in g/mL?

At 4°C, pure water has a density of exactly 1 g/mL. At 20°C (room temperature), it is about 0.998 g/mL, so for most practical purposes you can use 1 g/mL. For precise lab work, use the temperature-specific value.

Can I use this calculator for flour or sugar?

Yes, but you must use the bulk density of the powder, not the material density. For example, all-purpose flour has a bulk density of about 0.5 g/mL (varies by how it is sifted or packed), while granulated sugar is about 0.85 g/mL. Check reliable sources for the specific powder and how it is measured.

How do I find the density of a substance?

Look for density tables online or in reference books. For liquids, the product label often provides specific gravity (which is numerically equal to density in g/mL). For solids, you can measure it by dividing mass by volume (e.g., using water displacement).

Does temperature affect the result?

Yes. Most liquids expand when heated, so their density decreases. For example, water at 100°C has a density of about 0.958 g/mL, so 100 mL of boiling water weighs 95.8 g, not 100 g. For everyday cooking, the difference is small, but for scientific accuracy, use the density at your actual temperature.

Related

Formula used
in vol | Volume | mL | 100 | 0 | 1000000
sel sub | Substance | Water=1, Milk=1.03, Olive oil=0.91, Honey=1.42, Ethanol=0.789, Custom=0
in dens | Density (g/mL) | g/mL | 1 | 0 | 20
out mass | Mass | g | vol * (sub == 0 ? dens : sub) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →