How Unit Conversion Works
A practical guide to converting units accurately, with simple checks to avoid mistakes.
What a “unit” actually is
A unit is just a labelled scale for measuring a physical quantity. The quantity (distance, mass, energy, pressure, etc.) stays the same, but the number you write down changes depending on the unit you choose. For example, a road distance can be written as 1 kilometre or 0.621371 miles. Same distance, different label and scale.
The safest approach: convert through a base unit
A reliable conversion method is to convert through a single reference unit (a “base unit”). For length, a convenient base unit is the metre. To convert between any two units, you:
- Convert the input value into the base unit.
- Convert from the base unit into the target unit.
This avoids messy “direct” conversions between many unit pairs and reduces the chance of inconsistent results. It also makes the code simpler: you only need each unit’s conversion to/from the base unit.
Example: feet → metres
The conversion factor is 1 ft = 0.3048 m. So:
10 ft × (0.3048 m / 1 ft) = 3.048 m
Notice how ft cancels out, leaving m. That “cancelling units” idea is a simple way to sanity-check your steps.
Linear conversions vs conversions with offsets
Many conversions are linear. That means you multiply or divide by a constant factor: metres ↔ feet, kilograms ↔ pounds, bar ↔ psi, joules ↔ kWh, and so on.
Temperature is different because it has an offset. Celsius and Fahrenheit do not share the same zero point, so you can’t convert using only multiplication. You need a multiply and an add/subtract:
°C → °F: (°C × 9/5) + 32
°F → °C: (°F − 32) × 5/9
°C ↔ K: K = °C + 273.15
That’s why 0 °C becomes 32 °F, not 0 °F.
Dimensional analysis: the “unit cancelling” trick
Dimensional analysis is a simple technique to avoid mistakes: write your number with its unit, then multiply by conversion fractions that cancel the old unit and leave the new one.
Example: kilometres per hour → metres per second:
90 km/h × (1000 m / 1 km) × (1 h / 3600 s)
= 25 m/s
The units cancel step-by-step, which is exactly what you want.
Reasonableness checks that catch most errors
- Bigger unit → smaller number: 1 mile is longer than 1 kilometre, so km → miles should reduce the number.
- Orders of magnitude: 1 bar is about 100,000 Pa — if you get 100 Pa, something’s wrong.
- Energy vs power: kWh is energy; kW is power. If you mix them, results can be wildly off.
- Temperature offsets: if you used only multiplication for °C/°F, it will be wrong.
Rounding: when it helps and when it hurts
Rounding makes numbers readable, but rounding too early can introduce noticeable error in multi-step calculations. A good rule is: keep extra precision during intermediate steps, then round at the end for display.
For everyday use, showing 2–6 decimal places is usually enough. For engineering work, keep more digits and use appropriate standards for significant figures.
Next steps
If you want a quick way to put these ideas into practice, use the converter and compare the “convert to all units” list to confirm the number looks sensible.