Cost calculator

AI Agent Cost Calculator

Agent loops re-send their whole history every step, so cost grows faster than step count. Model the loop step by step, with caching, retries, and tool fees, and compare every model per run.

Estimated cost

Calculating…

Results update as you change the inputs.

    Methodology and assumptions

    Step k sends the system prompt, tool definitions, and task plus every earlier step's output and tool result: context = base + task + (k − 1) × (output + tool result). Total input therefore grows with the square of the step count. With caching on, the cache-hit share of the previous step's context (and of the base prompt on step 1, reused across runs) is billed at the cached-input rate; the remaining new tokens are billed at the cache-write rate so the next step can reuse them. With 0% cache, all input is billed at the standard input rate.

    Retries multiply every model call by (1 + retry rate). Paid tool fees are a per-run amount you supply, for example web search at the vendor's per-search price times searches per run. Any step whose context exceeds a model's long-context threshold is billed at long-context rates. Tool system-prompt tokens that vendors add automatically should be included in the base prompt. Reasoning tokens count as output. Session runtime, sandboxes, storage, data residency, and taxes are excluded. Formula version 2026-10-01.

    Official sources:

    Pricing last verified:

    Frequently Asked Questions

    What does the AI Agent Cost Calculator calculate?

    Agent loops re-send their whole history every step, so cost grows faster than step count. Model the loop step by step, with caching, retries, and tool fees, and compare every model per run.

    How accurate is the AI Agent Cost Calculator?

    It is a planning estimate based on the inputs, formula, assumptions, and sources shown on this page. Actual prices, invoices, taxes, discounts, and outcomes can differ.

    Which pricing source does the AI Agent Cost Calculator use?

    The calculator links to Vendor API pricing pages (all listed below) as its official source. The displayed pricing or reference data was last verified on 2026-10-08.

    Are calculator inputs saved or sent to analytics?

    Inputs are processed in your browser. Calculator values are not included in analytics events.