Tiered price compute

tiered-price-compute · version 1.0.0 · Money & pricing · free, no key needed

Compute a total price for a quantity under graduated or volume tiers with inclusive bounds and optional flat fees.

Use when you need to: graduated tiered pricing calculator · volume pricing vs graduated pricing for 12 units · price for 6 units first 5 at 7 next 5 at 6.50.

Decide before calling

Read the versioned contract and the supported scope below. Reuse tiered-price-compute@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use tiered-price-compute@1.0.0 for graduated tiered pricing calculator. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "quantity": "6",
  "tiers": [
    {
      "up_to": "5",
      "unit_amount": "7.00"
    },
    {
      "up_to": "10",
      "unit_amount": "6.50"
    },
    {
      "up_to": null,
      "unit_amount": "6.00"
    }
  ],
  "mode": "graduated",
  "currency": "USD",
  "rounding": "half_even"
}

Response:

{
  "result": {
    "total": "41.50",
    "lines": [
      {
        "tier_index": 0,
        "quantity": "5",
        "unit_amount": "7",
        "flat_amount": "0",
        "amount": "35.00"
      },
      {
        "tier_index": 1,
        "quantity": "1",
        "unit_amount": "6.5",
        "flat_amount": "0",
        "amount": "6.50"
      }
    ],
    "currency": "USD",
    "scale": 2,
    "exact": true,
    "data_version": "iso4217-datasets-7cdc784-2026-07-27"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "tiered-price-compute",
  "version": "1.0.0",
  "input": {
    "quantity": "6",
    "tiers": [
      {
        "up_to": "5",
        "unit_amount": "7.00"
      },
      {
        "up_to": "10",
        "unit_amount": "6.50"
      },
      {
        "up_to": null,
        "unit_amount": "6.00"
      }
    ],
    "mode": "graduated",
    "currency": "USD",
    "rounding": "half_even"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/tiered-price-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"quantity":"6","tiers":[{"up_to":"5","unit_amount":"7.00"},{"up_to":"10","unit_amount":"6.50"},{"up_to":null,"unit_amount":"6.00"}],"mode":"graduated","currency":"USD","rounding":"half_even"}'

The machine-readable contract is at /v1/tools/tiered-price-compute/versions/1.0.0.

CLI

node cli.mjs run tiered-price-compute 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.