Sub topic 4
Converting units with conversion factors
This chapter assumes you can do basic algebra with exponents, write numbers in scientific notation, and use SI prefixes such as kilo, centi and milli. The method here is the one you will use in every later calculation that mixes unit systems.
Why a conversion factor is the number 1
A physical quantity is a number times a unit, so changing the unit changes the number but not the quantity. A length of 1 mile and a length of 1609.344 m are the same length written two ways.
A conversion factor is a ratio that equals 1 because its numerator and denominator are the same quantity in different units. From 1 in = 0.0254 m you can build two factors:
- (0.0254 m) / (1 in) = 1
- (1 in) / (0.0254 m) = 1
Multiplying by 1 never changes a quantity. You pick whichever form makes the unwanted unit cancel. Units are algebraic symbols, so they multiply, divide and cancel just as variables do.
The cancellation procedure
- Write the starting quantity with its unit.
- Identify the target unit.
- Choose conversion factors, oriented so each unwanted unit appears once in a numerator and once in a denominator.
- Cancel units and confirm that only the target unit remains.
- Multiply the numbers and report the result with the right precision.
Worked example: speed
Convert 60 miles per hour to metres per second. Use 1 mi = 1609.344 m and 1 h = 3600 s:
60 mi/h × (1609.344 m / 1 mi) × (1 h / 3600 s) = 26.82 m/s
The miles cancel against miles, and the hours cancel against hours. What remains is m/s. In Python:
mph = 60
metres_per_second = mph * 1609.344 / 3600
print(round(metres_per_second, 2)) # 26.82The check on units is the most useful step. If you had put 3600 s in the numerator, you would be left with h·mi/(s²) style units, and the mismatch tells you to flip the factor.
Exact and measured conversion factors
Many factors are exact by definition. They have no uncertainty, so they never limit the number of significant figures in your answer. Only the measured input does.
| Relation | Value | Status |
|---|---|---|
| 1 in | 0.0254 m | exact |
| 1 ft | 0.3048 m | exact |
| 1 mi | 1609.344 m | exact (5280 ft) |
| 1 lb (avoirdupois pound, mass) | 0.45359237 kg | exact |
| 1 US gal | 3.785411784 L | exact |
| 1 L | 0.001 m³ | exact |
| 1 h | 3600 s | exact |
Factors that come from measurement, such as the energy content of a fuel or an approximate "1 mile ≈ 1.6 km", carry their own uncertainty. A rounded factor like 1.6 km/mi limits the result to two figures, so use the exact value when one exists and round only at the end.
Chaining factors through SI
When a table lists each unit in terms of the SI unit, you can convert between any two units in that table without needing a direct factor. Convert the source to SI, then SI to the target. The ratio of the two table entries does this in one step.
LENGTH_IN_M = {
"m": 1.0,
"km": 1000.0,
"cm": 0.01,
"in": 0.0254,
"ft": 0.3048,
"mi": 1609.344,
}
def convert(value, src, dst, table, power=1):
"""Convert value from src to dst. Use power=2 for areas, 3 for volumes."""
return value * (table[src] / table[dst]) ** power
print(round(convert(26.2, "mi", "km", LENGTH_IN_M), 2)) # 42.16
print(round(convert(1.0, "ft", "in", LENGTH_IN_M), 6)) # 12.0
print(round(convert(5.0, "in", "cm", LENGTH_IN_M, power=2), 3)) # 32.258The power argument leads to the most common source of conversion errors, covered next.
Converting squares and cubes
A conversion factor applies to the unit, so when the unit is squared, the factor is squared too. Since 1 in = 2.54 cm:
1 in² = (2.54 cm)² = 6.4516 cm²
Then 5.0 in² = 5.0 × 6.4516 cm² = 32.258 cm², which is 32 cm² to two significant figures. Using 2.54 instead of 6.4516 would give 12.7 cm², wrong by a factor of 2.54.
Volumes work the same way. 1 m³ = (100 cm)³ = 10⁶ cm³, and 1 L = 1000 cm³ because 1 L = 0.001 m³ = 0.001 × 10⁶ cm³.
You can also write the squared factor out in full so the cancellation shows it:
5.0 in² × (2.54 cm / 1 in)² = 5.0 in² × 6.4516 cm²/in² = 32.258 cm²
Compound units
Quantities such as density, pressure and flow rate have units made of several base units. Convert each part separately, using one factor per unit to be replaced.
Convert the density of iron, 7.87 g/cm³, to kg/m³:
7.87 g/cm³ × (1 kg / 1000 g) × (100 cm / 1 m)³ = 7.87 × 10⁻³ × 10⁶ kg/m³ = 7870 kg/m³
density_g_cm3 = 7.87
density_kg_m3 = density_g_cm3 * (1 / 1000) * 100 ** 3
print(round(density_kg_m3, 1)) # 7870.0A useful memory aid follows from this: 1 g/cm³ = 1000 kg/m³. Water is about 1 g/cm³, so it is about 1000 kg/m³.
Rates work the same way. 100 km/h × (1000 m / 1 km) × (1 h / 3600 s) = 27.78 m/s. A shortcut is to divide km/h by 3.6 to get m/s, which comes from 1000/3600.
Converting between units of different kinds of scale
Some conversions combine a prefix change with a change of system. Do them in stages and cancel at each stage so you can inspect it. To convert 0.75 US gal/min to L/s:
0.75 gal/min × (3.785411784 L / 1 gal) × (1 min / 60 s) = 0.0473 L/s
The result is 0.047318... L/s, and with the two-figure input the answer is 0.047 L/s.
Conversions that are not pure factors
Temperature scales differ by an offset as well as a scale. The kelvin and the degree Celsius have the same size, but 0 °C is 273.15 K:
T(K) = T(°C) + 273.15
Fahrenheit also changes the size of the degree: T(°C) = (T(°F) − 32) × 5/9. A multiplicative factor alone does not work for these, because zero on one scale is not zero on the other.
Temperature differences do convert by a factor alone. A change of 10 °C equals a change of 10 K and a change of 18 °F.
Other traps
- Mass versus force. The pound (lb) is a unit of mass here. The pound-force (lbf) is a force, about 4.448 N. The confusion between them contributed to the loss of the Mars Climate Orbiter in 1999, when one team's software output pound-force seconds and another's expected newton-seconds.
- Different gallons. The US gallon is 3.785411784 L. The imperial gallon is 4.54609 L. State which one you mean.
- Different tons. A short ton is 2000 lb, a long ton is 2240 lb, and a metric tonne is 1000 kg.
- Dimension mismatch. A conversion factor can only relate quantities with the same dimension. You cannot convert kilograms to metres. If cancellation leaves a different unit than you wanted, the question may be missing information, such as a density needed to turn mass into volume.
- Rounding early. Keep the full factor through the calculation and round the final result. Rounding intermediate values accumulates error, a point developed in the chapters on significant figures.
Exercise
A car travels at 72 km/h. Express this in m/s and then in mi/h, using 1 mi = 1609.344 m. Give the m/s value exactly and the mi/h value to three significant figures.
Show answer
In m/s: 72 × (1000 m / 1 km) × (1 h / 3600 s) = 20 m/s. In mi/h: 72 km/h × (1000 m / 1 km) × (1 mi / 1609.344 m) = 44.74... which rounds to 44.7 mi/h.
Exercise
A tank has a volume of 2.5 m³. Express it in litres and in cm³. Then explain why 1 m³ is not 100 cm³.
Show answer
1 m³ = 1000 L, so 2.5 m³ = 2500 L. 1 m³ = (100 cm)³ = 10⁶ cm³, so 2.5 m³ = 2.5 × 10⁶ cm³. The factor 100 cm/m applies to each of the three lengths in the volume, so it must be cubed, giving 10⁶ and not 100.
Exercise
A student converts 30 °C to kelvin by multiplying by 273.15. Say what is wrong and give the correct value.
Show answer
The kelvin and Celsius scales have the same degree size but different zero points, so the conversion is an addition, not a multiplication. The correct value is 30 + 273.15 = 303.15 K.