AI agent cost calculator
The API cost of an AI agent per task and per month on 169 language models at their list prices, counting the context each step sends again.
How it is worked out: step k sends the system prompt and tool definitions, the k−1 earlier outputs and tool results, and the newest tool result as input, and gets one output back. Those tokens are priced at each model’s input and output price per million, then multiplied by tasks a month. The starting figures are an example; replace them with your own.
Calculator
- Input tokens per task
- 301.5k
- Output tokens per task
- 4.5k
- Tokens a month
- 306M
169 models at list price, lowest monthly cost first.
| Model | Per task | Per month | Input / output per 1M |
|---|---|---|---|
| Gemma 4 31B Google | $0.0000 | $0.0000 | $0 / $0 |
| Gemma 4 26B A4b Google | $0.0000 | $0.0000 | $0 / $0 |
| Ling 3.0 Flash Ant Group | $0.0053 | $5.29 | $0.0168 / $0.0504 |
| gpt-oss-20b OpenAI | $0.0096 | $9.63 | $0.03 / $0.13 |
| gpt-oss-120b OpenAI | $0.0098 | $9.81 | $0.03 / $0.17 |
| Llama 3.2 1B Instruct Meta | $0.0099 | $9.95 | $0.03 / $0.2 |
| Amazon Nova Micro V1 Amazon | $0.01 | $11.18 | $0.035 / $0.14 |
| Granite 4.1 8B IBM | $0.02 | $15.53 | $0.05 / $0.1 |
| Gemma 3 4B IT Google | $0.02 | $15.53 | $0.05 / $0.1 |
| Gemma 3 12B IT Google | $0.02 | $15.75 | $0.05 / $0.15 |
| OLMo 2 0325 32B Instruct Ai2 | $0.02 | $15.98 | $0.05 / $0.2 |
| Llama 3.2 3B Instruct Meta | $0.02 | $16.56 | $0.05 / $0.33 |
| GPT 5 Nano High OpenAI | $0.02 | $16.88 | $0.05 / $0.4 |
| Gemma 3N E4b IT Google | $0.02 | $18.63 | $0.06 / $0.12 |
| NVIDIA Nemotron 3 Nano 30B A3b Bf16 NVIDIA | $0.02 | $19.17 | $0.06 / $0.24 |
| Amazon Nova Lite V1 Amazon | $0.02 | $19.17 | $0.06 / $0.24 |
| Phi 4 Microsoft AI | $0.02 | $21.74 | $0.07 / $0.14 |
| Hy4 flash Tencent | $0.02 | $22.37 | $0.07 / $0.281 |
| Gemma 3 27B IT Google | $0.03 | $26.15 | $0.08 / $0.45 |
| Step 3.5 Flash StepFun | $0.03 | $31.50 | $0.1 / $0.3 |
| Llama 3.3 70B Instruct Meta | $0.03 | $31.59 | $0.1 / $0.32 |
| Qwen3.5 Flash Alibaba | $0.03 | $31.95 | $0.1 / $0.4 |
| NVIDIA Llama 3.3 Nemotron Super 49B V1.5 NVIDIA | $0.03 | $31.95 | $0.1 / $0.4 |
| GPT-6 Luna OpenAI | $0.03 | $32.40 | $0.1 / $0.5 |
| Claude Haiku 5.5 Anthropic | $0.03 | $32.40 | $0.1 / $0.5 |
A chat assistant instead of an agent: AI chatbot cost calculator. Single requests and batch jobs: AI token cost calculator. Request limits per provider: AI API rate limits.
Frequently asked questions
Why do AI agents cost more than chat?+
An agent calls the model many times per task, and every call resends the system prompt, the tool definitions and everything done so far. Input grows with each step, so total input grows with the square of the step count. A 20-step task with 5,000 tokens of instructions and tools, 1,000-token tool results and 200-token outputs sends 348,000 input tokens.
How much does prompt caching save on an agent?+
The instructions, tool definitions and earlier steps are an identical prefix on each call, so providers with prompt caching bill that part at their cached-input rate. Tick the cached-input option to apply each model’s listed cached rate to the repeated input.
What is not included?+
Reasoning tokens unless added to the output per step, the cost of the tools themselves (search APIs, code sandboxes), retries, cache-write surcharges, context trimming or summarising that an agent framework may do, free tiers, volume discounts and tax.
How many tokens do tool definitions use?+
Each tool’s name, description and JSON schema are sent as input on every call. Count them with the provider’s token counter, or measure the input tokens a real call reports, and add them to the system prompt field.