Skip to main content

Length Converter

Convert between millimeters, centimeters, meters, kilometers, inches, feet, yards and miles.

Reviewed by · Last reviewed

How to Use the Length Converter

  1. Pick your source unit in the "From" dropdown. The list includes millimeter, centimeter, meter, kilometer, inch, foot, yard and mile - seven units that cover almost every engineering, construction and everyday situation.
  2. Type a number into the input field. The output refreshes with every keystroke rather than waiting for a submit button, so you can tweak the figure and watch the target value move.
  3. Pick the target unit in the "To" dropdown. Because conversion factors are symmetric, order only affects which field you read from.
  4. Press the swap arrow between the two sides when you want to go the other way - no need to retype anything.
  5. Hit Copy to push the numeric result to your clipboard via the Clipboard API for pasting into a spec sheet, CAD note or chat.

What the Tool Does Under the Hood

Every unit in the picker is stored as a ratio to the SI base unit, the meter, and conversions are a single multiplication in JavaScript Number arithmetic (IEEE 754 double precision). The factor for inch is fixed at exactly 0.0254 m because the international yard and pound agreement of 1959 defined it that way; foot is 0.3048 m, yard is 0.9144 m and mile is 1609.344 m, all exact by definition. The mile-via-yard-via-foot chain matters for surveyors but nobody else.

The calculation is result = value * factorFrom / factorTo, done in the render function of the Preact component. There is no fetch call, no service worker, no analytics round-trip for the numbers themselves - the entire pipeline is a single multiply-divide inside V8, SpiderMonkey or JavaScriptCore depending on your browser.

Why You Would Reach for It

  • Translating a European furniture listing in centimeters into inches before ordering a shipping box.
  • Cross-checking an American woodworking plan (feet-and-inches) against metric lumber stocked in the EU.
  • Sanity-checking a Strava or Garmin run distance when the watch reports kilometers and the course describes miles.
  • Converting a running track lap (400 m, the IAAF standard) into yards for stadium signage.
  • Reading an aviation sectional that mixes nautical miles, statute miles and feet of altitude.
  • Quickly sizing a 3D-printer bed described in millimeters against inches from an American tutorial.

Edge Cases Worth Knowing

Large magnitudes can drift: 1e21 kilometers converted to millimeters exceeds the safe integer range (Number.MAX_SAFE_INTEGER, about 9.007e15), after which consecutive integers start to alias. That is almost never a practical problem - you are not measuring interstellar distances in millimeters - but it is why astronomers use the parsec or light-year, not the millimeter. Very small magnitudes (1e-300) stay accurate because doubles have 15-17 significant decimal digits across the whole representable range. Another trap is the US survey foot versus the international foot: the survey foot equals 1200/3937 m (about 0.304800609601 m). NOAA officially retired it at the end of 2022, and this tool uses the international foot only. Finally, mixing fractional inches (3 1/2") with decimal inputs is not supported - convert to decimal first.

A Short History of the Meter

The meter has been redefined four times. In 1793 revolutionary France set it as one ten-millionth of the distance from the equator to the North Pole along the Paris meridian - a geodesic survey by Delambre and Mechain supplied the number. In 1889 the BIPM cast the International Prototype Meter, a platinum-iridium bar kept in Sevres. In 1960 the meter was redefined as 1,650,763.73 wavelengths of the orange-red line of krypton-86 to avoid drift in the artifact. Since 1983 it has been fixed as the distance light travels in vacuum during 1/299,792,458 of a second, ratified in the SI Brochure (BIPM, 9th edition). The yard, foot and inch were pinned to this definition by the 1959 international agreement, making the imperial system today a layer of fixed ratios on top of the meter.

Comparing the Alternatives

Spotlight on macOS and the Windows calculator both convert lengths, but neither is one URL away or keyboard-focused for repeated swaps. Google's search box does conversions inline and is faster for a one-off, though it sends your query to Google's servers. units(1), the GNU command-line tool, is outstanding for scripting and exotic units (barleycorns, furlongs, Planck length) but requires a terminal. Wolfram Alpha handles unit algebra such as 3 ft + 27 cm in mm which this tool does not - you would have to convert each term by hand. For engineering drawings with tolerances (100 mm +/- 0.05), a CAD tool or a dedicated tolerance calculator is better because it propagates uncertainty; this page converts a single scalar.

Frequently Asked Questions

Is any of my input sent to a server?

No. The Preact component runs the arithmetic inside your browser tab - there is no fetch call for the conversion. The only network request after the initial page load is the standard PostHog analytics event for the pageview, which does not include the numbers you type. You can open DevTools, switch to the Network panel, hit "offline" and keep converting without interruption.

How exact is 1 inch = 2.54 cm?

Exact, by international treaty. The 1959 international yard and pound agreement signed by the United States, United Kingdom, Canada, Australia, New Zealand and South Africa defined the inch as 25.4 millimeters exactly, and the tool uses that as a symbolic ratio. There is no rounding at the definition stage; any rounding you see comes from the output formatter cutting off trailing digits.

Why does 1 km sometimes display as 0.999999... miles?

IEEE 754 doubles cannot represent every decimal ratio exactly. 1 kilometer divided by 1.609344 produces a bit pattern whose nearest decimal is 0.6213711922373339, and formatting back from that can lose the final digit. For practical engineering this is noise below the seventh significant figure. If you need arbitrary precision, use a symbolic-math tool such as Mathematica or SymPy.

Does the tool support nautical miles?

Not in this page - nautical miles live in the speed converter next to knots and in aviation-focused tools. One international nautical mile equals exactly 1852 meters, set by the First International Extraordinary Hydrographic Conference in Monaco, 1929. If you need it often enough to want it here, drop us a note via the feedback link in the footer.

How do I enter feet and inches like 5' 9"?

You cannot enter mixed units directly. Convert the whole measurement to decimal feet (5 ft + 9 in / 12 in per ft = 5.75 ft) or decimal inches (5 * 12 + 9 = 69 in) and put that number in. Supporting compound input is on the roadmap but not shipped yet.

What is the difference between a mile and a nautical mile?

A statute mile is 5,280 feet or exactly 1,609.344 meters. A nautical mile is 1,852 meters, originally defined as one minute of latitude along a great circle. Aviation and marine navigation use nautical miles because one degree of latitude equals sixty nautical miles, which makes chart plotting straightforward.

How precise is the output?

The underlying computation carries full IEEE 754 double precision (roughly 15-17 significant decimal digits). The display caps at ten significant digits to keep the output readable. For machining or metrology that needs more, copy the raw result and verify with a manufacturer-supplied converter; for everyday use, ten significant digits is well past what a tape measure or micrometer can resolve.

Can I convert negative lengths?

The tool accepts negative numbers and returns a negative number. Length in physics is a non-negative scalar, so negative results usually indicate a signed position or a displacement. If you want the magnitude only, feed in the absolute value - the input is just a number to the converter.

How does this differ from the all-in-one unit converter on the site?

The all-in-one converter handles six categories (length, weight, temperature, speed, area, volume) in a single UI and is the right choice when you jump between domains. This page only handles length and exposes every length-relevant unit without a category tab, which means one fewer click per conversion and a cleaner URL if you are sharing a link or bookmark.

Where do the exact factors come from?

The metric definitions come from the SI Brochure (BIPM, 9th edition, 2019). The US customary definitions come from NIST Special Publication 811 and the 1959 international yard and pound agreement (Federal Register, 1 July 1959). The UK Weights and Measures Act 1985 aligns the UK with the same numeric definitions. All values in the source code are pinned to those authorities.

More Converters