CONVERT function
Converts a measurement from one unit to another: miles to km, °F to °C, pounds to kg, gallons to litres and 100+ more units.
Available in Excel 2007 and later (Excel 2003 needed the Analysis ToolPak add-in), Microsoft 365, Excel for the web, Excel for Mac (more units, such as mph and binary prefixes, were added in Excel 2013)
Excel 2007 and laterWorks in Google Sheets
Syntax
CONVERT(number, from_unit, to_unit)| Argument | What it means | |
|---|---|---|
number | Required | The value to convert. |
from_unit | Required | The unit code of number, as text, for example "mi", "lbm", "F". Codes are case-sensitive. |
to_unit | Required | The unit code to convert to. It must measure the same kind of quantity (length to length, mass to mass and so on). |
Returns: A number: the value expressed in to_unit.
How CONVERT works
CONVERT changes a measurement from one unit to another without you having to remember any conversion factors. It covers length, area, volume, mass, temperature, speed, time, pressure, force, energy, power, magnetism and information (bits and bytes) — more than a hundred units in all. If you work with suppliers or customers who use different systems, it saves a lot of hard-coded factors like 2.20462.
You pass the number and two unit codes as text. The codes are short and case-sensitive: "m" is metres but "M" is not a unit; "C" is degrees Celsius; "mi" is the statute mile while "Nmi" is the nautical mile. Metric codes accept standard prefixes in front of them: "km", "cm", "mg", "kW", "MJ". Both units must measure the same thing; converting kilograms to metres returns #N/A.
Temperatures are handled correctly, including the offset (CONVERT(32,"F","C") is 0, not 17.8). Note that Excel separates mass ("lbm", pound mass) from force ("lbf", pound force) — a frequent source of #N/A when people type "lb".
Examples
1Pounds to kilograms
| A | B | C | |
|---|---|---|---|
| 1 | Parcel | Weight (lb) | |
| 2 | Box A | 12 | 5.44310844 |
Result: 5.44310844
One pound mass is exactly 0.45359237 kg, so 12 lb is 5.44310844 kg. Note the unit code is lbm (pound mass), not lb.
2Fahrenheit to Celsius
| A | B | C | |
|---|---|---|---|
| 1 | Reading | °F | |
| 2 | Body temp | 98.6 | 37 |
Result: 37
CONVERT applies the full formula (°F − 32) × 5/9, so 98.6 °F becomes 37 °C. Use "K" for kelvin.
3Marathon distance in km
| A | B | C | |
|---|---|---|---|
| 1 | Race | Miles | |
| 2 | Marathon | 26.2 | 42.1648128 |
Result: 42.1648128
mi is the statute mile (1,609.344 m) and the k prefix on m gives kilometres, so 26.2 miles is 42.1648128 km. Format the cell with 1 decimal for 42.2.
4Prefixes work on metric units
| A | B | |
|---|---|---|
| 1 | Distance (m) | |
| 2 | 2500 | 2.5 |
Result: 2.5
Any SI prefix can go in front of a metric unit: km, cm, mm, um (micro). 2,500 metres is 2.5 km.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A | A unit code is misspelt or in the wrong case ("KG", "Lb"), the unit does not exist ("lb", "kph"), or the two units measure different things. | Check the code and its capitalisation (see the unit list in the tips). Use "lbm" for pounds and "mph" or "m/h" for speeds, and keep both units in the same group. |
#VALUE! | number is text that is not a number. | Make sure the value cell holds a number, not text with a unit like 12 kg. |
Tips
- Handy unit codes — length:
m,km,cm,mm,mi,Nmi,yd,ft,in; mass:g,kg,lbm,ozm,stone,ton(short ton); volume:l(orL),ml,gal(US),uk_gal,qt,pt,cup,tsp,tbs,oz(US fluid ounce),m3; area:m2,ft2,ha,uk_acre,us_acre. - More codes — temperature:
C,F,K; speed:m/s,m/h,mph,kn(knot); time:yr,day,hr,mn(minute),sec; pressure:Pa,atm,mmHg,psi,Torr; energy:J,cal,Wh,kWh,BTU,eV; power:W,kW,HP; force:N,lbf; information:bit,byte. - Prefixes:
kkilo,Mmega,Ggiga,ccenti,mmilli,umicro,nnano. Binary prefixes for bits and bytes (Excel 2013+):ki,Mi,Gi,Ti— so=CONVERT(1,"Gibyte","Mbyte")is 1073.741824. - Put the unit codes in cells and refer to them (
=CONVERT(B2, $E$1, $F$1)) so you can switch units for a whole column at once. - In CONVERT a year (
yr) is 365.25 days, so it is fine for averages but not for calendar maths — use date functions for that.
Questions
Why does CONVERT return #N/A for pounds?
Excel uses "lbm" for pound mass; "lb" is not a valid code. Use =CONVERT(A1,"lbm","kg").
Can CONVERT handle currencies?
No. Currencies change every day, so CONVERT does not include them. Use a rate table with XLOOKUP or the Currencies data type in Microsoft 365.
Is CONVERT case-sensitive?
Yes. "m" (metre) and "M" are different, and "Kg" is not recognised — use "kg".
Google Sheets
CONVERT also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
CONVERT in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | KONVERTER |
| Dutch | CONVERTEREN |
| Finnish | MUUNNA |
| German | UMWANDELN |
| Hungarian | KONVERTÁLÁS |
| Italian | CONVERTI |
| Norwegian (Bokmål) | KONVERTER |
| Polish | KONWERTUJ |
| Portuguese (Brazil) | CONVERTER |
| Portuguese (Portugal) | CONVERTER |
| Russian | ПРЕОБР |
| Spanish | CONVERTIR |
| Swedish | KONVERTERA |
| Turkish | ÇEVİR |