Agent Workflow Cost Analyzer
Break down costs across multi-step AI agent workflows
Build your workflow step-by-step. Swap models and watch costs change in real-time.
Build Your Workflow
Add or remove steps and adjust tokens/requests
Why multi-step agents are expensive
When you chain multiple AI calls together, costs compound quickly. A 3-step workflow using GPT-4o can cost 10x more than using Haiku for simple steps. The key is matching model capability to each step's complexity.
Use this calculator to see where your agent workflow burns money. Swap one model at a time and watch how fast costs drop when you use the right tool for each job.
How to optimize agent costs
- •Tier models by task: use simple models for routing, routing, complex models for reasoning
- •Cache system prompts across steps where supported
- •Use streaming + interruption to avoid full response generation
- •Batch multiple users' requests into one step when possible
- •Monitor per-step latency and drop slow models
💡 Pro tip: The cheapest 2-step workflow often costs less than a single GPT-4o call. Experiment with model combos.
How this calculator works
This tool starts you with a 3-step workflow (routing, processing, generation) that you can edit freely — change the model, input tokens, output tokens, and daily requests for each step. Every step shares the same daily request count, so it models a pipeline where each interaction flows through every step exactly once.
For each step, cost per request is that step's 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 daily requests and 30 gives a monthly cost per step; adding every step gives the workflow total. Any step costing more than one cent per request is flagged with a suggestion to consider a smaller model from the same provider.
Per step, per month
costPerRequest = (inputTokens ÷ 1,000,000) × inputPrice + (outputTokens ÷ 1,000,000) × outputPrice
monthlyStepCost = costPerRequest × dailyRequests × 30
How to use it
- 1.Start from the default 3-step example or clear it and add your own steps.
- 2.Name each step something recognizable (e.g. "Intent classification", "Draft response").
- 3.Pick the model each step actually calls and enter that step's real input and output token counts.
- 4.Set daily requests to how many times the full workflow runs per day — it applies to every step.
- 5.Look at the per-step cost breakdown and the "cost-optimized" flags to see which step to swap first.
Common mistakes
- ⚠Using flagship models for every step — routing and formatting steps rarely need the same model as the reasoning step — a small model is usually indistinguishable in quality for simple sub-tasks and much cheaper.
- ⚠Assuming daily requests are the same forever — the calculator applies one daily-request number to every step; if a step only runs conditionally (e.g. a fallback), your real cost for that step will be lower than shown.
- ⚠Treating the flag threshold as a hard rule — the one-cent-per-request flag is a starting heuristic, not a verdict — a $0.02 reasoning step can still be the right call if a cheaper model produces worse output.
- ⚠Ignoring how steps compound — three moderately priced steps at high daily volume can cost more than one expensive step run rarely — always check the total, not just individual step prices.
Frequently asked questions
Why does every step share the same daily requests?▾
This calculator models a linear pipeline where each interaction passes through every step once. If your real workflow skips steps conditionally, treat the total as an upper bound and adjust down.
What triggers the "consider downgrading" suggestion?▾
Any step costing more than $0.01 per request gets a suggestion to try a smaller model from the same provider. It's a quick heuristic to flag the priciest steps first, not an automatic recommendation.
How many steps can I add?▾
As many as your workflow actually has — add a step for every distinct model call, including ones that feel minor, since small steps at high volume add up.
How is this different from the Agent Workflow calculator?▾
This tool uses one shared daily-request number across all steps for a quick pipeline estimate. The Agent Workflow calculator lets each step have its own run frequency and adds cross-provider savings scenarios, which is useful when steps run at different rates.
Does this include vector database or tool-call costs?▾
No — it only prices the LLM calls themselves. If your workflow also calls a vector database or paid APIs, add those costs separately using a tool like the Vector Database calculator.