Units, in both directions
Length, mass, temperature and everything that follows. Pick any two units of a dimension; the engine composes the conversion through a base chosen for numerical stability.
definition only · zero code
Most converters ask you to trust a number nobody checked. Ours are transcribed from NIST SP 811 and verified against exact rational arithmetic on every build — and they run entirely in your browser.
mi = km ÷ 1.609344
NIST SP 811 (2008), Appendix B.8 — mile (mi) to kilometer (km) = 1.609 344 E+00
A converter, a calculator and a generator are the same thing: a function. That is why adding the hundredth tool costs one file of data, not one more application.
Length, mass, temperature and everything that follows. Pick any two units of a dimension; the engine composes the conversion through a base chosen for numerical stability.
definition only · zero code
A calculator is a function with a nicer face. The same definition carries its formula, its source and the values it must reproduce.
definition + interior
Colors, gradients, identifiers, passwords. If the output can be derived from the input, it belongs here — and it still runs on your machine.
definition + interior + logic
One bad factor costs the trust of the whole site, so a tool without passing tests does not get built. Reference values are transcribed from the standard — never produced by our own code, because code that checks itself proves nothing.
from: 'km',
to: 'mi',
references: [{
from: 'mi', to: 'km',
input: 1, expected: 1.609344,
source: nist('mile (mi) to kilometer (km)', true),
}],People search for a number, not a unit pair. This table answers the common ones on the page itself.
| kilometers | miles |
|---|---|
| 1 | 0.62137119 |
| 2 | 1.2427424 |
| 3 | 1.8641136 |
| 5 | 3.106856 |
| 10 | 6.2137119 |
| 15 | 9.3205679 |
| 20 | 12.427424 |
| 21.0975 | 13.109379 |
| 42.195 | 26.218757 |
| 50 | 31.06856 |
| 100 | 62.137119 |