Unit Converter
Pick a category, type a value, and choose the units to convert between. Length, weight, and volume use exact ratio factors; temperature uses its own offset formula.
Inputs
The units below are filtered to this category.
The amount you want to convert.
The unit your value is currently in.
The unit you want the answer in.
Result
- Converted value
- 3.2808ft
1 m × 1 ÷ 0.3048 = 3.28083989501 ft
How it works
This converter handles the four measurement families that come up most often in everyday life: length, weight, temperature, and volume. You choose a category first, and the "from" and "to" lists are then read against that category, so a length conversion only ever talks to millimeters, centimeters, meters, kilometers, inches, feet, yards, and miles. Splitting the work this way is not just tidiness — it is what makes the arithmetic below correct, because temperature genuinely does not behave like the other three.
Length, weight, and volume are ratio scales. Each unit is defined as a fixed multiple of a base unit, so a conversion is nothing more than "multiply into the base, divide out of the target." This calculator uses the meter, the kilogram, and the liter as bases, and it stores the factors as exact defined values rather than rounded approximations: one inch is exactly 25.4 mm, one yard is exactly 0.9144 m, one mile is exactly 1609.344 m, and one pound is exactly 0.45359237 kg. Those numbers come from the 1959 international yard and pound agreement, which is why they terminate rather than repeating forever. Storing a rounded 0.4536 instead would look harmless and then quietly drift by a gram over a round trip.
Temperature is the trap, and it is worth understanding rather than memorizing. Celsius, Fahrenheit, and Kelvin do not share a zero point, so a temperature is not simply "a count of degrees" the way a length is a count of meters. Converting Celsius to Fahrenheit means multiplying by 9/5 and then adding 32; converting Kelvin to Celsius means subtracting 273.15. If you tried to force temperature through the same multiply-only pipeline as length, you would get answers that are obviously wrong: 20 °C is not twice 10 °C in Fahrenheit — it is 68 °F versus 50 °F, not 122 °F. Because of that offset, this calculator routes temperature through a separate code path that converts into Celsius first and then out to the target unit.
Kelvin also introduces a floor that the other categories do not have. Zero Kelvin — absolute zero — is the coldest temperature that can exist, equal to −273.15 °C or −459.67 °F, so any input below that is not a small rounding issue but a physically meaningless request. Rather than returning a negative Kelvin figure and pretending it means something, the calculator refuses the conversion and tells you why. There is one subtlety worth flagging: −459.67 °F is exactly absolute zero, but computing (−459.67 − 32) × 5/9 in binary floating point lands on about −273.15000000000003. A naive check would reject that perfectly valid input, so the comparison carries a tiny tolerance to let genuine edge values through.
Mismatched units are the other failure people run into. If you select the temperature category and then somehow submit "kilograms to Fahrenheit" — by editing the URL, by a stale dropdown after switching categories, or by a bookmarked link built before the category changed — there is no meaningful answer to give. The calculation function checks membership itself rather than trusting the interface, because a converter that silently multiplies by a missing factor produces NaN, and NaN spreading through a result page is far worse than an honest error message. Defending inside the pure function means the guarantee holds no matter which route reached it.
Two behaviors are worth knowing because they are deliberate. First, converting a unit to itself returns your value untouched: the code short-circuits instead of multiplying and dividing by the same factor, since in floating point x × f ÷ f does not always land exactly back on x. Second, round trips are stable — convert 100 m to feet and back to meters and you get 100 m again, within the tiny tolerance floating point allows. Exact stored factors are what make that hold; approximated factors would visibly drift after two or three hops. Displayed precision also scales with the size of the answer, because a fixed two decimal places would collapse a millimeter-to-mile conversion into a useless "0.00".
A few unit definitions deserve a warning label. The teaspoon, tablespoon, cup, fluid ounce, and gallon here are all US liquid measures: one US gallon is exactly 231 cubic inches, or 3.785411784 liters, and the smaller units are fractions of it. The imperial gallon still used in the UK is a different, larger unit, and an imperial fluid ounce differs from a US one, so a recipe or fuel figure from a British source will not match these values. Likewise, "t" here is the metric ton of exactly 1000 kg, not the US short ton or the British long ton. And an ounce in this calculator is the avoirdupois ounce used for everyday weight, not the troy ounce used for precious metals — the troy ounce is heavier, which is why a "pound" of gold and a pound of flour are not the same mass.
FormulaRatio units: value × (from factor) ÷ (to factor). Temperature: °F = °C × 9/5 + 32, K = °C + 273.15
Frequently asked questions
- Why does temperature need a different formula from length and weight?
- Length, weight, and volume are ratio scales whose zero points agree — zero meters and zero feet are the same nothing, so a single multiplication converts between them. Temperature scales have different zero points, so Celsius to Fahrenheit needs both a multiplication (×9/5) and an offset (+32). Skipping the offset is the single most common unit-conversion mistake, and it is why this calculator sends temperature down a separate path instead of reusing the ratio table.
- What happens if I enter a temperature below absolute zero?
- The calculator rejects it and explains why rather than returning a nonsense number. Absolute zero is −273.15 °C, −459.67 °F, or 0 K, and nothing can be colder, so a Kelvin result below zero would be meaningless. The check includes a very small tolerance so that exact boundary values like −459.67 °F, which land a hair below the limit due to binary floating-point rounding, are still accepted as valid.
- Why did I get a "different categories" error?
- Both the "from" and "to" units have to belong to the category you selected. A kilogram cannot become a mile because they measure different physical quantities, and no factor exists to relate them. This usually happens after switching categories while an old unit is still selected, or when a link carries stale parameters. Reselect the category and pick both units again, and the conversion will run.
- Are the cup, gallon, and fluid ounce values US or imperial?
- They are US liquid measures. One US gallon is defined as exactly 231 cubic inches, which is 3.785411784 liters, and the cup, fluid ounce, tablespoon, and teaspoon are exact fractions of that. The imperial gallon used in the UK is larger, and the imperial fluid ounce differs from the US one, so figures taken from British recipes or fuel-economy sources will not line up with these results.
- Will converting back and forth give me my original number?
- Yes, within the limits of floating-point arithmetic. Converting 100 meters to feet and back returns 100 meters because the stored factors are exact defined values rather than rounded ones. Converting a unit to itself is even stricter: the calculator returns your input untouched instead of multiplying and dividing by the same number, which can introduce a tiny error in binary arithmetic.
- Why does the number of decimal places change between conversions?
- Precision scales with the size of the answer. A fixed two decimal places works for 12.34 kilometers but would turn a millimeters-to-miles conversion into "0.00" and destroy the result entirely. Small answers therefore get more decimal places, up to ten, while large ones stay at two. The exact substituted arithmetic is shown beneath the result so you can see what was actually multiplied and divided.
Related calculators
Share
Embed this calculator
Paste this code into your site to embed a live, working version of this calculator.
Last updated: 2026-08-11