RunToolz iconRunToolz
Welcome to RunToolz!
UnitsMathDevelopment

Unit Conversions: The Details That Break Things

Metric, imperial, and the conversions that seem simple but aren't.

RunToolz TeamJanuary 17, 20263 min read

128 ounces. How many cups is that? How many liters? Is that fluid ounces or weight ounces?

Unit conversion seems simple until you get the details wrong. And the details matter—sometimes expensively.

NASA lost a Mars orbiter because one team used metric and another used imperial. $125 million, destroyed by a unit conversion error.

The Obvious Conversions

Length: 1 inch = 2.54 cm. 1 mile = 1.609 km.

Weight: 1 pound = 453.6 grams. 1 ounce = 28.35 grams.

Volume: 1 gallon = 3.785 liters. 1 cup = 236.6 ml.

These are easy. The problems start at the edges.

Ready to try it yourself?Convert Units

US vs UK Measurements

A US gallon is 3.785 liters. An imperial (UK) gallon is 4.546 liters. Not the same.

US fluid ounces are different from UK fluid ounces. US cups are different from UK cups.

"A cup of flour" means different things in different countries. Recipes fail when you don't know which cup.

Fluid Ounces vs Weight Ounces

A fluid ounce measures volume. An ounce measures weight.

A fluid ounce of water weighs about one ounce. A fluid ounce of honey weighs more. A fluid ounce of oil weighs less.

"8 ounces of flour" could mean by weight (226g) or by volume (about 125g). Recipes work differently with each interpretation.

Temperature: Celsius vs Fahrenheit

Conversion formula: F = C × 9/5 + 32

Some key points:

  • 0°C = 32°F (water freezes)
  • 100°C = 212°F (water boils)
  • -40°C = -40°F (they meet here)

Body temperature, cooking temperatures, weather—know which system you're working in.

Digital Storage Units

1 kilobyte should be 1,000 bytes (kilo = thousand).

Except computers use binary, so 1 KB was traditionally 1,024 bytes (2^10).

Now we have:

  • KB/MB/GB: Powers of 1,000 (SI standard)
  • KiB/MiB/GiB: Powers of 1,024 (binary)

Your "1 TB" hard drive is 1,000,000,000,000 bytes, not 1,099,511,627,776. That's why it looks "smaller" than expected.

Time Conversions

Months don't have consistent days. Years don't have consistent days (leap years). Time zones shift with daylight saving.

"30 days from now" and "one month from now" aren't the same thing.

"24 hours from now" might be 23 or 25 hours of wall clock time during DST transitions.

Currency and Units

Currency isn't just numbers. Exchange rates change constantly. Historical prices need historical exchange rates.

"$100 in 1970" isn't the same as "$100 today" due to inflation. Conversion requires both exchange rates and purchasing power adjustments.

Precision Matters

2.54 cm per inch is exact (by definition since 1959).

But many conversions are approximations. 1 mile ≈ 1.609344 km. How many decimal places do you need?

For everyday use, two decimal places work. For engineering or science, you need more precision and need to track significant figures.

Practical Tips

State your units explicitly. "Weight: 150" means nothing. "Weight: 150 lbs" is clear.

Know your audience. US users expect Fahrenheit and miles. Most of the world uses Celsius and kilometers.

Use ISO standards when possible. ISO 8601 for dates (YYYY-MM-DD), SI units for science.

Test conversions round-trip. Convert A to B, then B back to A. Rounding errors accumulate.


Unit conversion errors are everywhere from recipe failures to spacecraft crashes. Double-check which unit system you're using, be explicit in your code and documents, and test conversions thoroughly.