← back to flaviocopes.com

AI agent step-cost visualizer

← All tools

Each agent step re-sends the whole context. Tool results pile up — cost grows faster than step count. Tune the assumptions and see the per-step bill.

~~~

Assumptions

~~~

Totals

Per run

Per day

Per month (30d)

Input tokens / run

Cost per step

Input billed = initial context + (step − 1) × tokens added. Each row is one LLM call in the agent loop.

StepInput tokensOutput tokensStep costCumulativeRelative

Pricing snapshot from July 2026 vendor pages. No prompt caching modeled — real agents with cache hits pay less on repeated prefix tokens.

~~~

About this tool

Agent loops are sneaky expensive. Every step sends the full conversation plus tool results back to the model. If step 1 bills 4k input tokens and each step adds 1.5k of tool output, step 8 bills ~14.5k input — and you pay for all of it again.

That is why agent cost scales worse than linear: more steps mean longer context, and longer context means every subsequent step costs more. The fix is not always a cheaper model — it is summarizing tool results, trimming history, and caching stable prefixes.

This calculator uses simple arithmetic, not your real trace. Use it to sanity-check whether a 12-step ReAct loop at 100 runs/day is a rounding error or a line item.

~~~

Read more