{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/chemistry.mole.amount.input.json",
  "title": "Mole — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "from_mass",
        "to_mass",
        "from_particles",
        "to_particles"
      ],
      "description": "from_mass (default), to_mass, from_particles, or to_particles."
    },
    "mass": {
      "type": "number",
      "minimum": 0,
      "description": "Mass in grams. Required for from_mass."
    },
    "molar_mass": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Molar mass in g/mol. Required for from_mass and to_mass."
    },
    "amount": {
      "type": "number",
      "minimum": 0,
      "description": "Amount in mol. Required for to_mass and to_particles."
    },
    "particles": {
      "type": "number",
      "minimum": 0,
      "description": "Entity count. Required for from_particles."
    }
  },
  "description": "Amount n = m/M and N = n·N_A. N_A is CODATA 2018 exact. Not molarity and not Henderson–Hasselbalch. (calculation_version 1.0.0)"
}
