Unit converter

Pick a category, type a value and choose two units. The page shows the result and a table of the same value in every unit of that category, 80 units in 10 categories. Factors are exact definitions where they exist, and a note appears where US and UK units, 1,000 or 1,024, or the length of a month change the answer. Everything is calculated in this browser.

Unit converter

How to convert a unit

  1. Choose a Category. Length is open by default with km and mi.
  2. Type the Value. A point or a comma works as the decimal mark, see how numbers are read below.
  3. Pick the From and To units. Swap units reverses them.
  4. Read the result line, then the table under it, which lists your value in every unit of the category.

Ten categories, 80 units

The categories are length, mass, area, volume, temperature, speed, time, digital storage, pressure and energy, from 3 units (temperature) to 13 (volume). Length opens with km to mi: 1 km = 0.6213711922 mi.

Fuel economy is not here. Miles per gallon and litres per 100 km are inverses, so no single factor converts one into the other.

Exact factors, checked

Where a legal definition exists, the page uses it: 1 in = 25.4 mm, 1 mi = 1.609344 km, 1 lb = 453.59237 g, 1 atm = 760 mmHg = 14.69594878 psi, 1 kcal = 4.184 kJ, 1 kWh = 3600 kJ.

We checked every pair of units in every category at five values, 3,580 conversions, against Python fractions with the definitions written out again. 3,578 agreed to 11 digits. The other two were 0.001 °C and 0.001 °F converted to their own unit, stored as 0.000999999999976 because of the 273.15 offset. The screen shows 0.001.

US and UK units are separate

Volume lists seven US units (teaspoon to gallon) and three UK ones (fluid ounce, pint, gallon). 1 US gal is 3.785411784 L and 1 UK gal is 4.54609 L, so 1 UK gal = 1.200949926 US gal. A US pint is 473.176473 mL and a UK pint 568.26125 mL. There is a US cup (236.5882365 mL) but no UK cup. A note under Volume results reminds you to check which one your recipe uses.

Mass has the same split: the US ton (short ton) is 907.18474 kg, the tonne 1000 kg.

1,000 or 1,024: kB and KiB

Kilo, mega and giga mean powers of 1,000 here, and kibi, mebi and gibi mean 1,024 steps. 1 GB = 0.9313225746 GiB, 1 GiB = 1073.741824 MB, 1 TB = 0.9094947018 TiB and 1 kB = 0.9765625 KiB. A 500 GB drive is 465.6612873 GiB, and 100 MB = 800000000 bit. A note appears whenever Digital storage is selected. For download times use the download time calculator.

Months and years are averages

A month is a year divided by 12 and a year is 365.25 days: 1 month = 30.4375 day, 1 year = 365.25 day (result lines write units in the singular). Real months run 28 to 31 days, so use this for a length of time, not a date. The age calculator counts calendar dates, and the timestamp converter handles clock time.

Temperature and absolute zero

-40 °C is -40 °F, 0 °C is 32 °F, 100 °C is 212 °F and 37 °C is 98.6 °F. 0 K is -273.15 °C and -459.67 °F. -274 °C, -460 °F and -1 K are refused with That is below absolute zero (0 K, −273.15 °C, −459.67 °F), so there is no such temperature.

How the page reads and shows numbers

A point is always the decimal mark, so 1.250 is 1.25. A comma followed by three digits is a thousands mark, and any other lone comma is a decimal. The table below shows typed text.

Results are shown to 10 significant digits with no thousands separators: 1250 km = 1250000 m. That rounding reaches whole numbers: 1 TiB is 8,796,093,022,208 bits but shows as 8796093022000, and a typed 123456789012 is echoed as 123456789000. Below 0.000001 or from 1e15 up the page uses exponent form, such as 1 µm = 1e-9 km. Typing 1e20 is refused, while 100000000000000000000 works.

Swap units flips the pair. Changing the category keeps your value and resets the units.

Where your numbers go

We blocked outside connections and typed 7654321 in three categories. Of 11 requests, 2 went to outside scripts (the Google ad script and tag), which we blocked, so we cannot say what they would send. No request carried a body or the number, and localStorage and sessionStorage held no keys.

Other tools

The percentage calculator handles percent change and the download time calculator turns a file size and a speed into minutes. For dates use the age calculator, and for Unix time the timestamp converter.

Typed text and how it was read

Each text was typed into Value with Length set to km and m. Test runs of the page in headless Chromium 158.
You typeResultNote
12501250 km = 1250000 mplain digits
1,2501250 km = 1250000 mcomma, three digits after
1.2501.25 km = 1250 ma point is the decimal mark
1,51.5 km = 1500 mlone comma, not three digits
1.234,561234.56 km = 1234560 mlast mark is the decimal
٣٫٥3.5 km = 3500 mArabic-Indic digits
1e3refusedno exponent form
1.2.3refusedtwo decimal marks

Prefer desktop software?

Excel and LibreOffice have a CONVERT function, for example =CONVERT(1,"mi","km"). We ran it in LibreOffice 24.2.7.2, not in Excel. Miles to km (1.609344) and inches to mm (25.4) matched this page. Pounds to grams gave 453.592309748811 (this page: 453.59237), 1 atm in psi gave 14.6959444569062 (this page: 14.69594878), and "cal" gave 4.18679484613929 J (this page: 4.184). -274 °C returned -0.85 K, where this page refuses. Check which definition your spreadsheet uses.

Frequently asked questions

How many mL is a US cup, and is a UK cup the same?

A US cup is 236.5882365 mL. The page has no UK cup, and a UK pint is 568.26125 mL against 473.176473 mL for a US pint.

Is 1 GB 1,000 MB or 1,024 MB?

Here 1 GB is 1,000 MB. The 1,024 steps are the binary units, so 1 GiB = 1024 MiB and 1 GiB = 1073.741824 MB.

What is -40 in Fahrenheit and Celsius?

They are the same: -40 °C = -40 °F.

How many days are in a month or a year here?

A month is 30.4375 days and a year is 365.25 days, both averages. Real months vary.

Is my data sent anywhere?

No. The conversion runs in your browser. Our network test saw no request that carried the number we typed.