curatedapi

Mass and weight converter

Convert between metric, avoirdupois (pounds and ounces), troy and carat units.

The amount to convert.
Unit of the value. Options: kg: kilogram; g: gram; mg: milligram; ug: microgram; t: tonne (metric ton); lb: pound (avoirdupois); oz: ounce (avoirdupois); st: stone; short_ton: short ton (US); long_ton: long ton (UK); gr: grain; ozt: troy ounce; lbt: troy pound; ct: carat (metric)
Unit to convert to. Omit to convert to every unit. Options: kg: kilogram; g: gram; mg: milligram; ug: microgram; t: tonne (metric ton); lb: pound (avoirdupois); oz: ounce (avoirdupois); st: stone; short_ton: short ton (US); long_ton: long ton (UK); gr: grain; ozt: troy ounce; lbt: troy pound; ct: carat (metric)
More options: rounding and decimals
Precision and rounding
Rounding mode applied once to each result. Default half_even.
Round results to this many digits after the decimal point.
Round results to this many significant digits.

Examples

Example: One pound in kilograms

Result
The converted value.
0.45359237 exact
Factor
How many to_unit make one from_unit (multiply by this to convert).
0.45359237 exact

Rounding: Half even, 15 significant digits. Calculator units/mass@1.

How it is calculated

result = value × factor(from_unit) ÷ factor(to_unit), factors in kg

Convert between metric, avoirdupois (pounds and ounces), troy and carat units. Conversion factors are exact values from the official unit definitions, so the result is exact before the single final rounding. Leave out to_unit to get the value in every supported unit.

  • Unit definitions: 1 kg = 1 kg (SI base unit); 1 g = 0.001 kg (SI prefix); 1 mg = 0.000001 kg (SI prefix); 1 ug = 0.000000001 kg (SI prefix); 1 t = 1000 kg (1000 kg); 1 lb = 0.45359237 kg (international pound, exact since 1959); 1 oz = 0.028349523125 kg (1/16 lb); 1 st = 6.35029318 kg (14 lb); 1 short_ton = 907.18474 kg (2000 lb); 1 long_ton = 1016.0469088 kg (2240 lb); 1 gr = 0.00006479891 kg (1/7000 lb); 1 ozt = 0.0311034768 kg (480 grains); 1 lbt = 0.3732417216 kg (12 troy ounces); 1 ct = 0.0002 kg (200 mg)

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Use it from your code

POST /v1/calc/units/massVersion 1
curl https://api.curatedapi.com/v1/calc/units/mass \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "1",
    "from_unit": "lb",
    "to_unit": "kg"
  }'
The same call in Python
import os

import requests

payload = {
    "value": "1",
    "from_unit": "lb",
    "to_unit": "kg",
}
response = requests.post(
    "https://api.curatedapi.com/v1/calc/units/mass",
    headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
    json=payload,
    timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
    "value": "1",
    "from_unit": "lb",
    "to_unit": "kg",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/units/mass", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
console.log((await response.json()).result);

MCP tool calc_units_mass at https://mcp.curatedapi.com. Inputs, outputs and errors in the API reference.

Put it on your website

<div data-curatedapi-widget="units/mass" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>

Use a public key registered for your site. Calculations are billed like API calls. How widgets work.

Related calculators

Add this calculator to your website

Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.

Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.