Length Converter

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

About This Tool

What this tool does

The Length Converter changes a single number from one unit of length to another. It covers eight units in a single dropdown each direction: meters, feet, inches, centimeters, millimeters, yards, miles, and kilometers. You type a value, pick what unit it is in and what unit you want, and the answer appears underneath. There is no Convert button — the result updates on every keystroke.

It is built for the everyday "I have X, what is it in Y" question. Working out how tall a 72-inch door is in centimeters for a delivery form. Translating a 5K run into miles. Checking whether a 1.8 m ceiling clearance is enough for a 6-foot fridge. Converting a CAD drawing from millimeters into the inches your contractor wants. It is not a units encyclopedia and it does not try to be — eight common units, done correctly.

How to use it

Three fields, in this order:

  • Value — type the number. The field is a numeric input so decimals like 1.75 work fine. You can also enter negative numbers; the math runs, even though negative lengths do not mean much in practice.
  • From — the unit your number is already in.
  • To — the unit you want.

Once all three are set, a Result card appears below the inputs with the answer. To go the other direction, swap your From and To choices — there is no dedicated reverse button because swapping the dropdowns is the reverse.

The "NaN" gotcha on first load

This one trips people up. When the page first opens, both dropdowns visually show "Meters (m)" at the top of the list, but neither selection has actually been committed yet — the underlying value is still empty. If you type a number before clicking into the dropdowns, the result card shows NaN instead of an answer, because the converter has no unit to multiply by.

The fix is one click each: open the From dropdown and pick a unit (even if it is the Meters that was already showing), then do the same for To. After that, every keystroke updates the result live. If you ever see NaN again, that is almost always the cause — one of the dropdowns is back in its uncommitted state.

How it works under the hood

Every unit is defined by how many meters it equals. The meter is the pivot. The exact factors stored in the tool are:

  • meter = 1
  • foot = 0.3048
  • inch = 0.0254
  • centimeter = 0.01
  • millimeter = 0.001
  • yard = 0.9144
  • mile = 1609.344
  • kilometer = 1000

The conversion is a two-step calculation. First, your value is multiplied by the From unit's factor, which puts it into meters. Then it divides by the To unit's factor to land in the unit you wanted. Written out: result = value × fromFactor ÷ toFactor.

Those numbers are not approximations — they are the internationally agreed definitions. One inch is defined as exactly 2.54 cm. One foot is exactly 0.3048 m. One yard is exactly 0.9144 m (which is also three feet, the math checks out: 3 × 0.3048 = 0.9144). One international (statute) mile is exactly 1609.344 m, which is also 5280 feet. So you are not losing accuracy by routing through meters; the pivot is exact in both directions.

A worked example

Say you want to know how many inches are in 10 feet.

  • Step 1: 10 × 0.3048 = 3.048 meters.
  • Step 2: 3.048 ÷ 0.0254 = 120 inches.

That matches the schoolbook answer (12 inches per foot × 10 feet = 120), which is a good sanity check that the factors are right. The Result card will show 120 and not 120.000000, because the display rounds to six decimal places and then trims trailing zeros.

One more, going the other way: 5 km to miles. 5 × 1000 = 5000 m, then 5000 ÷ 1609.344 ≈ 3.106856 miles. The classic "5K is about 3.1 miles" rule of thumb, made exact.

How precise is the result

Internally, the math runs in JavaScript double-precision floats, which gives you about 15–17 significant digits of headroom. For display, the answer is run through toFixed(6) and then parsed back to a number, which has two effects: it rounds to six decimal places, and it strips trailing zeros so clean answers look clean. So 120.000000 shows as 120, but 11.811024 stays as 11.811024.

Six decimals is far more precision than any normal use needs. A millimeter is already 0.001 m; six decimals on a meter result is sub-micron territory. If you are doing engineering work where the seventh decimal matters, you should not be using a web tool for it anyway.

Common pitfalls

  • NaN result — almost always the uncommitted-dropdown issue described above. Re-pick both units.
  • Confusing miles — the mile here is the regular land mile (1609.344 m), not the nautical mile (1852 m). If you are dealing with marine charts, aviation distances, or knots, do not use this tool for the distance.
  • Survey foot vs international foot — the foot here is the international foot of exactly 0.3048 m. The US survey foot (0.30480061 m, retired in 2023) is fractionally longer. The difference is about 1 part in 500,000, which only matters for cadastral surveys over long distances. For anything you would normally measure with a tape, it does not show up.
  • Expecting feet-and-inches notation — the tool takes one number, not 5'10". If you have a height like 5 ft 10 in, convert each part separately or first do the arithmetic: 5 ft 10 in = 70 inches.
  • Pasting a number with units in it — the Value field is numeric only, so a string like 10 ft will not parse. Strip the unit before pasting.

When not to use it

This tool only handles linear length between the eight listed units. It is the wrong tool when:

  • You need area (square feet, square meters, acres) — use the Area Converter.
  • You need volume (cubic inches, liters, gallons) — use a volume converter.
  • You need nautical miles, furlongs, chains, fathoms, light-years, or parsecs. These are deliberately not included; the unit list is the eight common ones, no more.
  • You are converting a height in feet and inches. Do the parts separately, or add them up in inches first.
  • You need typographic units like points, picas, or em. Different problem space, different tool.

Quick reference

If you just want sense-checks without opening the tool:

  • 1 inch = 2.54 cm exactly.
  • 1 foot = 30.48 cm exactly.
  • 1 yard = 0.9144 m, just under a meter.
  • 1 mile ≈ 1.609 km, so a kilometer is about 0.621 mile.
  • 1 meter ≈ 3.281 feet, or about 39.37 inches.
  • 1 km ≈ 0.621 mile; 5 km ≈ 3.107 miles; a marathon (42.195 km) ≈ 26.219 miles.

Privacy

Everything runs in your browser. No value, unit choice, or result is sent anywhere — the entire conversion is a few lines of JavaScript executing locally, and you can use the tool offline once the page has loaded.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions

Why is the result showing "NaN"?
On first load, the From and To dropdowns display "Meters" at the top but haven't actually committed a selection yet. If you type a number before opening the dropdowns, the calculation has no unit to work with and shows NaN. Click into each dropdown and pick a unit — even re-picking Meters — and the result will appear. Live updates work normally after that.
How many feet are in a meter?
One meter is about 3.28084 feet, which is 1 ÷ 0.3048. The other way around, one foot is exactly 0.3048 meters by international definition.
Is the mile here the regular mile or the nautical mile?
It's the international statute mile — exactly 1609.344 meters, the standard U.S. and U.K. land mile. Nautical miles (1852 m, used in marine and aviation contexts) are not supported. Don't use this tool for boat or aircraft distances.
Which foot does it use — international or U.S. survey?
The international foot of exactly 0.3048 m. The U.S. survey foot (0.30480061 m) was officially retired in 2023 and is fractionally longer. The difference is roughly 1 part in 500,000, so it only matters for long-distance survey work, not for anything you'd measure with a tape.
How do I convert centimeters to inches?
Set From to Centimeters, To to Inches, and enter your value. The math is value ÷ 2.54, so 30 cm = 11.811024 inches and 100 cm = 39.370079 inches.
Can it handle a height in feet and inches, like 5'10"?
Not as a single entry. The Value field takes one number. Convert each part separately, or add them in inches first: 5 ft 10 in = 70 inches, then convert 70 inches to whatever you need.
Does it accept decimal or negative numbers?
Yes to decimals — the field is a numeric input, so 1.75 or 0.001 are fine. Negative numbers also run through the math, though a negative length isn't physically meaningful.
How precise is the result?
The calculation uses the exact international conversion factors, and the displayed answer is rounded to six decimal places. Trailing zeros are stripped, so an exact result of 120 shows as 120 rather than 120.000000. Internally the math runs at JavaScript double-precision (about 15–17 significant digits).
Is there a button to run the conversion?
No. As soon as you have a value entered and both unit dropdowns committed, the result recalculates on every keystroke. To reverse the direction, swap the From and To selections.
Why aren't fathoms, furlongs, or light-years here?
The tool is intentionally limited to the eight everyday units — meters, feet, inches, centimeters, millimeters, yards, miles, kilometers. If you need rarer units, you'll want a more specialized converter.