Skip to content
UtilPouch

AI agent cost calculator

Set to a 20-step coding agent: a large system prompt, tool results coming back every step, and the full history resent each time. See what a month of runs costs.

Your conversation

Processed on this device
Start from
tokens
1–50
tokens
tokens
/ month

New input is what each turn adds: the user’s message or a tool result.

Without caching

$0.00

With prompt caching

$0.00

Input tokens per session
Output tokens per session
Longest request with reply

Turn by turn, one session

TurnInput that turnTotal so farWith caching

Prices checked December 6, 2026. Sources: OpenAI, Anthropic, Google, DeepSeek. Confirm current rates before you budget.

Why agents cost more than chat

An agent calls the model many times per task. Each step sends the instructions, the tool definitions, and every earlier step’s inputs and outputs, so later steps are far larger than early ones.

Tool results are often the biggest part: file contents, search results and test logs flow back into the context and stay there.

Keeping agent costs in check

Caching the stable prefix is the biggest lever. After that, trim tool output before it re-enters the context, and cap the number of steps per task.

Watch the context column: a run that overflows the window fails or gets truncated, which costs more in retries than it saved.

Typical agent step sizes
AgentSystem + toolsPer step inPer step outSteps
Coding agent5–10K1–5K (files, logs)500–1.5K10–40
Research agent2–4K3–8K (web pages)300–8005–15
Support agent with tools1–3K200–1K200–5003–10

Working ranges from common agent designs; measure your own logs for real figures.

Questions

How much does an AI coding agent cost per task?

With the default numbers here, a 20-step run on Claude Sonnet 5.5 costs about $1.75 without caching and about $0.50 with it. Your files and step count change this a lot.

Why does the cost per step keep rising?

Because each step resends everything before it. The 20th step carries 19 earlier steps of history.

Should agents use a cheaper model?

Often a mix works best: a cheap model for routine steps like reading files, a stronger one for planning and final edits.

What happens when the context window fills up?

The request fails or the oldest content must be dropped or summarized. The simulator warns when the longest step would not fit.