In Excel: use =CONVERT(number, "from", "to") — it converts between measurement units, so =CONVERT(5, "mi", "km") returns 8.047.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
number | required | The value to convert. |
from_unit | required | Source unit code in quotes, such as "kg", "mi", "C". Case-sensitive. |
to_unit | required | Target unit code in quotes. Must measure the same quantity as from_unit. |
Related functions
Select the result cell and type =CONVERT(.
Select the value, then a comma.
Type the source unit code in quotes, a comma, then the target unit code in quotes.
Press Enter. If you get #N/A, check the spelling and capitalisation of the codes.
What this does
CONVERT translates a value from one unit of measure to another using unit codes given as text: mass, distance, time, temperature, pressure, energy, volume and more. It replaces the hand-typed conversion factors that quietly rot in spreadsheets, and it refuses nonsense — converting kilograms to kilometres returns #N/A rather than a number. The unit codes are case-sensitive, which is the most common stumbling block: "g" is grams and "G" is a metric prefix. Temperature uses "C", "F" and "K", and unlike the others those conversions are not simple multiplications, which CONVERT handles for you. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel convert function”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Miles to kilometres: =CONVERT(5, "mi", "km") returns 8.0467. Pounds to kilograms: =CONVERT(180, "lbm", "kg") returns about 81.65 — note the code is "lbm" for pound-mass, not "lb". Fahrenheit to Celsius: =CONVERT(98.6, "F", "C") returns 37, applying the offset as well as the factor. CONVERT replaces the hand-typed conversion factor — the one nobody re-checks and that is wrong in more spreadsheets than anyone would like. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. For “excel convert function”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Getting the case wrong — the codes are case-sensitive, so "Km" fails where "km" works.
- Converting between incompatible quantities, such as mass to length, which returns
#N/A. - Assuming a code exists for every unit; the list is fixed, and anything outside it needs a manual factor.
Frequently asked questions
Why does CONVERT return #N/A?
Either a unit code is misspelled or wrongly capitalised, or the two units measure different quantities. Check the case first — it is the usual cause.
Can CONVERT handle temperature?
Yes, using "C", "F" and "K". Those conversions involve an offset rather than a simple factor, and CONVERT applies it correctly.
How do I convert pounds to kilograms?
=CONVERT(A2, "lbm", "kg"). Note the code is "lbm" for pound-mass, not "lb".