AI Token Price

AI agent cost calculator

What an AI agent costs per task and per month. Agents re-read their whole conversation at every step, so input grows with each step. Prompt caching usually cuts the bill by more than half.

Short answer: an example coding agent task (40 steps, 90% of repeated input cached) costs about $0.97 on Claude Sonnet 5.5 (about $427 a month at 20 tasks a working day). A customer support conversation costs about $0.046 on Claude Sonnet 5.5. Simple assistants and automations on GPT-6 Luna cost $3.36–$12.34 a month; busy agents on top models can cost hundreds. These are model running costs at list prices checked 2 Nov 2026. See example costs, a task step by step, or work out your own below.

Start from an example agent

Claude Code, Codex or Cursor-style agent. Example starting values; adjust them to match your agent.

Model calls in one task.
Tokens resent every step.
File contents, search results.
Applies only to models with a cache-read price. 80–95% is typical for agents that keep a stable prefix.
Per task
$0.97
2.42M in · 15K out
Per day
$19.40
20 tasks
Per month
$427
22 days

Would a Claude Code plan cost less? Plans with Claude Sonnet 5.5 cost $20–$200 a month, with usage limits; this workload is about $427 a month on the API. Compare Claude Code plans

Where the tokens go

  • Context at the first and last step19K → 102K tokens
  • Input tokens per task served from cache2.11M of 2.42M
  • Share of cost from input85% input · 15% output
  • Same work done by a person ( min per task at $/hour)$45.00 per task

Same agent on other current models

Monthly cost for the workload above. Models without a cache-read price pay full price for repeated input.

What an AI agent costs: five examples

Example cost per task and per month for five kinds of AI agent on GPT-6 Luna, Claude Sonnet 5.5, Claude Opus 5.5
AgentGPT-6 LunaClaude Sonnet 5.5Claude Opus 5.5
Coding agent20 tasks a day, 40 steps each, 90% cached $0.059 per task
$25.98 a month
$0.97 per task
$427 a month
$1.94 per task
$853 a month
Personal assistant40 tasks a day, 6 steps each, 80% cached $0.0028 per task
$3.36 a month
$0.052 per task
$62.47 a month
$0.10 per task
$125 a month
Workflow automation300 tasks a day, 3 steps each, 50% cached $0.0014 per task
$12.34 a month
$0.027 per task
$243 a month
$0.054 per task
$486 a month
Research agent10 tasks a day, 25 steps each, 85% cached $0.048 per task
$10.45 a month
$0.83 per task
$184 a month
$1.67 per task
$367 a month
Customer support agent300 tasks a day, 5 steps each, 80% cached $0.0024 per task
$21.95 a month
$0.046 per task
$412 a month
$0.092 per task
$824 a month

Calculated from list prices checked 2 Nov 2026, using the preset workloads in the calculator above; pick a preset to see or change its settings. Real agents vary a lot: the number of steps per task matters most.

One coding task, step by step

Take the coding agent preset on Claude Sonnet 5.5: a 40-step task with an 18,000-token system prompt and tool definitions, a 500-token request, and about 1,800 tokens of tool results and 350 tokens of model output added at each step.

  • Step 1 reads 18,500 input tokens: the system prompt, tools and request.
  • Step 40 reads 102,350, because every earlier tool result and reply is sent again.
  • Across the task that adds up to 2.4 million input tokens, to write about 15,000 output tokens.
  • With 90% of repeated input served from cache, 2.11M of those tokens are billed at Claude Sonnet 5.5's cache-read price of $0.10 per 1M instead of $2.
  • The task costs about $0.97: 85% of it for input and 15% for output. Without caching it would cost about $4.98.

That is why the number of steps matters more than anything else: for this task, doubling the steps more than triples the input tokens. Price a simple chat workload on the same models for comparison.

How agent costs add up

An agent calls the model once per step. Each call resends the system prompt, tool definitions, the task and everything that has happened so far. A 40-step coding task with an 18,000-token system prompt reads about 2.4 million input tokens, even though the model only writes around 15,000.

That is why caching matters more for agents than for chat. When the start of the conversation is unchanged between steps, providers bill the repeated part at the cache-read rate, often a tenth of the input price or less.

The calculator adds each step's context as: system prompt + request + (step − 1) × (tool result + output). Cached tokens are the part of each step's context that was already sent in the previous step.

Cutting the bill

  • Keep the prefix stable. A timestamp or random ID near the top of the prompt breaks the cache on every step.
  • Trim tool output. Tool results are the fastest-growing part of the context. Return summaries, not whole files.
  • Route easy steps to a cheaper model. Planning on a frontier model and routine steps on a small one can cut costs several times over.
  • Check subscriptions. For one heavy user, a $100–200 plan that includes an agent can cost less than the API. Compare Claude Code, Codex, Cursor and GitHub Copilot plans, or chat plans.

Related guides: Hermes Agent running costs · OpenClaw setup

Questions

How much does an AI agent cost to run?

It depends mostly on how many steps each task takes and which model you use. Our example coding agent task (40 steps, 90% of repeated input cached) costs about $0.97 on Claude Sonnet 5.5, so 20 tasks a working day comes to about $427 a month. A simple workflow automation on GPT-6 Luna can cost about $12.34 a month, while a busy coding agent on Claude Opus 5.5 can run to $853 a month. The table above shows example costs for five kinds of agent; the calculator works out your own.

What does an AI agent cost per task?

Between about $0.0014 and $1.94 per task for the example agents above. Cost per task grows faster than the number of steps, because every step resends the whole conversation so far: a 40-step task reads about 2.4 million input tokens to write about 15,000.

What is the cheapest model for running an AI agent?

For the coding agent workload, Ministral 3 3B is the cheapest current model at about $23.38 a month, and DeepSeek V4 Pro is the cheapest frontier model at about $244. Cheap models often need more steps or retries on hard tasks, so compare cost per finished task, not just the price per token. A common pattern is planning with a stronger model and doing routine steps with a cheap one.

Why do AI agents cost so much more than chatbots?

A chatbot reply is one model call. An agent makes one call per step, and each call resends the system prompt, the tool definitions and everything that has happened so far. Most of an agent's bill is input tokens being read again and again, which is why prompt caching, which bills repeated input at a fraction of the price, matters so much for agents.

Is an AI agent cheaper than doing the work yourself?

Usually, for tasks it can finish. The coding task above costs about $0.97 on Claude Sonnet 5.5, against $45 for 45 minutes of a person's time at $60 an hour. The comparison only holds if the agent's work is good enough to use; failed attempts and review time count too.

What does an AI customer support agent cost per conversation?

About $0.0024 per conversation on GPT-6 Luna, $0.046 on Claude Sonnet 5.5 and $0.092 on Claude Opus 5.5, for a 5-step conversation that looks up help articles and order data. At 300 conversations a day that is $21.95 to $824 a month in model costs. Pick the customer support preset above to change the numbers.

Does this include the cost of building the agent?

No. These are running costs: the tokens the model reads and writes, at the provider's list prices. Building the agent, hosting, vector databases, tool APIs and agent platforms that charge per seat or per conversation all come on top. For most agents the model bill is the part that grows with use.

Is a subscription cheaper than the API for agents?

For one heavy user, often yes: plans such as Claude Max and Ultra or ChatGPT Pro include agent use for a flat $100–200 a month, which can be less than the API cost of the same work. For a product serving many users, or automation running unattended, the API is the only option. Compare coding plans with API pricing.

Other calculators