← Back to NumStack

Agent Workflow Cost Calculator

Model the end-to-end cost of your AI pipeline. Add each step, set token counts and daily volumes, and instantly see where your budget is going.

Workflow Steps(3/10)

Step 1

times this step runs each day

Step 2

times this step runs each day

Step 3

times this step runs each day

Why model your full agent pipeline?

Single-call calculators miss the real picture. A production AI agent typically runs 5–10 LLM calls per user request — routing, retrieval, reasoning, validation, and response generation. Each step has different token counts, different models, and different call frequencies.

The Agent Workflow Calculator lets you model every step independently so you can see exactly where your AI budget is going before you deploy — and identify which swap would save the most money.

Common multi-step agent patterns

How to reduce multi-step pipeline costs

How this calculator works

Unlike a single shared request count, each step here has its own "runs per day" — so a retrieval step that fires on every message and a validation step that only fires occasionally can be modeled accurately in the same workflow. Every step's cost per run is its input tokens divided by one million times the model's input price, plus output tokens divided by one million times the output price, using the current prices shown in the calculator; multiplying by that step's runs per day and by 30 gives its monthly cost.

The calculator also computes what percentage of your total spend each step represents, and — separately from the same-provider swaps other calculators suggest — scans every model across every provider for a cheaper alternative for each step, so you can see the single biggest cost driver in your pipeline and the largest available saving.

Per step, with its own frequency

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

monthlyCost = costPerRun × runsPerDay × 30

percentOfTotal = monthlyCost ÷ totalMonthlyCost

How to use it

  1. 1.Add one step per distinct model call in your pipeline, using names that match your real architecture (router, retriever, generator, etc.).
  2. 2.Set each step's model and its own input/output token counts — these usually differ a lot between steps.
  3. 3.Set each step's runs per day independently; a step that only triggers on certain requests should have a lower number than one that runs every time.
  4. 4.Check the "most expensive step" and percent-of-total breakdown to see where your budget is actually going.
  5. 5.Review the cross-provider scenario suggestions for the steps with the highest cost.

Common mistakes

Frequently asked questions

How is "runs per day" different from a shared request count?▾

Each step tracks its own runs per day, so steps that only fire conditionally (validation, retries, escalation) can be modeled at their real, lower frequency instead of assuming every step runs on every request.

What does "percent of total" tell me?▾

It shows what share of your total monthly agent spend each step accounts for, so you can prioritize optimizing the step with the biggest dollar impact rather than the one that feels most expensive per call.

How are the scenario suggestions chosen?▾

For each step, the calculator checks every model in the database — not just the same provider — and surfaces the cheapest one that would cost less for that step's exact token mix, based on current prices shown in the calculator.

What is "cost per run"?▾

It's the cost of one complete pass through every step in your workflow, ignoring how many times each step actually fires per day — useful for a quick "what does one interaction cost" estimate.

Does this replace testing model quality?▾

No — it only estimates cost. A cheaper model suggested by the scenario comparison may produce lower-quality output for a given step, so validate quality before swapping in production.