Free tool · live pricing

AI agent cost calculator

A 10-step AI agent costs between $0.018 and $1.77 per run on today's major models. The model is only half of it: agents re-send their whole context on every step, so cost grows faster than the step count. Set your own workload below.

Rates for 158 models, synced November 22, 2026.

Start from a typical agent

claude-sonnet-5-5

Per run

$0.355

Per day

$355.00

Per month

$10,650

Input tokens
153k
Output tokens
5,000
Input cost
$0.305
Output cost
$0.050

74% of the input you pay for is context re-sent from earlier steps. Each extra step costs more than the one before it.

Same agent, other models (per run)

This is an estimate. AgentCost measures the real cost of every run, per agent.

Track it free

What an AI agent costs per run, by model

Three typical agents on current models, without prompt caching. Monthly figures assume 1,000 runs a day for 30 days.

ModelSupport agent4 stepsResearch agent10 stepsCoding agent30 stepsResearch agent / month
claude-fable-5anthropic$0.186$1.77$18.60$53,250
claude-opus-5anthropic$0.093$0.887$9.30$26,625
claude-sonnet-5-5anthropic$0.037$0.355$3.72$10,650
claude-haiku-5-5anthropic$0.0019$0.018$0.186$532.50
gpt-5.6openai$0.074$0.710$7.44$21,300
gpt-5.5openai$0.098$0.912$9.41$27,375
gpt-5.4-miniopenai$0.015$0.137$1.41$4,106
gpt-5.4-nanoopenai$0.0040$0.037$0.377$1,103
gemini-3.1-pro-previewgoogle$0.039$0.365$3.76$10,950
gemini-3.5-flashgoogle$0.029$0.274$2.82$8,213
gemini-3.1-flash-litegoogle$0.0049$0.046$0.470$1,369
grok-4.5-latestxai$0.033$0.335$3.64$10,050
deepseek-v4-prodeepseek$0.022$0.221$2.40$6,633
deepseek-v4-flashdeepseek$0.0053$0.052$0.552$1,552
  • Support agent: Answers a ticket with a couple of lookups: 4 steps, small context. 14k input and 1,000 output tokens per run.
  • Research agent: Searches, reads and summarises: 10 steps, large tool results. 153k input and 5,000 output tokens per run.
  • Coding agent: Reads files, edits, runs tests: 30 steps, big system prompt. 1.75M input and 21k output tokens per run.

How AI agent cost is calculated

An LLM bills per token: input tokens at one rate, output tokens at a higher one. A chatbot makes one call per question, so its cost is easy to predict. An agent makes many calls per task, and each call carries everything that came before it.

input  = steps × base + growth × steps × (steps − 1) / 2
output = steps × output_per_step
cost   = input × input_rate + output × output_rate

The second term is the one that surprises people. Double the steps and the re-sent context roughly quadruples. In the 30-step coding agent above, 74% of the input tokens are context the model has already seen.

What drives the bill, and how to cut it

  • Step count. Fewer, better-planned steps beat a cheaper model that wanders. Cap iterations and stop loops early.
  • Tool result size. A search that returns 5,000 tokens is paid for on every later step. Trim, summarise or drop old results.
  • Prompt caching. Put the system prompt and tool schemas first and keep them stable, so the provider can serve them from cache.
  • Model per step. Routing and extraction rarely need a flagship model. Use a small one for those steps and keep the large one for reasoning.
  • Retries. A failed call still bills. Retries and silent loops are the most common cause of an unexplained spike.

Questions

How much does an AI agent cost to run?

It depends on the model and on how many steps the agent takes. A 10-step research agent costs about $0.018 to $1.77 per run across today's major models (pricing as of November 22, 2026), which is $532.50 to $53,250 a month at 1,000 runs a day. Use the calculator above with your own step count and token sizes.

Why do AI agents cost more than a single LLM call?

Because every step re-sends the whole conversation. An agent's context grows with each tool result and each answer, and the model bills all of it as input again on the next step, so input tokens grow with the square of the step count. In the 30-step coding agent above, 74% of the input tokens are context re-sent from earlier steps.

Does prompt caching reduce AI agent cost?

Yes, when the provider publishes a cached-input rate. The system prompt and tool definitions are identical on every step, so after the first step they can be read from cache at a fraction of the input price. Turn on prompt caching in the calculator to see the difference for your model. Some providers also charge a premium to write the cache; that is not included here.

How accurate is this AI agent cost calculator?

The rates are the providers' published per-token prices, synced daily from AgentCost's model catalog. The workload is an assumption you control: real agents vary step count from run to run, retry failed calls and loop. To see the actual cost of each run, per agent, instrument the agent with AgentCost.

Which model is cheapest for AI agents?

Per token, the small models (Haiku, Flash-Lite, Nano, DeepSeek Flash) are an order of magnitude cheaper than flagship models. Per completed task, a cheaper model that needs more steps or more retries can cost more. Compare models on the same workload in the calculator, then measure real runs before switching.

Stop estimating. See what each agent actually spent.

AgentCost records every LLM call with its real token counts and cost, and attributes it to the agent and step that made it. Python or TypeScript, free and open source.