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
| Category | Base unit | Example conversion |
|---|---|---|
| Length | Metre (m) | 1 inch = 2.54 cm (exact) |
| Length | Metre (m) | 1 mile = 1609.344 m (exact) |
| Weight | Kilogram (kg) | 1 pound = 0.45359237 kg (exact) |
| Volume | Litre (L) | 1 US gallon = 3.785411784 L (exact) |
| Temperature | Celsius (°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.