The CONVERT function changes a value from one unit to another — miles to kilometers, pounds to kilograms, Fahrenheit to Celsius, hours to seconds — using built-in unit codes, so you never hunt for a conversion factor again.
The example
Common everyday conversions.
| A | B | |
|---|---|---|
| 1 | Conversion | Result |
| 2 | 5 mi → km | 8.05 |
| 3 | 10 lbm → kg | 4.54 |
| 4 | 100 F → C | 37.78 |
The formula
Miles to kilometers:
How it works
Three arguments: value, from-unit, to-unit:
- Pass the number, then the from and to unit codes as text — e.g.
"mi"miles,"km"kilometers. - CONVERT only works within the same category — distance to distance, weight to weight. It won’t convert miles to pounds.
- Common codes: distance
"mi" "km" "m" "ft" "in"; weight"lbm" "kg" "g"; temperature"F" "C" "K"; time"hr" "mn" "sec" "day". - Unit codes are case-sensitive —
"K"is Kelvin,"k"is a kilo prefix.
Metric prefixes work too: CONVERT understands prefixes like "k" (kilo) and "c" (centi) on metric units — =CONVERT(1, "m", "cm") gives 100. Great for scaling within the metric system.
Try it: interactive demo
Convert a value between a few common units.
Variations
Temperature
Fahrenheit to Celsius:
Time
Hours to seconds:
Metric prefixes
Meters to centimeters:
Pitfalls & errors
#N/A from a wrong code or mismatched category. Converting "mi" to "kg" (distance to weight) errors, as does a misspelled unit. Use the exact codes.
Codes are case-sensitive. Weight pounds is "lbm", not "lb"; Kelvin is "K". Check the documented code list.
Some niche units vary by version. Most common units are universal, but a few specialized ones were added in later Excel releases.
Practice workbook
Frequently asked questions
How do I convert units in Excel?
What unit codes does CONVERT use?
Why does CONVERT return #N/A?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class