All tools
Interactive calculator · free · no signup

AI agent cost estimator

Enter steps per task, tokens per step, your model's per-million-token prices, a cache hit rate, and tasks per day; get cost per task and per month for an agent that makes multiple model calls per task.

Repeated context served from cache.

0.12 per task · 715.68 per month.

Total input tokens / task
43,200
Cost / task
0.12
Cost / day
23.86
Cost / month
715.68

Input compounds because each step re-sends prior context (modeled as steps × (steps+1) ÷ 2). Caching the repeated context is the main lever.

How it works

Agents differ from single-call apps in one expensive way: each step is a fresh model call that re-sends the accumulated conversation — prior tool calls, results, and reasoning — as input. A ten-step task is not ten times the cost of one call; the later steps carry far more input tokens than the early ones because context compounds.

The calculator models this with a context growth assumption: each step's input includes the base input plus a growing share of everything generated so far. You set steps per task, average fresh input and output tokens per step, and prices per million tokens, and it sums the per-step costs rather than naively multiplying one step by the step count.

The cache hit rate models prompt caching on repeated context — the system prompt and earlier turns that recur verbatim across steps are exactly what caching is built for. Cached input tokens are billed at your provider's discounted multiplier, which is often the difference between an agent that is affordable and one that is not.

Assumptions and limitations

Frequently asked questions

Why do AI agents cost so much more than single API calls?

Because every step re-sends the conversation so far as input. Input tokens grow roughly with the square of step count in a naive agent, since step N carries the context of steps one through N-1. This is why agent costs scale non-linearly and why a step count you would barely notice in latency can dominate your bill.

How can I reduce the cost of running an AI agent?

The big three levers are fewer steps (better prompts and tools so tasks finish sooner), aggressive prompt caching on the repeated context, and context management — summarizing or dropping old tool outputs instead of re-sending them forever. Model choice per step also matters: not every step needs your most capable model.

What makes agent context grow so quickly?

Each step appends its tool calls, results, and reasoning to the conversation, and the next step re-sends all of it as input. Without trimming, step ten carries the full history of steps one through nine, so total input tokens across a task scale with the square of the step count rather than linearly.

How many steps does a typical AI agent task take?

There is no universal number — it depends entirely on task complexity, tool design, and how much the model must explore. The honest approach is to instrument your own agent, log step counts across real tasks, and feed the observed average and worst case into this estimator rather than guessing.

Is any of the data I enter in this estimator stored or transmitted?

No. Every calculation runs client-side in your browser. Your prices, token figures, and volumes never leave the page and nothing is stored when you close it.