Unit Converter · 5 min read
Unit Conversion Mistakes That Have Destroyed Real Things
Every one of these had competent engineers, review processes and working arithmetic. What they lacked was a unit written next to the number.
Unit errors are unusual among engineering failures in that the arithmetic is always correct. Nobody miscalculates. The number is simply interpreted in the wrong system, and everything downstream proceeds confidently.
The Mars Climate Orbiter
NASA lost a $327 million spacecraft in September 1999 because two teams used different units.
Lockheed Martin’s ground software produced impulse values in pound-force seconds. NASA’s navigation software at JPL expected newton-seconds. One pound-force second is 4.45 newton-seconds, so every thruster firing was recorded as 4.45 times weaker than it actually was.
The error accumulated across months of small trajectory corrections. When the orbiter reached Mars it was roughly 170 km lower than intended, inside the atmosphere rather than above it. It broke up.
The investigation board found that engineers had noticed trajectory anomalies during the cruise phase and raised them, but the concerns were not tracked to resolution. The interface specification did require SI units. It was simply not enforced anywhere in code or review.
The Gimli Glider
In July 1983, Air Canada Flight 143 ran out of fuel at 41,000 feet over Ontario.
The Boeing 767 was among the first Canadian aircraft delivered with metric instrumentation, during the country’s transition from imperial. The fuel quantity system was inoperative, so the crew calculated the load manually from a dipstick reading in litres.
To convert litres to a mass they used 1.77: the density of jet fuel in pounds per litre. The aircraft needed kilograms. The correct factor was 0.803.
They loaded roughly 22,300 pounds of fuel believing they had 22,300 kilograms, about 45% of what the flight required.
Both engines failed mid-flight. The captain had gliding experience and the first officer knew of a decommissioned airbase at Gimli, Manitoba. They landed the airliner without power on a runway that had been converted into a drag strip, with people on it. Nobody was killed. The aircraft flew again.
Three more
Space Mountain, Tokyo Disneyland (2003). An axle broke on a roller coaster mid-ride. The cause was a part manufactured to imperial dimensions after a 1995 specification change to metric, a 0.86 mm discrepancy in axle diameter, enough to cause the bearing to fail. No injuries; the ride was closed for months.
Institute for Cancer Treatment, Panama (2000). Radiation therapy planning software was given data in an order it did not expect, producing dose calculations far above intent. At least eight patients died, and more were injured. The case is now standard reading in medical device safety courses.
Aviation altitude, ongoing. Most of the world measures altitude in feet. Russia, China and a few neighbours historically used metres, and transition zones require conversion. Several near-misses have been attributed to this, and it is a live issue in air traffic management rather than a historical curiosity.
The common pattern
Every one of these shares a structure:
- A number is passed across a boundary: between organisations, between systems, between an old process and a new one.
- The unit is implicit rather than attached to the value.
- Both sides are internally consistent, so nothing looks wrong locally.
- The error is dimensionally plausible, so no sanity check catches it.
That last point is what makes unit errors so persistent. If a fuel calculation produced a negative number or something a thousand times too large, someone would notice. An answer that is 2.2× wrong looks entirely reasonable.
The everyday equivalents
The same failure appears in ordinary work without the headlines:
- Three different tons. A short ton is 2,000 lb (907 kg), a long ton is 2,240 lb (1,016 kg), a metric tonne is 1,000 kg. Shipping quotes routinely just say "ton".
- US and imperial fluid measures. Different gallons, pints and fluid ounces. Halving a British recipe with American cups does not work.
- Fuel economy inverted. Miles per gallon is distance over volume; litres per 100 km is volume over distance. They move in opposite directions, so you cannot convert by a simple factor: you have to invert. And the US and imperial gallons differ, so US mpg and UK mpg are not the same number either.
- Pressure. psi, bar, kPa, atm and mmHg all appear on equipment, sometimes on the same machine.
- Bytes. A "1 TB" drive is 1012 bytes to the manufacturer and 240 bytes to Windows, which is why it shows as 931 GB. Both are defensible; only one is on the box.
Which factors are exact
This matters more than it sounds, because rounding a factor early is the usual reason two converters disagree in the fourth decimal.
Exact by international agreement:
- 1 inch = 25.4 mm exactly (1959)
- 1 pound = 0.45359237 kg exactly (1959)
- 1 nautical mile = 1852 m exactly
- 1 US gallon = 231 cubic inches exactly, hence 3.785411784 L
- 1 calorie (thermochemical) = 4.184 J exactly
Everything derived from these (feet, yards, miles, ounces) is exact too. The metre, second, kilogram and the other SI base units have been defined in terms of fixed physical constants since 2019, so they carry no measurement uncertainty either.
Not exact: anything defined empirically. Historical astronomical units, some older survey measures, and any unit still tied to a physical artefact rather than a constant.
How to not do this
- Put the unit in the name.
distance_km, notdistance. This single habit eliminates most of the class. - Convert once, at the boundary. Work internally in one system and convert on input and output only. Repeated conversions compound rounding.
- Use a units library in code where the domain warrants it, several languages have type systems that make a metre-plus-second a compile error.
- Sanity check the magnitude. Ask what the answer should roughly be before computing it. A person who expects "about 60 kg" catches a 132 immediately.
- Label every output. A number without a unit is not an answer.
The converters here print the unit next to every field and label the result, precisely because that is the step that fails. Factors used are the exact ones where an exact definition exists.
Common questions
Is a US gallon the same as a UK gallon?
No, and the gap is large. A US liquid gallon is 3.785 litres; an imperial gallon is 4.546 litres, about 20% bigger. US and UK pints, quarts and fluid ounces differ too, and not by the same proportion, because the US fluid ounce is 29.57 ml against the imperial 28.41 ml. Recipes crossing the Atlantic are a common casualty.
Which conversion factors are exact?
More than people assume. The inch is exactly 25.4 mm and the pound is exactly 0.45359237 kg, both by international agreement in 1959. The mile, foot, yard and ounce follow exactly from those. Nautical mile is exactly 1852 m. What is not exact are units tied to measured physical constants, such as the astronomical unit historically, or any unit defined by a material artefact.
Why does temperature need a different formula?
Because Celsius and Fahrenheit have different zero points as well as different scale sizes, so the conversion is affine rather than a simple ratio: multiply and add. Kelvin and Rankine are absolute scales starting at true zero, so converting between Celsius and Kelvin is addition only. A temperature difference converts differently from a temperature value: 10°C of warming is 18°F of warming, not 50°F.