The symbol gal does not identify the gallon
NIST SP 811 lists US and imperial gallons separately. One imperial gallon is 4.54609 L. A US liquid gallon is 231 cubic inches. Since one inch is exactly 2.54 cm, 231 × 2.54³ / 1000 gives 3.785411784 L. The division converts cubic centimeters to liters. The US gallon row in SP 811 displays a rounded 3.785412 L. That displayed value and the tool’s longer conversion factor do not represent different units.
Check the units supported by Moyoutil
Select Volume in the unit converter, then US liquid gallons to liters. Entering 10 returns 37.85411784 L. The current gal option means US liquid gallons; there is no imperial option. The code below calculates the imperial example with a separate factor. The two results differ by 7.60678216 L. This is a difference between units assigned to the same number, rather than a calculator error.
const usGallonL = Number((231 * 2.54 ** 3 / 1000).toFixed(9));
const imperialGallonL = 4.54609;
const usLiters = 10 * usGallonL;
const imperialLiters = 10 * imperialGallonL;
const difference = Number((imperialLiters - usLiters).toFixed(8));
console.log(usLiters, imperialLiters, difference);
// 37.85411784 45.4609 7.60678216Do not enter an imperial quantity unchanged into the US gallon option. Calculate its liters using the imperial definition, then use liters as input to convert to other supported units. If the source only says gal, check its unit documentation; the language or author’s country alone does not settle the meaning. Keep the conversion factor during calculations and round at the display stage. More displayed digits do not establish the precision of a real capacity measurement.
Frequently Asked Questions
Can I use this example to find the weight of water?
This article converts volume only. Converting liters to mass also requires density and its applicable conditions. The Moyoutil unit converter does not directly convert gallons to kilograms.