# Nunn & Gregg 1989 Predicted Peak Expiratory Flow Calculator

> Nunn & Gregg 1989 Predicted Peak Expiratory Flow Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Calculates predicted adult peak expiratory flow (L/min) using the Nunn and Gregg 1989 sex-specific logarithmic regression from age, sex, and height

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/peak_expiratory_flow
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nunn-gregg-1989-predicted-peak-expiratory-flow-calculator-49043c64
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CuRxbQdmisv3COk-0UlTs

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 nunn-gregg-1989-predicted-peak-expiratory-flow-calculator-49043c64
```

Example prompt: Using the Nunn and Gregg 1989 regression, what is the predicted peak expiratory flow for a 45-year-old male who is 178 cm tall?

## When to prefer this

Use this endpoint when you need the published Nunn and Gregg 1989 normative PEF reference value for an adult patient given age, sex, and height — particularly for spirometry interpretation, percent-predicted calculations, or occupational/research contexts requiring a specific cited regression. It is deterministic and citable. Do not use it for personal-best PEF targets, action-plan zone thresholds, or pediatric patients.

## Known failure modes

- Age outside the supported adult range (15–85 years) returns an error or out-of-range response
- Height outside 50–250 cm (or 20–98 in) may be rejected as invalid
- Missing required parameters (age or sex) returns a validation error
- Invalid sex value (anything other than 'male' or 'female') returns an error
- Neither height_cm nor height_in provided may cause a missing-parameter error

## How this service works

Nunn and Gregg 1989 predicted adult peak expiratory flow (L/min) from age, sex, and height. Sex-specific ln(PEF) regressions as published. Deterministic published arithmetic with citation; not a personal-best or action-plan zone.

## Output

Returns the predicted peak expiratory flow in L/min computed from the sex-specific ln(PEF) regression published by Nunn and Gregg in 1989, given the patient's age and height. This is a reference/normative value, not a personal-best or action-plan zone.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "age",
      "sex"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 15-85). Nunn and Gregg 1989 adult range."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "Sex for the published regression (female or male)."
      },
      "height_cm": {
       "type": "number",
       "description": "Height in centimetres (50-250). Provide height_cm or height_in."
      },
      "height_in": {
       "type": "number",
       "description": "Height in inches (20-98). Converted as cm = in × 2.54."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/peak_expiratory_flow",
  "count": 2,
  "items": [
   {
    "sex": "male",
    "formula": "nunn_gregg_1989",
    "citation": {
     "id": "nunn-gregg-1989",
     "doi": "10.1136/bmj.298.6680.1068",
     "title": "New regression equations for predicting peak expiratory flow in adults",
     "source": "BMJ. 1989;298(6680):1068-1070",
     "authors": "Nunn AJ, Gregg I"
    },
    "age_years": 40,
    "height_cm": 175,
    "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
    "formula_expression": "ln(PEF_l_min) = a*ln(age) + b*age + c/height_cm + d; male a=0.544 b=-0.0151 c=-74.7 d=5.48; female a=0.376 b=-0.0120 c=-58.8 d=5.63",
    "predicted_pef_l_min": 636
   },
   {
    "sex": "male",
    "formula": "nunn_gregg_1989",
    "citation": {
     "id": "nunn-gregg-1989",
     "doi": "10.1136/bmj.298.6680.1068",
     "title": "New regression equations for predicting peak expiratory flow in adults",
     "source": "BMJ. 1989;298(6680):1068-1070",
     "authors": "Nunn AJ, Gregg I"
    },
    "age_years": 40,
    "height_cm": 175,
    "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
    "formula_expression": "ln(PEF_l_min) = a*ln(age) + b*age + c/height_cm + d; male a=0.544 b=-0.0151 c=-74.7 d=5.48; female a=0.376 b=-0.0120 c=-58.8 d=5.63",
    "predicted_pef_l_min": 636
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nunn-gregg-1989-predicted-peak-expiratory-flow-calculator-49043c64/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
