Unit Converter
Convert length, mass (weight), volume and temperature between metric, US and imperial units. Each unit uses its exact definition and the arithmetic is exact, so 1 lb gives exactly 0.45359237 kg and 0.3 m gives exactly 30 cm.
Convert a value
Nothing you type or record is uploaded.
Your value in every unit
| Unit | Value |
|---|
Runs on your device. Nothing you type or record is uploaded. Keeps working without a connection while the page is open. Works with touch. Saves the quantity, the two units and your value on this device.
Added · Updated : added volume with exact US and imperial units
How to use the unit converter
- Choose a quantity: length, mass (weight), volume or temperature. The unit lists change with it. For volume, US and imperial units with the same name are listed separately.
- 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). If a value contains both a comma and a point, the converter shows an error asking you to remove the thousands separators.
- 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, mass or volume is defined as a fixed multiple of a base unit: the metre for length, the kilogram for mass and the litre for volume. 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: 1 US gallon to imperial gallons. 3.785411784 ÷ 4.54609 = 0.832674184629 imp gal (rounded to 12 significant digits). The other way round, an imperial gallon is about 1.2 US gallons.
Example 5: 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 |
| litre | 1 dm³ = 1000 ml |
| US gallon | 231 in³ = 3.785411784 l |
| US quart | 1/4 US gal = 0.946352946 l |
| US pint | 1/8 US gal = 473.176473 ml |
| US cup | 1/2 US pt = 8 US fl oz = 236.5882365 ml |
| US fluid ounce | 1/128 US gal = 29.5735295625 ml |
| imperial gallon | 4.54609 l |
| imperial quart | 1/4 imp gal = 1.1365225 l |
| imperial pint | 1/8 imp gal = 568.26125 ml |
| imperial fluid ounce | 1/20 imp pt = 28.4130625 ml |
Volume starts from the litre, which is one cubic decimetre. The US gallon is defined as 231 cubic inches; with the inch of 2.54 cm that is exactly 3.785411784 l, and the US quart, pint, cup and fluid ounce are fixed fractions of it. The imperial gallon is 4.54609 l under the UK Weights and Measures Act 1985, which divides the pint into 20 fluid ounces, where the US pint has 16. Two more cups are recipe conventions that none of the sources below defines: the metric cup of 250 ml and the imperial cup of half an imperial pint (284.130625 ml).
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, and 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 under Mass is a unit of mass, and a fluid ounce under Volume is a unit of volume. Going from one to the other needs the density of the substance, which this tool does not know; the cups to grams converter has densities for common ingredients.
- US and imperial units with the same name differ. An imperial gallon, quart or pint is about 20 percent larger than the US one, but an imperial fluid ounce is about 4 percent smaller than a US fluid ounce, because the imperial pint has 20 fluid ounces and the US pint 16.
- 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.
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.
Sources
- NIST (accessed 25 October 2026). NIST Handbook 44-2026, Appendix C: General Tables of Units of Measurement. National Institute of Standards and Technology. The US definitions: the yard of 0.9144 m and the pound of 0.45359237 kg, the gallon of 231 cubic inches with its quarts, pints and fluid ounces, and the cup of 8 fluid ounces.
- UK Parliament (accessed 25 October 2026). Weights and Measures Act 1985, Schedule 1. legislation.gov.uk. The litre as a cubic decimetre, the pint of 0.56826125 dm³, the gallon of 4.54609 dm³, the quart of 1/4 gallon and the fluid ounce of 1/20 pint.
- National Bureau of Standards (1959). Refinement of Values for the Yard and the Pound. Federal Register, 1 July 1959 (F.R. Doc. 59-5442), reprint at NIST. The international yard of 0.9144 m and pound of 0.45359237 kg, used from 1 July 1959 in the United States and by the standards laboratories of Australia, Canada, New Zealand, South Africa and the United Kingdom, and the inch of exactly 25.4 mm.