API gravity converter
A 35-degree crude has a specific gravity of 0.84984984985 and a density of 849.013597597598 kg/m³. Move between oil gravity degrees, specific gravity and four density units for cargo tickets, tank gauging and hydrometer homework. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Numeric magnitude to convert
- 35
- Source unit: api
- api
- Target unit: api
- sg
- Result
- 0.8498498499 sg
- Converted
- 0.8498498499
- Value sg
- 0.8498498499
- Api
- 35
°API, specific gravity and density, free
What the oil gravity scale measures
Oil gravity in degrees is the density scale of the petroleum trade. Crude cargoes, refinery tickets and pipeline reports quote it, while laboratories and engineers often work with specific gravity or with a plain density in kilograms per cubic metre. The two scales run in opposite directions: specific gravity equals 141.5 divided by the sum of the degrees and 131.5, and the degrees equal 141.5 divided by the specific gravity, minus 131.5. Water, with a specific gravity of 1, lands at 10 degrees, so the higher the number, the lighter the oil. Specific gravity here is the relative density at 60/60 °F.
How the conversion works, and where people slip
Every value passes through specific gravity first. From there the converter reaches the gravity degrees with the formula above, kilograms per cubic metre by multiplying by the density of water at 60 °F, grams per cubic centimetre by taking water as one gram per cubic centimetre, and pounds per US gallon or per cubic foot on the same water basis. Next to the result you see the matching degrees, the density in kg/m³ and each step, ready for a cargo report or a lab notebook. The usual slips are treating the scale as proportional, when equal steps in degrees are not equal steps in density, and converting a reading taken at another temperature without correcting it first.
FAQ
How do I turn oil gravity degrees into specific gravity?
Divide 141.5 by the degrees plus 131.5. For a 35-degree crude that gives 0.84984984985, and the converter lists each step so you can check it by hand.
What density in kg/m³ is a 35-degree crude?
It is 849.013597597598 kg/m³. The converter multiplies the specific gravity by the fixed density of water at 60 °F, so every density unit rests on the same reference.
Is the specific gravity corrected for temperature?
No. It is the relative density at 60/60 °F, not an entry from a temperature-correction table. If your reading was taken at another temperature, correct it first and then convert it here.
Why does a higher gravity number mean a lighter oil?
Because the degrees move in the opposite direction to specific gravity: the formula divides by it. Water, with a specific gravity of 1, sits at 10 degrees, so oils lighter than water score above 10.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/conv/api-gravity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":35,"from":"api","to":"sg"}'const res = await fetch("https://api.kit.forhosting.com/conv/api-gravity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 35,
"from": "api",
"to": "sg"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/conv/api-gravity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 35,
"from": "api",
"to": "sg"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/conv/api-gravity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":35,"from":"api","to":"sg"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":35,"from":"api","to":"sg"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/conv/api-gravity", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 35,
"from": "api",
"to": "sg"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "conv.api_gravity",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs | 1000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
An API gravity converter turns one petroleum density scale into another without hydrometer tables or hand arithmetic. Enter a finite value plus a source unit and a target unit among degrees API, specific gravity (relative density 60/60 °F), kilograms per cubic metre, grams per cubic centimetre, pounds per US gallon, and pounds per cubic foot; the tool returns the converted magnitude, the specific-gravity hub value, the equivalent degrees API and density in kg/m³, the industry formula string, and step-by-step substitution lines you can paste into a lab notebook, cargo report, or design review. Unknown unit names fail with a clear invalid_input error instead of silent wrong factors. Crude oil traders quoting °API, refiners comparing specific gravity tickets, pipeline engineers converting tank densities, and students checking hydrometer homework all need the same deterministic path.
What API gravity, specific gravity, and density mean
Specific gravity here is the dimensionless relative density sixty over sixty, not a temperature-corrected ASTM table entry. Absolute density follows from multiplying specific gravity by the fixed water density at sixty degrees Fahrenheit of nine hundred ninety-nine point zero one six kilograms per cubic metre, or by treating grams per cubic centimetre as numerically equal to specific gravity when water is taken as one gram per cubic centimetre. Pounds per US gallon and pounds per cubic foot use the same water mass basis with the exact international pound and the exact US liquid gallon or cubic foot. This tool applies those closed formulas only; it does not apply volume correction factors, vapour density, or multi-component blend rules. Same-unit requests succeed and return the input magnitude with a short message that no change of unit was required. Petroleum industries still report light and heavy crudes on the American Petroleum Institute hydrometer scale in degrees API. By definition the relationship between degrees API and specific gravity of a liquid relative to water at sixty degrees Fahrenheit is exact: specific gravity equals one hundred forty-one point five divided by degrees API plus one hundred thirty-one point five, and degrees API equals one hundred forty-one point five over specific gravity minus one hundred thirty-one point five. Water at that reference has specific gravity one and therefore ten degrees API. Higher API numbers mean lighter products—typical light crude sits near thirty to forty degrees API—while numbers below ten describe liquids denser than water. If a unit name is not on the supported list the solver rejects the request with invalid_input naming the bad field and listing supported units, so clients never guess whether a typo produced a wrong number. Specific gravity after conversion must stay strictly positive; degrees API of negative one hundred thirty-one point five are undefined because the formula denominator becomes zero.
How to call the API and read the response
Value must be a finite number or a strict numeric string within absolute limits of one trillion. Wire this into dashboards, mobile clients, or batch jobs that already hold a hydrometer or densitometer reading and only need a second unit for display, cargo documents, or mixed SI–imperial reports without shipping floating conversion tables in every app binary. Send a JSON body with three required fields: value (aliases amount, api, gravity, density, and magnitude), from (aliases from_unit, unit_from, and source), and to (aliases to_unit, unit_to, and target). From and to must resolve to supported unit names after alias normalization—api or degrees api, sg or specific gravity, kg/m3, g/cm3 or g/ml, lb/gal or ppg, and lb/ft3 or pound per cubic foot are accepted case-insensitively. On success the response echoes the rounded input value, canonical from and to labels, result and converted set to the same rounded target magnitude, value_sg and specific_gravity as the hub relative density, api as degrees API equivalent, density_kg_m3 as absolute density in kilograms per cubic metre, unit as the target label, formula as the short equation string, message as an English summary, steps as ordered substitution lines, and supported_units as the six canonical identifiers. Failed validation—missing fields, non-finite numbers, values outside absolute limits, non-positive specific gravity, undefined API at negative one hundred thirty-one point five, or an unknown unit name—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and when to use this landing
Prefer sending bare numbers for value when you control the client; string numbers are accepted only when they match a strict finite numeric pattern without currency symbols or thousand separators. Round-trip checks are straightforward: convert A to B and B back to A and confirm you recover the original within the published twelve-decimal rounding. Stay inside the absolute range so intermediate products cannot overflow, and remember this path is not a substitute for official temperature-corrected ASTM D1250 volume tables when custody transfer requires them. Normalize display labels on your side if you need locale-specific spellings—this API always returns the short canonical tokens api, sg, kg/m3, g/cm3, lb/gal, and lb/ft3 so automated tests stay stable. Classic teaching pairs include ten degrees API to specific gravity one (water), thirty-five degrees API into specific gravity for a light crude check, and a kilograms-per-cubic-metre lab reading into degrees API for a ticket. This landing targets people searching for an API gravity converter, degrees API to specific gravity, crude oil density kg/m3, or petroleum hydrometer calculator online; it is not a general multi-quantity unit converter, not a linear mass-density tool, not a buoyancy force calculator, and not a blend or temperature-correction engine. Prefer this capability when both endpoints are among the six supported petroleum gravity and density units and you need deterministic factors and step strings; if you need linear density or general unit conversion, use the dedicated converters for those quantities instead. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when clients deliberately probe unknown unit names.
Integration use cases
Crude and product tickets
Labs and cargo clerks convert hydrometer °API readings to specific gravity or kg/m³ so tickets, bills of lading, and SCADA tags share one density figure.
Pipeline and tank calculations
Engineers convert densitometer kg/m³ or lb/gal inputs to degrees API for comparison against crude grade schedules and inventory reports.
Homework and hydrometer checks
Students convert °API, SG, and density homework values with deterministic steps they can compare against hand calculations before submission.
Technical questions
What is the formula for API gravity?
By definition, °API = 141.5 / SG − 131.5 and SG = 141.5 / (°API + 131.5), where SG is specific gravity relative to water at 60/60 °F.
What is the API gravity of water?
Water has SG = 1 at the 60/60 °F basis, which corresponds to exactly 10 °API.
Does higher API mean lighter oil?
Yes. Higher degrees API mean lower density (lighter crude or product); values below 10 °API are denser than water.
What happens with an unknown unit name?
The tool returns invalid_input and lists supported units (api, sg, kg/m3, g/cm3, lb/gal, lb/ft3). Failed tasks are never charged.
Is the API gravity converter free?
The browser tool is free and runs locally. API calls use prepaid KIT balance at $0.002 per successful request; failed tasks are never charged.