← Back to NumStack

AI Agent Cost Calculator

Estimate the true cost of your multi-step AI agent workflows. Account for tool calls, retries, and context growth.

Agent Workflow Steps

Step 1

Anthropic

Step 2

OpenAI

Workflow Volume

How many times to call each step per user request

How many workflows you run per month

How this calculator works

An AI agent is rarely a single model call — it's a sequence of steps (routing, retrieval, reasoning, formatting) that each call a model with their own input and output tokens. This calculator lets you define each step with its own model and token counts, then rolls every step up into one total cost per workflow run.

Each step's cost per call is its input tokens divided by one million times that model's input price, plus its output tokens divided by one million times its output price, using the current prices shown in the calculator. That per-call figure is then multiplied by your batch size (how many calls one workflow run makes to that step, e.g. retries or parallel tool calls) and your monthly volume (how many workflow runs happen per month) to get a monthly total. The calculator also scans for a cheaper model from the same provider for each step and estimates the savings.

Per step, then rolled up

costPerCall = (inputTokens ÷ 1,000,000) × inputPrice + (outputTokens ÷ 1,000,000) × outputPrice

monthlyStepCost = costPerCall × batchSize × monthlyVolume

totalMonthlyCost = sum of monthlyStepCost across all steps

How to use it

  1. 1.Add a step for each distinct model call your agent makes (e.g. "classify intent", "retrieve context", "generate reply").
  2. 2.For each step, pick the model and enter typical input and output tokens for that specific step — they're usually very different from step to step.
  3. 3.Set your batch size: how many calls a single workflow run makes to that step (leave at 1 if each step runs once per interaction).
  4. 4.Set your monthly volume: how many end-to-end workflow runs you expect per month.
  5. 5.Review the total, the per-step breakdown, and any suggested cheaper-model swaps for individual steps.

Common mistakes

Frequently asked questions

How is this different from the Token Cost calculator?▾

The Token Cost calculator prices a single model call. This one sums cost across multiple steps in one agent workflow, since a real agent request is usually several model calls chained together, not one.

What is "batch size" here?▾

It's how many calls a single workflow run makes to a given step — for example, if a step retries up to twice on failure, or fans out to three parallel tool calls, set batch size to reflect that.

What is "monthly volume"?▾

The number of complete end-to-end workflow runs (user interactions) you expect per month. It applies across all steps, since every run touches every step once (times its batch size).

Where do the cheaper-model suggestions come from?▾

For each step, the calculator checks other models from the same provider and flags the cheapest one that would cost less for that step's exact token mix, based on the current prices shown in the calculator.

Does this account for tool-call or function-calling overhead?▾

Only if you reflect it in the token counts and batch size you enter — the calculator prices tokens and call volume, it does not model tool latency or external API costs beyond the LLM calls themselves.