Catalog/chem-empirical-formula

Chemistry

Empirical formula from % API

Derives the empirical formula from percent (or mass) composition by mole-ratio normalisation and small-integer rounding, plus the molecular formula when a molecular mass is given. Answers 'What is the empirical formula of 40% C, 6.7% H, 53.3% O?', 'molecular formula of glucose from composition'.

Price$0.06per request
MethodPOST
Route/v1/chemistry/empirical-formula
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
chemistryempirical-formulamolecular-formulacompositionmole-ratiostoichiometrypercentanalysis
API URLhttps://x402.hexl.dev/v1/chemistry/empirical-formula
Integration docs
Example request
{
  "percentages": {
    "C": 40,
    "H": 6.7,
    "O": 53.3
  },
  "molecularMass": 180
}
Example response
{
  "empiricalFormula": "CH2O",
  "empiricalSubscripts": {
    "C": 1,
    "H": 2,
    "O": 1
  },
  "empiricalMolarMass": 30.026,
  "moleRatios": {
    "C": 1,
    "H": 1.9959,
    "O": 1.0004
  },
  "molecularMultiple": 6,
  "molecularFormula": "C6H12O6"
}
Input schema
{
  "type": "object",
  "required": [
    "percentages"
  ],
  "properties": {
    "percentages": {
      "type": "object",
      "examples": [
        {
          "C": 40,
          "H": 6.7,
          "O": 53.3
        }
      ]
    },
    "molecularMass": {
      "type": "number",
      "examples": [
        180
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}