Convert between different volume units
Common conversions:
Volume converter transforms between metric (liters, milliliters, cubic meters), imperial (gallons, quarts, pints), and cooking units (cups, tablespoons). Critical for cooking, fuel, shipping, and any application measuring three-dimensional space or liquid capacity.
Volume conversion uses cubed length factors for cubic units (1 cubic foot = 0.3048³ cubic meters) or direct factors for capacity units (1 US gallon = 3.785 liters). Beware: US and imperial gallons differ! All volumes convert through liters or cubic meters.
1 liter = 1000 mL = 1000 cubic cm. 1 US gallon = 3.785 L, 1 imperial gallon = 4.546 L. 1 US cup = 236.6 mL. 1 cubic meter = 1000 liters. Fluid ounces also differ: US = 29.57 mL, imperial = 28.41 mL. The metric system: 1 mL = 1 cubic centimeter exactly.
Convert between cups, tablespoons, and milliliters for recipes.
1 cup = 236.6 mLConvert between liters/100km and miles/gallon.
Calculate container volumes in different unit systems.
Convert between fluid ounces, liters, and gallons for packaging.
const volumeToLiters = {
'liter': 1,
'milliliter': 0.001,
'cubic-meter': 1000,
'us-gallon': 3.785411784,
'imperial-gallon': 4.54609,
'us-quart': 0.946352946,
'us-pint': 0.473176473,
'us-cup': 0.2365882365,
'us-fluid-ounce': 0.0295735296,
'tablespoon': 0.0147867648,
'teaspoon': 0.00492892159,
'cubic-foot': 28.3168466
};
function convertVolume(value, fromUnit, toUnit) {
const liters = value * volumeToLiters[fromUnit];
return liters / volumeToLiters[toUnit];
}
// Examples
convertVolume(1, 'us-gallon', 'liter'); // 3.785
convertVolume(2, 'us-cup', 'milliliter'); // 473.18
convertVolume(1, 'imperial-gallon', 'us-gallon'); // 1.201Be careful with US vs imperial units - they differ significantly. Convert through liters as base.
Use volume converter for cooking, fuel calculations, shipping container sizing, beverage conversions, and any application involving liquid or cubic measurements.
US gallon = 3.785 liters. Imperial gallon = 4.546 liters. Imperial is larger! This affects all related units (quarts, pints). A UK pint is 568 mL vs US pint at 473 mL.