Converters

Unit Converter

Convert units like length, weight, temperature, data, time and more.

1 m = 0.001 km

What is Unit Converter?

Unit converter transforms measurements between different unit systems, supporting length, weight, temperature, data, time, area, and volume.

Supported Units

  • Length: meter, km, cm, inch, foot, mile
  • Weight: kg, g, lb, oz
  • Temperature: Celsius, Fahrenheit, Kelvin
  • Data: Byte, KB, MB, GB, TB
  • Time: second, minute, hour, day, week
  • Area: sq meter, hectare, acre
  • Volume: liter, gallon, cubic meter

A seven-category converter for length, mass, temperature, data volume, time, area and volume: choose a category, type one value, read the equivalent in a second unit. Every category except temperature converts through a single pivot unit. Suited to checking datasheet figures, shipping weights, file sizes and travel or recipe measurements.

One pivot unit per category, two formulas

Each category is a table of factors measured against its first unit — metre, kilogram, byte, second, square metre, litre — so a conversion is only value × factor(from) ÷ factor(to). That is why 1 mile to kilometres reads 1 × 1609.344 ÷ 1000 = 1.609344, and why feeding that result back with the selects swapped returns the original number. Temperature is the exception: the branch is selected by category, not by factor, and all three temperature entries carry a factor of 1 because no ratio can encode an offset. Values are pushed into Celsius first, with (F − 32) × 5 / 9 or K − 273.15, then out to the target. That is why 100 °C prints as 212.00 and 0 °C as 273.15.

Which constants are defined and which are truncated

The length factors are the 1959 international yard and pound agreement values, all exact: 1 inch = 25.4 mm, 1 foot = 0.3048 m, 1 yard = 0.9144 m, 1 mile = 1609.344 m. Mass, area and liquid volume are stored as short decimals instead. The pound is 0.453592 where the definition is 0.45359237 kg, the ounce is 0.0283495, the acre is 4046.86 where 4840 square yards give 4046.8564224 m², and the US gallon is 3.78541 where 231 cubic inches give 3.785411784 L. Pound and ounce stay consistent with each other at 16 × 0.0283495 = 0.453592, and the imperial gallon, 4.54609 L, is exact. Each truncation costs about one part in a million, which is invisible in a single conversion but shows up when you convert a tonne-scale shipment back and forth.

Six decimals, then trailing zeros are eaten

Every non-temperature result is computed as converted.toFixed(6).replace(/\.?0+$/, ""). Rounding therefore happens before display, so anything under 5 × 10⁻⁷ becomes 0: 1 byte to terabytes prints 0 instead of 9.09 × 10⁻¹³, and 1 millimetre to miles prints 0.000001 where the true value is 0.000000621, an overstatement of 61%. Because the zero-strip runs after rounding, whole numbers lose their decimal tail — 1 cubic metre to litres shows 1000, never 1000.000000 — and the copy button emits the whole sentence as 1 m = 0.001 km. For readings that need more than six decimals, convert to a smaller unit and shift the decimal point yourself.

Worked example

One acre in square metres

Input
1, category area, acre → m²
Output
4046.86

The international acre is 4840 square yards, exactly 4046.8564224 m², but the stored factor is the rounded 4046.86, so the output is 0.0036 m² high. Converting the same acre to hectares gives 0.404686 against the exact 0.4046856, the same one-part-per-million drift.

Limits and pitfalls

  • The lists are closed: seven categories and 36 units, with no field for a custom factor. There is no cubic centimetre, so 1 mL never gets a cube-of-water expression, and nothing covers speed, pressure, energy, angle, nautical miles, stones, milligrams or microseconds.
  • The swap button is not symmetric. It swaps the two selects and then assigns the value the converter already produces for the swapped pair, which is the inverse: 1 m → 1000 mm turns into 0.001 mm. Re-type the number you meant after swapping.
  • The six-decimal ceiling silently flattens small results — 1 byte → TB is 0, 1 mm → mi is 0.000001 — and there is no exponent or significant-digit mode to see the real magnitude.
  • Temperature and everything else are formatted differently: 37 °C → 98.60 keeps two decimals, while 37 m → 0.037 km has its zeros stripped. A column mixing both shapes breaks naive text comparison.
  • No physical range checks are applied: −300 °C converts to -26.85 K although nothing can be colder than 0 K, and the same holds for Fahrenheit below −459.67.

Related tools

When this page is the wrong tool for the conversion

The situationThis converterWhat to use instead
The quantity is not on the list at allSeven categories, each a closed dropdown: metres to miles, kilograms to pounds, bytes, minutes, square metres, litres, and the three temperature scales. There is no newton, watt, hertz, bar, calorie or currency rate, no compound entry such as litres per 100 km, and no field that accepts a custom factor.GNU units or Python pint — units "70 mph" "m/s", or Q_(70, "mph").to("m/s") — carries thousands of units plus compound dimensions such as kg m/s^2. Switch as soon as your quantity has two dimensions, because this page cannot be taught a new unit.
The number goes into text that cites a published definitionA result is rounded to six decimals and stripped of trailing zeros before display — two fixed decimals, zeros kept, in the temperature category — so what you copy is a display value produced by one multiply-and-divide against the category pivot.Your own constant in a calculator, or pint with decimal.Decimal, keeps every digit the definition carries. Six decimals settles a parcel weight or a cable run; it does not settle a figure that will be compared digit by digit with a standard.
The bytes will be checked against a vendor labelThe data category steps by 2¹⁰ throughout: 1 TB is 1099511627776 bytes here, so a drive sold as 1 TB (10¹² bytes) reads 931.322575 GB.Divide the byte count by 10⁹ yourself, or work from the byte column of ls -l, whenever the figure must match a spec sheet or an invoice. The 7.37% gap between 2³⁰ and 10⁹ is a naming disagreement, not an error, and this page has no switch to read the decimal convention.
A column of values, or a conversion that runs again next monthOne input, one output, one copy button. Nothing pastes a list, nothing exports, nothing is callable, so two hundred measured lengths from a QA sheet mean two hundred rounds of typing and reading.Loop it: convert-units from npm, or ten lines of value * factorFrom / factorTo over the array, keeps the constants inside your repository and makes the run repeatable. Take that route once the count passes a handful.
Temperature is in the mix, or every unit is a pure ratioTemperature results come out offset-correct in °F and K; in the other six categories every pair is a plain ratio, so one factor is all a conversion needs.For a list that is nothing but ratios — m, kg, L, s — writing value * a / b yourself is shorter. A hand-built factor table that treats °F as a ratio is off by the 32-point shift, so the risky case is exactly the script that handles both kinds at once.
The digits are a bit pattern, not a measurementConverts only magnitudes of one dimension; 0x1F, 0b1010 and base-36 strings are outside its scope, and the unit symbols have nothing to say about radix.The number-base tool, or parseInt(x, 16) and (31).toString(16) inline, handles a change of representation. Pick it whenever the value is an encoding of bits rather than a length, mass or volume.

What each dropdown contains, in the order it is listed

CategoryUnits as listedDefault pair after switching, with 1 in the box
Lengthm, km, cm, mm, in, ft, yd, mim → km = 0.001
Masskg, g, t, lb, ozkg → g = 1000
Temperature°C, °F, K°C → °F = 33.80
DataB, KB, MB, GB, TBB → KB = 0.000977
Times, min, h, d, wks → min = 0.016667
Aream², km², cm², ha, acrem² → km² = 0.000001
VolumeL, mL, m³, gal(US), gal(UK)L → mL = 1000

Both selects always land on the first two entries of the chosen category, and picking a category or pressing Reset also puts 1 back in the value box — so these seven readings are what the page shows before you type anything. That is why Area opens on a six-decimal 0.000001 and Data on 0.000977: neither default pair is a sensible one, and the first two units are simply the ones the category list starts with. In the data category the step is 2¹⁰ rather than 10³.

Frequently Asked Questions

What standard do the length conversions use?
All units anchor to SI with exact legal definitions: 1 inch = 25.4 mm (by international agreement since 1959), 1 mile = 1609.344 m. The tool converts with exact constants, not approximations — safe for engineering and trade.
Why is temperature conversion not a simple multiplier?
Temperature combines an offset with a scale factor: °F = °C × 9/5 + 32. Zero degrees Celsius is not "zero temperature", so pure multiplication fails — unlike length or mass. This is the conversion people most often fumble mentally; use the exact result.
What is the difference between MB and MiB?
MB (decimal) is 10⁶ bytes — what drive makers quote; MiB (binary) is 2²⁰ = 1,048,576 bytes — what operating systems report for memory. A "500 GB" drive showing about 465 GB is unit mismatch, not missing capacity.

Content reviewed: