Unit Converter
Convert length, mass (weight) and temperature between metric and imperial units. The result updates as you type, a table shows your value in every unit at once, and the arithmetic is exact, so you never see rounding noise such as 0.30000000000000004.
Convert a value
Everything is calculated in your browser; nothing you type is sent anywhere.
Your value in every unit
| Unit | Value |
|---|
How to use the unit converter
- Choose a quantity: length, mass (weight) or temperature. The unit lists change with it.
- Type a value. A minus sign is allowed, which temperatures need. A decimal point or a decimal comma both work; do not type thousands separators (write 1234.5, not 1,234.5).
- Pick the From unit and the To unit. The result changes at once.
- Read the table underneath: it shows the same amount in every unit of the chosen quantity, with your From and To rows marked.
- Swap exchanges the two units and moves the result into the value box, so the amount stays the same. Copy result copies a line such as "1 mi = 1.609344 km". Your choices are remembered in this browser.
How the conversion works
Every unit of length or mass is defined as a fixed multiple of a base unit: the metre for length and the kilogram for mass. To convert, the tool goes through the base unit:
result = value × factor(from) ÷ factor(to)
Here factor is the number of base units in one of that unit. For miles to kilometres the factors are 1609.344 and 1000, so the result is the value times 1.609344. All factors are stored as exact decimals and the arithmetic uses exact fractions of whole numbers, not binary floating point, which is why a value like 0.3 m gives exactly 30 cm.
Temperature cannot be done with a factor alone. The scales also start at different places: 0 °C is 32 °F and 273.15 K. A conversion therefore needs an offset as well as a factor. The tool converts through Celsius:
K = °C + 273.15 and °F = °C × 9/5 + 32
Kelvin is the absolute scale, and nothing can be colder than 0 K. If the value is below absolute zero (below -273.15 °C, -459.67 °F or 0 K) the tool shows a message instead of a number.
Rounding. Results are rounded half up to 12 significant digits and trailing zeros are dropped. When the exact answer has 12 digits or fewer, it is shown in full. Values of 1015 or more, and values below 0.000001, are written in scientific notation, for example 6.21371192237e-7. Because the calculation itself is exact, rounding happens once, at the end.
Examples
Example 1: 5 km to miles. 5 km is 5000 m, and a mile is 1609.344 m, so 5000 ÷ 1609.344 = 3.10685596119 mi (rounded to 12 significant digits).
Example 2: 150 lb to kg. One pound is exactly 0.45359237 kg, so 150 × 0.45359237 = 68.0388555 kg. The result is exact, with no rounding.
Example 3: 98.6 °F to °C. (98.6 − 32) × 5/9 = 66.6 × 5/9 = 37 °C. In the table the same value appears as 310.15 K.
Example 4: 0.3 m to cm. 0.3 ÷ 0.01 = 30 cm. Plain floating-point code can leave small errors in results like this; the famous case is 0.1 + 0.2 = 0.30000000000000004. Exact arithmetic avoids them.
The exact definitions and where they come from
The metre is defined through the speed of light and the kilogram through the Planck constant, and the other units here are tied to them by fixed numbers. In 1959 several English-speaking countries, including the United States and the United Kingdom, agreed on the international yard and the international pound. The yard became exactly 0.9144 m and the pound exactly 0.45359237 kg. The inch follows from the yard, because 36 inches make a yard: 0.9144 ÷ 36 = 0.0254 m, so an inch is exactly 25.4 mm.
| Unit | Exact value |
|---|---|
| inch | 2.54 cm |
| foot | 12 in = 0.3048 m |
| yard | 3 ft = 0.9144 m |
| mile (statute) | 5280 ft = 1609.344 m |
| nautical mile | 1852 m |
| pound | 0.45359237 kg |
| ounce (avoirdupois) | 1/16 lb = 28.349523125 g |
| stone | 14 lb = 6.35029318 kg |
| short ton (US) | 2000 lb = 907.18474 kg |
| long ton (UK) | 2240 lb = 1016.0469088 kg |
| tonne (metric) | 1000 kg |
The Celsius scale is defined from kelvin: a temperature in °C is the temperature in K minus 273.15. The Fahrenheit scale is tied to Celsius by the factor 9/5 and the offset 32.
Common mistakes
- Mass and weight are not the same thing. Mass, measured in kilograms or pounds, is the amount of matter. Weight is the force of gravity on it. Everyday scales and labels use "weight" for mass, and so does the name of this page, but your mass is the same on the Moon even though your weight is not.
- There are three tons. The metric tonne is 1000 kg, the US short ton is 907.18474 kg and the UK long ton is 1016.0469088 kg. They differ by up to about 12 percent, so check which one a document means.
- An ounce here is a unit of mass. A fluid ounce measures volume and cannot be converted to grams without knowing the liquid. This tool does not convert volumes.
- A temperature and a temperature difference are different. A warming of 10 K is also 10 °C, and it is 18 °F, because only the factor 9/5 applies to a difference and the offset cancels. This tool converts temperatures, not differences.
- Statute and nautical miles differ. A nautical mile is 1852 m, about 15 percent longer than the 1609.344 m statute mile.
Frequently asked questions
How many kilometres are in a mile?
Exactly 1.609344 km, because a mile is defined as 1609.344 m. The other way round, one kilometre is 0.621371192237 mi to 12 significant digits.
How many pounds are in a kilogram?
One kilogram is 1 ÷ 0.45359237 lb, which is 2.20462262185 lb to 12 significant digits. The exact value does not end, so the tool rounds it.
Why is -40 the same in Celsius and Fahrenheit?
Set °C × 9/5 + 32 equal to °C and solve: °C × 4/5 = -32, so °C = -40. It is the one point where both scales agree.
Can I type a decimal comma?
Yes. A single comma is read as the decimal separator, so 2,5 means 2.5. If you type a comma and a point together, or several of either, the tool asks you to remove the thousands separators instead of guessing.
What happens with very large or very small numbers?
They are converted exactly and shown in scientific notation once they reach 1015 or fall below 0.000001. The value you type can have up to 40 digits and an exponent such as 1e30.
Is my data sent anywhere?
No. The conversion runs in your browser. The quantity, the units and the value are kept only in this browser's local storage, so they are still there when you return, and nothing is uploaded.
Related tools
- Significant Figures Calculator — count and round significant figures in a measurement.
- Percentage Calculator — percentages, percent change and percent of a number.
- Molar Mass Calculator — find the mass of a mole of a compound in g/mol.
- TDEE Calculator — estimate daily calorie needs from body measurements.
- Ideal Gas Lab — explore pressure, volume and temperature, where kelvin is required.