Unit converters · part of every tool here

Convert anything. Every factor traced to its source.

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

One engine, three kinds of tool

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.

convert

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

calculate

Formulas worth checking

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

generate

Anything a function can describe

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

A converter that is wrong is worse than no converter

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.

  • Factors transcribed from NIST SP 811 Appendix B, with the citation kept next to the number
  • Every unit offered in the dropdown must have a reference value, or the build fails
  • Round trips, boundary values and exact rational arithmetic checked on each build
  • The worst measured error is 2.2e-16 — the limit of double precision, not a compromise
  • Temperature converts through Celsius, because routing via kelvin loses digits at 0 °C
km-to-miles.ts — the whole tool
from: 'km',
to: 'mi',

references: [{
  from: 'mi', to: 'km',
  input: 1, expected: 1.609344,
  source: nist('mile (mi) to kilometer (km)', true),
}],

Kilometers to Miles at a glance

People search for a number, not a unit pair. This table answers the common ones on the page itself.

kilometersmiles
10.62137119
21.2427424
31.8641136
53.106856
106.2137119
159.3205679
2012.427424
21.097513.109379
42.19526.218757
5031.06856
10062.137119