AI Agent Cost Calculator
Estimate the cost of multi-step AI agents with tool calls.
For the “Simple agent” scenario, $0.0202 per run — ~$303.75/month at 500 runs/day. Enter your own numbers below to recompute instantly; the full step-by-step math is shown under the worked example.
Results update automatically as you type.
- LLM cost / run
- $0.0337
- Tool cost / run
- $0.0000
- Per run
- $0.0337
- Per month
- $506.25
Estimate what an AI agent costs to run. Agents loop through multiple steps and tool calls, so cost adds up quickly. Set the steps, tokens per step, and tool usage to see cost per run and per month.
Not sure what to enter? Typical token ranges
Common engineering tasks: bug fixes, endpoints, tests, refactors. These are honest planning ranges for how many tokens an AI coding agent burns to build each item — the cost column uses GPT-4o’s current prices.
| Work item | Typical input tokens | Typical output tokens | Typical cost |
|---|---|---|---|
| Small bug fix | 100,000 | 6,000 | $0.3100 |
| Complex bug fix | 400,000 | 20,000 | $1.20 |
| AI code review of a PR | 200,000 | 8,000 | $0.5800 |
| Unit test suite for a module | 380,000 | 35,000 | $1.30 |
| CRUD API endpoint | 300,000 | 20,000 | $0.9500 |
| Third-party API integration | 600,000 | 35,000 | $1.85 |
| Refactor a module | 750,000 | 42,000 | $2.30 |
| Data / schema migration | 520,000 | 30,000 | $1.60 |
| Technical documentation | 220,000 | 25,000 | $0.8000 |
Ranges assume a whole agent session (many turns, context re-sent), not a single prompt. See how many tokens does X take for full low/typical/high ranges, or open the Cost to build X estimator to plug in your own model.
How this is calculated
Cost per run = steps × (input tokens per step × input price + output tokens per step × output price) + tool calls per run × cost per tool call. Because each step is a full LLM call that usually carries the growing context of previous steps, a multi-step agent can cost several times a single request. Monthly = per-run × runs per day × 30.
Is this a good result? What to do next
Agents are expensive because cost multiplies with steps and the context each step carries. If a run costs several times a single call, that's expected — the levers are fewer steps, less carried context, and a cheaper model for routine steps.
Typical planning ranges
- Cost multiplies with
- steps × tokens per step
- 5-step agent
- ~several× a single call
- Tool calls
- add token + external API cost
Ranges are typical planning figures to sanity-check your result, not authoritative benchmarks. Your numbers will vary with use case, volume, and vendor.
How to improve this number
- Reduce steps and trim context passed between them.
- Use a cheaper model for routine steps.
- Cache stable context; store facts externally.
Common mistakes
- Costing one step and multiplying (ignores carried context).
- Forgetting the external API cost of tool calls.
When to use a different approach
For growing carried memory specifically, use the agent memory cost calculator. For a fixed pipeline, use the agent workflow cost calculator.
Worked examples
Real scenarios you can reproduce by loading these presets in the calculator above:
Simple agent
- LLM cost / run
- $0.0202
- Tool cost / run
- $0.0000
- Per run
- $0.0202
- Per month
- $303.75
- LLM/run = 3 steps x (in + out) token cost
- tools/run = 2 x $0.0000
- monthly = run cost x 500 x 30
Research agent
- LLM cost / run
- $0.0540
- Tool cost / run
- $0.0000
- Per run
- $0.0540
- Per month
- $810.00
- LLM/run = 8 steps x (in + out) token cost
- tools/run = 6 x $0.0000
- monthly = run cost x 500 x 30
Multi-tool agent
- LLM cost / run
- $0.0810
- Tool cost / run
- $0.0000
- Per run
- $0.0810
- Per month
- $1,215.00
- LLM/run = 12 steps x (in + out) token cost
- tools/run = 10 x $0.0000
- monthly = run cost x 500 x 30
Sources & references
Frequently asked questions
Why do agents cost more than a single call?+
Each step is a full LLM call that usually includes the growing context of previous steps, so a 5-step agent can cost several times a single request.
How do I reduce agent cost?+
Reduce steps, trim context passed between steps, use a cheaper model for routine steps, and cache stable context.
Related calculators
Answering a real question?
This calculator powers these problem-solving guides: