Back to All Tools

Unit Converter

Convert length, weight, temperature, volume, speed, area and data units, using exact official factors.

100% Private — Your data never leaves your browser. Everything runs locally on your device.

How the converter works

Pick a category, pick the From and To units, and type a number. The result appears as you type. The seven categories are Length, Weight, Temperature, Volume, Speed, Area and Data.

Each category has one base unit: meter, kilogram, liter, meters per second, square meter or byte. The tool turns your number into the base unit, then into the target unit. Here is 5 miles to kilometers:

5 miles × 1609.344 = 8046.72 meters
8046.72 meters ÷ 1000 = 8.04672 km

How many digits the result shows

The result shows up to 12 significant digits, and zeros at the end are dropped. Computers store numbers in binary, so a sum like 36 × (1 ÷ 3.6) comes out as 10.000000000000002 inside the computer. Rounding to 12 digits removes that tiny noise, so you see 10.

Very small results are never shown as 0. Below 0.000001 the tool uses e-notation. For example, 1 milligram in tonnes shows as 1e-9, which means 1 × 10⁻⁹, or 0.000000001. Very large results keep every whole-number digit, so 1 TiB shows as 1099511627776 bytes.

The conversion factors this tool uses

This table shows what one of each unit equals in the base unit. Every value is the exact official definition, not a rounded copy. That is why 1 gallon gives exactly 4 quarts and 1 sq mile gives exactly 640 acres.

UnitEquals (exact)Where the number comes from
Length (base: meter)
kilometer / centimeter / millimeter1000 / 0.01 / 0.001 mmetric prefixes
inch0.0254 m2.54 cm, by definition
foot0.3048 m12 inches
yard0.9144 m3 feet
mile1609.344 m5280 feet
Weight (base: kilogram)
gram / milligram0.001 / 0.000001 kgmetric prefixes
pound0.45359237 kginternational pound, by definition
ounce0.028349523125 kg1/16 pound
tonne (metric)1000 kgmetric ton
US ton (short)907.18474 kg2000 pounds
UK ton (long)1016.0469088 kg2240 pounds
Volume (base: liter, US units)
milliliter0.001 Lmetric prefix
gallon (US)3.785411784 L231 cubic inches
quart (US)0.946352946 L1/4 gallon
cup (US)0.2365882365 L1/16 gallon
fluid ounce (US)0.0295735295625 L1/128 gallon
Speed (base: meters/sec)
km/hour0.2777… m/s1000 m ÷ 3600 s (the 7 repeats forever)
miles/hour0.44704 m/s1609.344 m ÷ 3600 s
knot0.5144… m/s1852 m (one nautical mile) ÷ 3600 s
Area (base: sq meter)
sq km / hectare1,000,000 / 10,000 m²metric
sq foot0.09290304 m²0.3048 × 0.3048
acre4046.8564224 m²43,560 sq feet
sq mile2,589,988.110336 m²1609.344 × 1609.344 (640 acres)
Data (base: byte)
KB / MB / GB / TB1000 / 1000² / 1000³ / 1000⁴ bytesdecimal units (steps of 1000)
KiB / MiB / GiB / TiB1024 / 1024² / 1024³ / 1024⁴ bytesbinary units (steps of 1024)

For km/hour and knots, the tool keeps the division (1000 ÷ 3600 and 1852 ÷ 3600) instead of a short decimal. So 36 km/hour gives exactly 10 meters/sec, and 10 meters/sec gives exactly 36 km/hour.

Temperature is not a simple multiply

The other categories only multiply and divide. Temperature scales also start at different zero points, so the tool uses formulas:

°F = °C × 9/5 + 32
°C = (°F − 32) × 5/9
K = °C + 273.15

Example: body temperature of 37 °C. 37 × 9/5 = 66.6, and 66.6 + 32 = 98.6 °F. An oven set to 350 °F is (350 − 32) × 5/9 = 176.666666667 °C, which recipes usually round to 175 or 180 °C. At −40 the Celsius and Fahrenheit scales meet, so −40 °C is −40 °F.

Watch out for temperature changes. The tool converts a reading, not a difference. If the weather warms up by 10 °C, that is a change of 18 °F, not 50 °F. For a difference, multiply by 1.8 yourself (or by 5/9 to go the other way). Kelvin and Celsius differences are the same size.

Nothing is colder than absolute zero. Absolute zero is 0 K, which is −273.15 °C or −459.67 °F. If you type a lower value, such as −300 °C, the tool shows a message instead of a result.

US gallons and cups, not UK ones

The Volume units are the US customary units. The UK imperial gallon is bigger, at exactly 4.54609 liters, and a UK fluid ounce is 28.4130625 mL. This tool has no UK option. So if a British recipe or car manual says 10 gallons, that is 45.4609 liters, but the tool reads 10 gallons as 37.85411784 liters. Convert 45.4609 liters and the tool shows 12.009499255 US gallons.

Cups also differ. The tool's cup is the US cup of 236.5882365 mL (1/16 of a US gallon). US nutrition labels use 240 mL, and Australia uses a 250 mL metric cup. For baking, the difference can matter.

Three kinds of ton

The Weight list has three tons, because the word means different things in different places:

Data sizes: 1024 or 1000?

The Data list has both systems, and each unit says which one it is:

So a drive sold as 500 GB holds 500,000,000,000 bytes. Convert 500 gigabyte (GB) to gibibyte (GiB) and you get 465.661287308. This is why Windows shows a new 500 GB drive as about 465 GB. Nothing is missing. It is the same number of bytes, counted two ways.

The Swap button

Swap exchanges the From and To units. It keeps the number you typed. It does not move the result into the From box. For example, 5 miles gives 8.04672 km. Press Swap and the tool now shows 5 km, which is 3.10685596119 miles. To check a result the other way, press Swap and then type the result (8.04672) in the From box. You get 5 again.

Frequently Asked Questions

Why do I sometimes see a result like 1e-9?

That is e-notation for a very small number. 1e-9 means 1 × 10⁻⁹, which is 0.000000001. The tool uses it for results below 0.000001, so a tiny result never shows as 0. For example, 1 milligram in tonnes is 1e-9.

Is the gallon a US gallon or a UK gallon?

It is the US gallon of exactly 3.785411784 liters. The quart, cup and fluid ounce are US units too. A UK imperial gallon is 4.54609 liters, and the tool has no option for it. To convert UK gallons, multiply by 4.54609 to get liters first.

Which ton should I pick?

The Weight list has three. Pick tonne (metric, 1000 kg) for most countries. It is about 2204.62 pounds. Pick US ton (short) for 2000 pounds, which is 907.18474 kg. Pick UK ton (long) for 2240 pounds, which is 1016.0469088 kg.

Why does my 500 GB drive show as 465 GB?

Drive makers count 1 GB as 1,000,000,000 bytes. Windows counts in steps of 1024 but still writes GB. The correct name for the 1024 unit is GiB. In this tool, convert 500 gigabyte (GB) to gibibyte (GiB) and you get 465.661287308. The drive is not missing any space. It is the same size counted two ways.

What happens if I type a temperature below absolute zero?

The tool shows a message instead of a result. Nothing can be colder than absolute zero, which is 0 K, −273.15 °C or −459.67 °F. So a value like −300 °C has no real answer.

What does the Swap button do?

It swaps the From and To units and keeps the number you typed. If you converted 5 miles to kilometers, Swap shows 5 kilometers in miles, which is 3.10685596119. It does not move the result into the From box.

How do I convert a change in temperature, not a reading?

Multiply the Celsius change by 1.8 to get the Fahrenheit change. A rise of 10 °C is a rise of 18 °F. The converter treats every number as a reading, so typing 10 °C gives 50 °F, which is not the same thing.