# Ideal Gas Law Calculator (PV=nRT)

> Ideal Gas Law Calculator (PV=nRT) is a paid API for AI agents from chemistry-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Solves for any one unknown in the ideal gas law equation PV=nRT given the other three values, supporting multiple common units for each quantity.

## Facts

- Endpoint: GET https://chemistry-calc.x402tookit.com/ideal-gas?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ideal-gas-law-calculator-pv-nrt-9de52996
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZiFD8wl9et5dLtdHtAVE8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ideal-gas-law-calculator-pv-nrt-9de52996
```

Example prompt: Using the ideal gas law, solve for the volume of 2.5 moles of gas at a temperature of 25°C and a pressure of 1.5 atm — give me the answer in liters.

## When to prefer this

Choose this endpoint when you need to solve the ideal gas law equation PV=nRT for any single unknown variable, especially when flexible unit support (atm, kPa, psi, bar, mmHg, L, mL, m³, K, C, F) is needed. Prefer it over manual calculation or general-purpose math endpoints when chemistry-specific context and multi-unit output is desired. It is ideal for educational, lab, or engineering scenarios involving ideal gas behavior.

## Known failure modes

- Missing more than one variable — endpoint requires exactly three of four inputs to solve for the fourth
- Invalid or unrecognized unit strings cause a bad request
- Temperature provided in Kelvin below absolute zero returns an error or invalid result
- Numeric values outside physically meaningful ranges may return degraded or null results
- Missing required input object structure returns a schema validation error

## How this service works

Ideal gas law PV = nRT: give any three of pressure, volume, moles and temperature and solve the fourth, in common units.

## Output

Returns the solved variable (pressure, volume, moles, or temperature) along with all four quantities expressed in multiple unit variants (e.g. pressure in atm, kPa, bar, psi, mmHg; volume in L, mL, m³; temperature in K, C, F), plus molar volume at the given conditions, a plain-language summary, and which variable was solved for.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "moles": {
       "type": "number",
       "description": "Amount in moles"
      },
      "volume": {
       "type": "number",
       "description": "Volume"
      },
      "pressure": {
       "type": "number",
       "description": "Pressure"
      },
      "volumeUnit": {
       "type": "string",
       "description": "L (default), mL or m3"
      },
      "temperature": {
       "type": "number",
       "description": "Temperature"
      },
      "pressureUnit": {
       "type": "string",
       "description": "atm (default), kPa, Pa, bar, mmHg, torr or psi"
      },
      "temperatureUnit": {
       "type": "string",
       "description": "K (default), C or F"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "note": {},
      "moles": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "volume": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "L": {
         "type": [
          "null",
          "number"
         ]
        },
        "m3": {
         "type": [
          "null",
          "number"
         ]
        },
        "mL": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "pressure": {
       "t
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ideal-gas-law-calculator-pv-nrt-9de52996/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chemistry-calc.x402tookit.com](https://www.zero.xyz/host/chemistry-calc.x402tookit.com/llms.txt)
