📏 Unit Converter

📐 Category

🔁 Units

📝 Value

📤 Result

{{ primaryOutput }}

🎯 Converted value

{{ toValueDisplay }}

{{ result.fromValue }} {{ result.fromUnit }} → {{ result.toUnit }}

⚠️

ℹ️ About Unit Converter

What does this tool do?

The Unit Converter converts a numeric quantity between any two units inside a single physical category — for example metres to feet, kilograms to pounds, kilowatt-hours to joules, or degrees Celsius to Fahrenheit. The conversion factors come from the United States National Institute of Standards and Technology Special Publication 811 (NIST SP 811), the BIPM SI brochure, and the international yard and pound agreement of 1959 where applicable.

Categories and base units

  • Length — base unit metre. Includes mm, cm, m, km, in, ft, yd, mile, nautical mile, light-year, astronomical unit.
  • Mass — base unit kilogram. Includes mg, g, kg, lb, oz, metric ton, stone, grain, short ton.
  • Volume — base unit litre. Includes mL, L, m³, cm³, US gallon, imperial gallon, US quart/pint/fl oz/cup/tbsp/tsp, imperial fl oz.
  • Area — base unit square metre. Includes cm², m², km², hectare, ft², in², yd², acre, mi².
  • Energy — base unit joule. Includes J, kJ, calorie, kilocalorie, watt-hour, kWh, BTU, eV, foot-pound.
  • Power — base unit watt. Includes W, kW, MW, metric horsepower (PS), mechanical horsepower, BTU/h, ft·lb/s.
  • Pressure — base unit pascal. Includes Pa, kPa, MPa, bar, atm, psi, torr, mmHg, inHg.
  • Temperature — formula-based via kelvin: Kelvin, Celsius, Fahrenheit, Rankine.
  • Speed — base unit metre per second. Includes m/s, km/h, mph, ft/s, knot, Mach (sea level approximation).

How the conversion works

Each non-temperature unit declares a multiplicative "to-base" factor that expresses one unit of the listed item in the category's base unit. Converting from unit A to unit B in the same category is then:

out = value × factor_A / factor_B

Temperature is special because the scales do not share a common zero point, so the tool normalises every input to kelvin first and converts back from kelvin to the output scale. The exact formulas used are:

  • K = °C + 273.15
  • °C = (°F − 32) × 5/9
  • K = °Ra × 5/9

Sample conversions

Category Input Output Reference
Length1 mi1609.344 mExact (NIST SP 811 §B.8)
Length1 nmi1852 mExact (international nautical mile)
Mass1 lb0.45359237 kgExact (1959 yard & pound agreement)
Volume1 gal (US)3.785411784 LExact (231 in³)
Volume1 gal (UK)4.54609 LExact (UK 1985 W&M Act)
Area1 acre4046.8564224 m²Exact (43560 ft²)
Energy1 cal4.184 JExact (thermochemical calorie)
Energy1 kWh3,600,000 JExact
Pressure1 atm101325 PaExact (NIST SP 811)
Temperature0 °C273.15 KFormula
Temperature100 °C212 °FBoiling point of water (1 atm)
Speed1 mph0.44704 m/sExact (1609.344 / 3600)

References

Privacy note: the interactive converter runs in your browser. The public API endpoint executes the same compiled TypeScript module on the server, so values you submit through the API are sent over the network.

API Usage Example:

POST /api/tools/math/unit-converter
Content-Type: application/json

{
    "category": "length",
    "fromUnit": "mi",
    "toUnit": "km",
    "value": 1
}
Ready