Unit converter

Convert length, weight, volume and temperature instantly — bidirectional and entirely in your browser.

How a unit converter actually works

Converting units is an exercise in dimensional analysis: you change how a quantity is written without changing the physical thing it describes. One metre and roughly 3.28 feet are the same length — only the label is different. This tool does that by storing every unit as a ratio against a single base unit for its category (the metre for length, the kilogram for weight, the litre for volume). To convert, it divides your value into the base unit and then multiplies out into the target unit, so the result is exact to floating-point precision.

The two value boxes are linked in both directions. Edit the left box and it converts left to right; edit the right box and it converts the other way. Whichever field you touch becomes the source of truth, which avoids the rounding drift that happens when a tool blindly recalculates both fields on every keystroke.

A worked example

Suppose you have a 5 mile run and want it in kilometres. The converter knows that one mile is exactly 1609.344 metres and one kilometre is 1000 metres. So it computes 5 × 1609.344 ÷ 1000 = 8.04672 km. Switch the category to temperature and ask for 100°F in Celsius: the tool first maps Fahrenheit to Celsius with (100 − 32) × 5 ÷ 9 ≈ 37.78°C — body temperature, near enough.

Exact conversion factors used

CategoryBase unitExample conversion
LengthMetre (m)1 inch = 2.54 cm (exact)
LengthMetre (m)1 mile = 1609.344 m (exact)
WeightKilogram (kg)1 pound = 0.45359237 kg (exact)
VolumeLitre (L)1 US gallon = 3.785411784 L (exact)
TemperatureCelsius (°C)K = °C + 273.15

Temperature is handled differently from the others. Length, weight and volume all scale linearly from a shared zero, so one multiplier does the job. Temperature scales have different zero points — water freezes at 0°C but 32°F, and 0 K is absolute zero — so the converter routes every value through Celsius as a pivot before mapping out to the scale you asked for.

Privacy note: this converter has no server and no analytics on your input. Every multiplication, offset and rounding step runs on your device, so your measurements never leave this browser tab.

Frequently asked questions

Is my data sent to a server?

No. Every conversion runs in your browser using plain JavaScript arithmetic. No values are uploaded, logged or stored, so it is safe to use for confidential engineering, scientific or financial figures.

How accurate are the conversions?

Each unit is defined by an exact or officially-standardised ratio — for example, 1 inch is exactly 2.54 cm and 1 pound is exactly 0.45359237 kg. Results are computed in double-precision floating point and rounded to a sensible number of significant figures for display.

Why does the converter work in both directions?

The two value boxes are linked. Type into the left box to convert left to right, or type into the right box to convert right to left. Whichever field you edit becomes the input, and the other updates instantly.

How is temperature different from the other categories?

Length, weight and volume scale linearly from zero, so a single multiplier converts them. Temperature scales have different zero points and offsets, so the tool converts every value through Celsius first, then out to the target scale.

What is the difference between metric and imperial units?

Metric (SI) units scale by powers of ten, which makes mental conversion easy. Imperial and US customary units use historical divisions such as 12 inches to a foot or 16 ounces to a pound, which is why precise decimal factors are needed to convert between the two systems.