How to convert between units (miles, km, kg, °F…)
✓ Verified in LibreOffice 25.8.7.3Convert measurements — distance, weight, temperature, volume — without hardcoding factors.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =CONVERT(A2,"mi","km") | Unit codes are case-sensitive: "mi", "km", "kg", "lbm", "F", "C", "gal", "l"... |
| Google Sheets | =CONVERT(A2,"mi","km") | Identical. |
| LibreOffice Calc | =CONVERT(A2,"mi","km") | Identical. (Older LibreOffice also had CONVERT_OOO with different codes — avoid it.) |
How it works
CONVERT knows the standard factors: 10 miles is exactly 16.09344 km. The unit strings are case-sensitive ("MI" fails with #N/A) and metric prefixes compose — "g" to "kg", "m" to "cm". Temperature works too (=CONVERT(98.6,"F","C") → 37) and handles the offset correctly, unlike a naive multiply. If you get #N/A, the two units are from incompatible categories — you can't convert kg to km.
Verified, not just documented
We ran =CONVERT(A2,"mi","km") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 16.09344 — exactly the expected result. Every formula here is confirmed by actually executing it.