Free calculator · runs in your browser
What does an AI agent cost to run?
Agents loop: think, call a tool, read the result, repeat. Every step re-sends a longer context. Estimate the bill per task and per month, then compare models.
Monthly bill
$147
| Tokens per task | 76,400 |
| Cost per task | $0.088 |
| Runs per month (incl. retries) | 1,672 |
| Total per month | $147 |
Sources
- platform.claude.com/docs/en/about-claude/pricing
- developers.openai.com/api/docs/pricing
- ai.google.dev/gemini-api/docs/pricing
- claude.com/pricing
- one.google.com/about/plans
- api.vultr.com/v2/plans
- hetzner.com/cloud/regular-performance/
- digitalocean.com/pricing/droplets
- digitalocean.com/pricing/app-platform
- digitalocean.com/pricing/managed-databases
- railway.com/pricing
- brevo.com/pricing/
The same agent on every model
| Model | Per task | Per month |
|---|---|---|
| Claude Haiku 5.5 Anthropic | $0.0046 | $7.70 |
| GPT-6 Luna OpenAI | $0.0046 | $7.70 |
| Gemini 3.1 Flash-Lite Google | $0.012 | $20.25 |
| Gemini 3.5 Flash-Lite Google | $0.016 | $27.11 |
| Gemini 3.8 Flash Google | $0.035 | $57.73 |
| Claude Sonnet 5.5 Anthropic | $0.088 | $147 |
| GPT-6.1 Sol OpenAI | $0.088 | $147 |
| Gemini 3.1 Pro (Preview) Google | $0.097 | $162 |
| Claude Opus 5.5 Anthropic | $0.175 | $293 |
| Claude Fable 5.1 Anthropic | $0.427 | $714 |
| GPT-6 Astra OpenAI | $0.46 | $770 |
How it works
Step n sends the instructions plus (n − 1) × the new context per step. Input for one task is the sum over all steps; output is steps × output per step. The cached share of input is billed at the cache-read price. Runs per month = tasks per day × 30.4 × (1 + retry share).
Real agents vary: some steps are tiny, some read whole files. Use the averages from your logs if you have them.
Questions
Why does cost grow faster than the number of steps?
Each step re-sends the instructions plus everything that happened so far: earlier tool results and the model's own replies. With 8 steps and 1,500 new tokens per step, the last step sends over 10,000 extra tokens. Doubling the steps roughly quadruples the context part of the bill.
How do I make an agent cheaper?
Cache the fixed instructions, trim tool results before passing them back, cap the number of steps, and route simple steps to a cheaper model. Retries are expensive, so validate tool inputs before calling the model again.
Does this include tool costs?
No. Search APIs, browsers or code sandboxes your agent calls are billed separately by their providers.