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.
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
- •RAG pipeline: Intent router → vector search → context expansion → answer generation
- •Tool-use agent: Planner → tool selector → executor → summarizer
- •Reasoning chain: Draft → critic → revise → final
- •Classification + generation: Cheap classifier first, expensive generator only when needed
How to reduce multi-step pipeline costs
- •Route cheap tasks to Haiku, Flash, or GPT-4o mini — save 80–95% vs flagship
- •Short-circuit early: classify intent first, skip expensive steps for simple queries
- •Cache repeated context (system prompts, retrieved docs) across turns
- •Cap output tokens per step — unnecessary verbosity is expensive
🔗 Related tools: Token Cost Calculator · Model Selector · Agent Cost Calculator
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.Add one step per distinct model call in your pipeline, using names that match your real architecture (router, retriever, generator, etc.).
- 2.Set each step's model and its own input/output token counts — these usually differ a lot between steps.
- 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.Check the "most expensive step" and percent-of-total breakdown to see where your budget is actually going.
- 5.Review the cross-provider scenario suggestions for the steps with the highest cost.
Common mistakes
- ⚠Giving every step the same run frequency — conditional steps (retries, escalations, fallbacks) run less often than the main path — entering the same number for all of them overstates their real cost.
- ⚠Optimizing the cheapest step first — the percent-of-total breakdown exists so you fix the step that actually moves your bill, not the one that's easiest to change.
- ⚠Ignoring cross-provider suggestions — same-provider swaps are convenient, but the biggest savings often come from switching providers entirely for a specific step — check the scenario comparisons.
- ⚠Not re-checking after a swap — once you change a step's model, its cost-per-run and percent-of-total change too — re-run the calculation to see the new bottleneck.
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.