🌍 Distance Converter

Translate any supported distance into another with a single input.

Built for travelers, engineers, navigators, and students working across unit systems.

5 Kilometers (km) equals

3.106856 Miles (mi)

Nanometers (nm)5,000,000,000,000
Angstroms (Ă…)50,000,000,000,000
Micrometers (µm)5,000,000,000
Millimeters (mm)5,000,000
Centimeters (cm)500,000
Decimeters (dm)50,000
Meters (m)5,000
Inches (in)196,850.394
Feet (ft)16,404.1995
Yards (yd)5,468.0665
Nautical Miles (NM)2.699784
Mils (thou)196,850,393.701
Astronomical Units (AU)0.00000003
Light Years (ly)0.000000000001

How to Use This Calculator

1

Select the source unit

Pick the unit your distance is currently in (e.g., kilometers, miles, nautical miles).

2

Select the destination unit

Choose the unit you need (metric, imperial, or astronomical).

3

Type the value

Enter the distance and let the converter show the result plus every other supported unit.

Formula

All conversions route through meters as the base SI unit.

Meters = Value Ă— (meters per source unit)

Converted Value = Meters Ă· (meters per destination unit)

Unit factors follow international definitions (e.g., 1 mile = 1,609.344 meters).

Use the formula breakdown to confirm the calculation logic or perform the conversion manually if needed.

Full Description

Distance units span multiple systems—metric, imperial, nautical, and astronomical. This converter centralizes them with precise factors, eliminating repeated lookups and manual calculations.

By routing through meters, it preserves accuracy across extreme scales: from nanometers and angstroms up to astronomical units and light-years.

The breakdown table helps you compare a distance across the full unit list, which is especially useful for education, engineering references, and content creation.

Frequently Asked Questions

Can I convert extremely large or small distances?

Yes. JavaScript’s double precision covers a wide range. For extremely large astronomy values, consider scientific notation.

How accurate are the unit factors?

They follow exact definitions from NIST and the IAU where applicable. Inches and miles use their legal metric equivalents.

Does it handle negative distances?

Negative values are allowed to represent direction or offsets, though physical distances are typically non-negative.

What about custom units?

Extend the `length.ts` conversion map with additional units by defining meters-per-unit factors.