Clever Quest Lab Tools

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

Result

Nothing you type or record is uploaded.

Your value in every unit

UnitValue

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

  1. 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.
  2. 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.
  3. Pick the From unit and the To unit. The result changes at once.
  4. Read the table underneath: it shows the same amount in every unit of the chosen quantity, with your From and To rows marked.
  5. 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.

UnitExact value
inch2.54 cm
foot12 in = 0.3048 m
yard3 ft = 0.9144 m
mile (statute)5280 ft = 1609.344 m
nautical mile1852 m
pound0.45359237 kg
ounce (avoirdupois)1/16 lb = 28.349523125 g
stone14 lb = 6.35029318 kg
short ton (US)2000 lb = 907.18474 kg
long ton (UK)2240 lb = 1016.0469088 kg
tonne (metric)1000 kg
litre1 dm³ = 1000 ml
US gallon231 in³ = 3.785411784 l
US quart1/4 US gal = 0.946352946 l
US pint1/8 US gal = 473.176473 ml
US cup1/2 US pt = 8 US fl oz = 236.5882365 ml
US fluid ounce1/128 US gal = 29.5735295625 ml
imperial gallon4.54609 l
imperial quart1/4 imp gal = 1.1365225 l
imperial pint1/8 imp gal = 568.26125 ml
imperial fluid ounce1/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

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