Mass and weight converter
Convert between metric, avoirdupois (pounds and ounces), troy and carat units.
- Version 1
- Checked against 4 published values
- Free, no sign-up
Result: One troy ounce in grams
| Result The converted value. |
31.1034768 exact |
|---|---|
| Factor How many to_unit make one from_unit (multiply by this to convert). |
31.1034768 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 kgConvert 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
- NIST Special Publication 811 (2008), Appendix B: conversion factors
- NIST Handbook 44, Appendix C: General tables of units of measurement
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
curl https://api.curatedapi.com/v1/calc/units/mass \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"value": "1",
"from_unit": "ozt",
"to_unit": "g"
}'
The same call in Python
import os
import requests
payload = {
"value": "1",
"from_unit": "ozt",
"to_unit": "g",
}
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": "ozt",
"to_unit": "g",
};
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.