Unit Converter
Convert between metric, US customary and imperial units across eight categories — length, mass, volume, area, speed, temperature, data size and time — with exact SI factors, real offset formulas for temperature, and the entered value shown in every unit of the chosen category at once.
1 in every unit of this category
| Unit | Value | Relative to the base unit |
|---|---|---|
| Meter (m) | 1 | 1 m = 1 m |
| Foot (ft) | 3.28083989501 | 1 m = 3.28083989501 ft |
How the converter works
Each category has one base unit: the metre for length, the kilogram for mass, the cubic metre for volume, the square metre for area, metres per second for speed, the kilobyte for data size and the second for time. Every unit in that category is stored as a single number — how many base units one of it is worth — and conversions are done in two steps. The value you type is multiplied by the factor of the unit you selected as from, which expresses it in base units, and that result is divided by the factor of the unit you selected as to. Because both steps go through the same base, any pair of units in a category converts correctly without needing a separate combination for every possible pair, and the table below the inputs simply repeats the second step once for each unit in the list.
Temperature is handled by a different path. Celsius, Fahrenheit and Kelvin agree on the size of a degree in only some cases and disagree about where zero sits, so a single multiplier cannot describe them. The converter therefore sends temperatures through the standard formulas: °F = °C × 9/5 + 32, °C = (°F − 32) × 5/9, and K = °C + 273.15, with the Kelvin conversions chained through Celsius. Pressing Swap reverses the two units and recomputes immediately, which is the quickest way to answer the reverse of a question you have just asked.
Where the factors come from, and how much to trust the result
The factors used here are exact wherever an exact definition exists, and the tool does not round them. The international inch has been defined as exactly 25.4 millimetres since the 1959 agreement between the United States, the United Kingdom and the other Commonwealth countries, and this page uses that value unchanged. The international avoirdupois pound has been exactly 0.45359237 kilograms since the same agreement. US volumes follow from the exact inch: a US gallon is exactly 231 cubic inches, which is exactly 3.785411784 litres, and a fluid ounce is one 128th of that. Because those chains of exact definitions are preserved rather than pre-rounded, 1 mi = 1.609344 km exactly and 1 lb = 453.59237 g exactly.
Not every factor is defined. There is no exact length for a mean Earth year, no exact value for the mean solar day or the Julian year, and no exact megabyte, because a megabyte means 1 000 000 bytes in the SI decimal convention and 1 048 576 bytes in the binary convention. Where an exact definition does not exist the converter uses the standard average — 365.2425 days for the Gregorian year, 86 400 seconds for the day, and 1 048 576 bytes for the binary megabyte — and labels those rows so the assumption is visible. Treat results built on them as indicative rather than exact.
Display rounding is the other place where a figure can differ from your own arithmetic. Every number on this page is rounded to 12 significant digits and shown with thousands separators, which is deliberately a little less than the 15 to 17 decimal digits a JavaScript double can carry. That is what stops binary floating-point artefacts — the 0.30000000000000004 that 0.1 + 0.2 produces when printed raw — from appearing in an answer that should read 0.3. The rounding is for display only: each conversion in the table is computed from the original full-precision value, not from the rounded text of the row above it, so errors do not accumulate down the table.
Converted values are for general reference. Where a measurement is legally or commercially significant — shipping weights, fuel volumes, medicine, engineering tolerances — check the applicable regulation or standard for the exact factor and the required number of significant figures rather than relying on a web page.
How to use it
Start by choosing a Category: Length, Mass, Volume, Area, Speed, Temperature, Data
size or Time. The from and to lists then fill with the units of that category and
the conversion table underneath is rebuilt, so switching from Length to Data size never leaves a
stale row behind. Type the number you want to convert into Value to convert; the
result and the table update as you type, so there is nothing to submit. Decimal points, a leading
minus sign and thousands separators are all accepted, and the value field is a text input with a
numeric keyboard on phones so that a pasted figure such as 1,250.75 is not rejected.
Set From to the unit you have and To to the unit you want. If you
need the opposite direction, either swap the two selects or press the ⇄ Swap button,
which exchanges them and recalculates. The table is the fastest way to answer "how much is this in
everything?" — it lists each unit of the current category with the same typed value expressed in it,
as well as the factor relative to the base unit, so you can see at a glance whether a unit is larger
or smaller than the one you started from. The hint line under the inputs always states the direction
in force, in the form 5 metres = 16.4041994751 feet, so a mis-set select is easy to
spot.
Everything here is keyboard reachable: Tab moves through the category, value and unit controls, the selects open with the usual arrow keys, and the swap button activates with Space or Enter. The updated result sits in a live region, so a screen reader announces each new value as it changes. The page is usable at 360 pixels wide, and because the whole tool is a single local script it keeps working with no network connection at all.
Frequently asked questions
Are the conversion factors exact?
Where an exact definition exists, yes — and the converter uses it verbatim. Since 1959 the international inch has been defined as exactly 25.4 millimetres, so 1 in = 25.4 mm and 1 mm = 1/25.4 in with no approximation anywhere. The international avoirdupois pound has been exactly 0.45359237 kilograms since the same agreement. US and imperial volumes are defined from the exact inch: a US gallon is exactly 231 cubic inches, which is 3.785411784 litres. Factors that cannot be exact at all — a mean Earth year, the astronomical unit, the mean solar day — are documented averages, and those are the only numbers here that carry real uncertainty.
How does the temperature conversion work?
Temperature is the one category that cannot be handled with a single multiplier, because the Celsius, Fahrenheit and Kelvin scales sit at different zeros. This page uses the textbook formulas instead: °F = °C × 9/5 + 32, °C = (°F − 32) × 5/9 and K = °C + 273.15. That matters for values far from room temperature — a simple multiply-by-1.8 shortcut would turn 10 °C into 18 °F instead of the correct 50 °F. The term 273.15 is exact by definition, and this tool does not accept temperatures below absolute zero.
Why does the answer sometimes stop matching my own arithmetic at the last digit?
Raw JavaScript numbers are IEEE 754 binary64 floating point, so a decimal such as 0.1 has no exact binary representation and sums like 0.1 + 0.2 really do produce 0.30000000000000004 internally. Every value shown here is rounded to 12 significant digits for display, deliberately a little short of the 15 to 17 digits a double can carry, so that this noise does not leak into the answer. A second, deliberate loss happens when a factor is not exact — a mile in kilometres, a pound in grams, a year in hours — and then the result is only as good as the factor. Both effects are display-level or factor-level; nothing else is rounded.
Is my data sent anywhere, or converted on a server?
No. The whole tool is a single script inside this page: the factors are constants compiled into the file, the arithmetic runs in your browser, and there is no request of any kind after the page has loaded. That is why it works with the network disconnected, and why you can paste a figure from a contract, a lab sheet or a payslip without that number leaving your device.
Sources & further reading
- BIPM — The International System of Units (SI Brochure, 9th edition) — The authoritative definition of the SI base units — metre, kilogram, second, kelvin — and of the decimal prefixes used by the metric units in this converter.
- NIST Handbook 44 — Specifications, Tolerances, and Other Technical Requirements for Weighing and Measuring Devices — Appendix C of this handbook is the United States' official restatement of the exact factors used here: 1 in = 25.4 mm, 1 lb = 0.45359237 kg, 1 US gal = 231 in³.
- NIST Guide to the SI (NIST Special Publication 811) — Explains significant figures, rounding conventions and unit symbols, which is the reasoning behind the 12-significant-digit display used on this page.