MAGENT

Hematology · LIVE

Absolute neutrophil count (ANC)

ANC

Compute absolute neutrophil count from WBC and neutrophil plus band percents, plus a Bodey 1966 granulocyte band.

LIVE $0.005 USDC GET /api/calc/anc

Markdown: /docs/anc.md · Canonical: https://magentlab.com/docs/anc

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Compute absolute neutrophil count from WBC and neutrophil plus band percents, plus a Bodey 1966 granulocyte band.

When to use

When an agent needs ANC from a CBC differential and must not invent cells/µL.

When not to use

  • Not a diagnosis. Bodey bands are granulocyte strata from acute-leukemia hospital days, not a febrile-neutropenia treatment plan.
  • Does not convert a three-part differential or an absolute neutrophil count already reported by the lab.

Formula

ANC_per_uL = wbc_per_uL * (neutrophil_percent + band_percent) / 100

Citation

Title
Quantitative relationships between circulating leukocytes and infection in patients with acute leukemia
Authors
Bodey GP, Buckley M, Sathe YS, Freireich EJ
Source
Ann Intern Med. 1966;64(2):328-340
DOI
10.7326/0003-4819-64-2-328

Worked example

6.0 K/µL, 50% segs, 3% bands

Given: band_percent=3neutrophil_percent=50wbc_k_ul=6.0

  1. wbc_per_uL = 6.0 × 1000 = 6000
  2. fraction = (50 + 3) / 100 = 0.53
  3. ANC = 6000 × 0.53 = 3180
  4. Bodey band >1500

Also searched as

  • absolute neutrophil count
  • ANC
  • neutropenia count
  • segs and bands
  • granulocyte count

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/anc?wbc_k_ul=6.0&neutrophil_percent=50&band_percent=3

Full URL: https://api.magentlab.com/api/calc/anc?wbc_k_ul=6.0&neutrophil_percent=50&band_percent=3

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/anc?wbc_k_ul=6.0&neutrophil_percent=50&band_percent=3"

Parameters

Name Type Required Description
wbc_k_ul number optional WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500.
wbc_ul number optional WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000.
neutrophil_percent number required Segmented neutrophils / PMNs as a percent of WBC (0-100).
band_percent number optional Band neutrophils as a percent of WBC (0-100). Omitted treats bands as 0. segs+bands must be ≤100.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/anc Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "band_percent": "3",
      "neutrophil_percent": "50",
      "wbc_k_ul": "6.0"
    },
    {
      "band_percent": "3",
      "neutrophil_percent": "50",
      "wbc_k_ul": "6.0"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/anc",
  "items": [
    {
      "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.",
      "citation": {
        "authors": "Bodey GP, Buckley M, Sathe YS, Freireich EJ",
        "doi": "10.7326/0003-4819-64-2-328",
        "id": "bodey-1966",
        "source": "Ann Intern Med. 1966;64(2):328-340",
        "title": "Quantitative relationships between circulating leukocytes and infection in patients with acute leukemia"
      },
      "formula": "anc",
      "formula_expression": "ANC_per_uL = wbc_per_uL * (neutrophil_percent + band_percent) / 100",
      "wbc_per_ul": 6.0e3,
      "anc_per_ul": 3180,
      "band_percent": 3.0,
      "bodey_granulocyte_band": ">1500",
      "neutrophil_percent": 50.0
    },
    {
      "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.",
      "citation": {
        "authors": "Bodey GP, Buckley M, Sathe YS, Freireich EJ",
        "doi": "10.7326/0003-4819-64-2-328",
        "id": "bodey-1966",
        "source": "Ann Intern Med. 1966;64(2):328-340",
        "title": "Quantitative relationships between circulating leukocytes and infection in patients with acute leukemia"
      },
      "formula": "anc",
      "formula_expression": "ANC_per_uL = wbc_per_uL * (neutrophil_percent + band_percent) / 100",
      "wbc_per_ul": 6.0e3,
      "anc_per_ul": 3180,
      "band_percent": 3.0,
      "bodey_granulocyte_band": ">1500",
      "neutrophil_percent": 50.0
    }
  ]
}

Response

Field Type Description
formula string anc
formula_expression string Exact expression used
wbc_per_ul number Normalized WBC in cells/µL
neutrophil_percent number Segmented neutrophil percent used
band_percent number Band percent used (0 when omitted)
anc_per_ul integer Absolute neutrophil count in cells/µL
bodey_granulocyte_band string Bodey 1966 granulocyte strata (cells/mm^3 = cells/µL): <100, 100-500, 500-1000, 1000-1500, >1500. Not a diagnosis.
citation object Ann Intern Med 1966 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "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.",
  "citation": {
    "authors": "Bodey GP, Buckley M, Sathe YS, Freireich EJ",
    "doi": "10.7326/0003-4819-64-2-328",
    "id": "bodey-1966",
    "source": "Ann Intern Med. 1966;64(2):328-340",
    "title": "Quantitative relationships between circulating leukocytes and infection in patients with acute leukemia"
  },
  "formula": "anc",
  "formula_expression": "ANC_per_uL = wbc_per_uL * (neutrophil_percent + band_percent) / 100",
  "wbc_per_ul": 6.0e3,
  "anc_per_ul": 3180,
  "band_percent": 3.0,
  "bodey_granulocyte_band": ">1500",
  "neutrophil_percent": 50.0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_wbc wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.
400 invalid_neutrophil_percent neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.
400 invalid_band_percent band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.
400 invalid_differential neutrophil_percent + band_percent must be 0 to 100 Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Mosteller BSA — Agents must not invent BSA from model memory. This endpoint computes published Mosteller body surface area in m^2 from height and weight; pay per request with x402 USDC on Base.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.