Skip to calculator
Libre CalculatorThe universe in numbers

Unit conversion calculator

Convert supported length, mass, temperature, area, volume, and time units; currency conversion is not included.

Answer

3.10686 mi

Rounded for display. The steps show the full value.

Steps

5 km = 3.1068559612 mi

The same quantity on two scales
5 km is the same quantity as 3.10686 mi.

Watch the explainer

227 seconds · 8 chapters · captions included

0:00 / 3:47Where −40 °C = −40 °F

Explanation

How unit conversion works

Convert a signed decimal quantity between supported units in the same dimension: length, mass, temperature, area, volume, or elapsed time. The catalog is deliberately explicit; currency and calendar-relative units are not included.

y = x × fₛ ÷ fₜ. Convert the source quantity to the SI base unit, then divide by the target unit's SI factor.

Variables
xentered signed quantity
fₛsource unit's SI factor
fₜtarget unit's SI factor
yequivalent target quantity

K = C + 273.15; K = (F − 32) × 5 ÷ 9 + 273.15. Convert through absolute temperature rather than applying a ratio to the degree values.

Variables
Kabsolute temperature (Kelvin (K))
CCelsius temperature (Degree Celsius (°C))
FFahrenheit temperature (Degree Fahrenheit (°F))

Exact international inch to metre

Value1
FromInch (in)
ToMetre (m)
Result0.0254

1 in = 0.0254 m

International pound to kilogram

Value1
FromPound (lb)
ToKilogram (kg)
Result0.45359237

1 lb = 0.45359237 kg

US liquid gallon to litre

Value1
FromUS liquid gallon (US gal)
ToLitre (L)
Result3.785411784

1 US gal = 3.785411784 L

Imperial gallon to litre

Value1
FromImperial gallon (imp gal)
ToLitre (L)
Result4.54609

1 imp gal = 4.54609 L

Water's freezing point on two scales

Value0
FromDegree Celsius (°C)
ToDegree Fahrenheit (°F)
Result32

0 °C = 32 °F

Acre to square metres

Value1
FromAcre (ac)
ToSquare metre (m²)
Result4,046.8564224

1 ac = 4,046.8564224 m²

Elapsed day to seconds

Value1
FromDay (d)
ToSecond (s)
Result86,400

1 d = 86,400 s

Diagram of this result

Two rulers measure the same span in the two units: the cursor marks the entered quantity on the top ruler and its converted value on the bottom one. Temperatures, negative values and zero are shown as a plain equation instead, because offset scales do not share a zero.

The conversion maps the entered quantity to the equivalent quantity in the target unit. For temperature, both readings are also given in kelvin, the absolute scale used for the conversion.

Common mistakes

Do not treat US customary and Imperial volume as interchangeable: their gallons differ substantially. Temperature scales have different zero points, so multiplying or dividing Celsius or Fahrenheit values by a scale ratio is wrong; use the affine offset through Kelvin. A negative value is valid for linear dimensions and signed temperature readings, but no physical temperature below 0 K is accepted.

Precision and supported units

Inputs are signed canonical decimals, up to 30 significant digits, with no grouping or exponent notation; locale-aware normalization belongs at the input edge. Arithmetic uses 50 significant digits without intermediate presentation rounding. Decimal factors are exact terminating SI definitions where specified; divisions that repeat are rounded by decimal.js to 50 significant digits. The documented comparison tolerance is 1e-12 plus 1e-12 times the absolute reference value. Temperature is converted through Kelvin and rejects values below 0 K exactly, without a tolerance. Time units are fixed elapsed durations (a day is 86,400 seconds and a week is seven days); months and years are not fixed units here.

Why does temperature need a different formula?

Celsius and Fahrenheit are offset scales. First map the reading to Kelvin using the scale's exact affine relation, then map Kelvin to the destination scale. Kelvin is absolute, so values below zero are invalid.

Are US and Imperial gallons the same?

No. A US liquid gallon is exactly 3.785411784 litres, while an Imperial gallon is exactly 4.54609 litres. Select the labeled system rather than relying on the word gallon alone.

Standards and references

SI base-unit definitions and prefixes: NIST, The International System of Units (SI), https://www.nist.gov/pml/owm/metric-si/si-units. Inch, pound, US gallon, and Imperial gallon factors follow exact international definitions documented by NIST Special Publication 811, https://www.nist.gov/pml/special-publication-811. The acre factor is 4,046.8564224 m². Unit factors are encoded as decimal constants and these independent values are covered by engine fixtures.