Skip to main content

Free tool

AI agent cost calculator

This AI agent cost calculator turns a loop of model calls into a cost per task and a cost per month. Enter the steps, the tokens, the tool calls, the retries and the cache hits, then compare the same run across current Claude, OpenAI and Gemini prices.

No sign-up. Runs in your browser. Last reviewed by the Builderz team.

Step 1

Model and prices

List prices checked on 2026-11-04. Edit any price to match your contract. Picking a model resets them.

Step 2

The agent run

User message or tool result.

Added to history on tool-call steps.

0.2 means one extra run in five.

Prompt and history already sent.

Helper

Paste text to estimate tokens

About 0 tokens by characters / 4, about 0 by words x 1.3.

This is an estimate. Exact counts need each vendor's tokenizer, and code or non-English text can differ a lot.

Result

What this run costs

Cost per task
$0.21
Cost per month
$1,244.16
Input tokens per task
84,480
of which cached reads
0
Output tokens per task
3,840

Token counts include retries. Input counts the cache write and cached reads.

Same scenario, every model

Uses the table list prices, not your edits above. Sorted by monthly cost.

Monthly cost by model, cheapest first
ModelPer taskPer month
Claude Haiku 5.5Anthropic$0.01$62.21
GPT-6 LunaOpenAI$0.01$62.21
Gemini 3.5 Flash-LiteGoogle$0.03$209.66
Gemini 3.8 FlashGoogle$0.08$466.56
GPT-6.1 TerraOpenAI$0.10$622.08
Claude Sonnet 5.5Anthropic$0.21$1,244.16
GPT-6.1 SolOpenAI$0.21$1,244.16
Gemini 4 ArgonGoogle$0.21$1,244.16
Gemini 3.1 Pro PreviewGoogle$0.22$1,290.24
Claude Opus 5.5Anthropic$0.41$2,488.32
GPT-5.5OpenAI$0.54$3,225.60
Claude Fable 5.1Anthropic$1.04$6,220.80
GPT-6 AstraOpenAI$1.04$6,220.80

Prices checked on 2026-11-04. Sources: Claude pricing, OpenAI API pricing, Gemini API pricing.

How it works

The loop model

A task is a loop of N steps. Each step sends the system prompt, the whole history so far, and the new tokens, and the model writes output tokens. A tool call returns result tokens that join the history. Input at step k is the system prompt plus every earlier input and output, plus what is new.

Why cost grows with the square of steps

History is re-sent on every step, so step k pays for roughly k steps of past text. Total input is a sum that grows with steps times steps, not steps alone. Doubling the steps more than doubles the input bill.

What caching changes

The cache hit share is the part of the already-sent prefix billed at the cache read price instead of the input price. The cache write price is billed once per task, on the cached share of the system prompt. Where a vendor lists no cache read price, the page uses 10 percent of input and says so.

What the table does not model

Long-context surcharges above a vendor threshold, batch discounts, image or audio tokens, cache storage fees, cache expiry between steps, and the write premium on tokens that join the cached history after step one are left out, so Anthropic cost with caching on reads a little low. Where the price table carries a note about one of them, it shows under the model.

Prices move and are editable

List prices were checked on the date shown under the result. Every price field is editable so you can enter your contract rate. The comparison table always uses the list prices.

Questions about this tool

Why is my real bill higher than this estimate?

Common causes are more steps than you assumed, tool results larger than the average, retries above your guess, long-context surcharges, and a cache that expires between steps. Pull the token counts from your provider dashboard for a few real tasks and enter those.

How do I cut the bill?

Shorten the history that gets re-sent: trim tool results, summarise old steps, and cap steps per task. Put stable text first so it caches. Route easy steps to a cheaper model. Change one thing at a time and re-run the numbers.

Is the token estimate exact?

No. It is characters divided by 4, and words times 1.3. Each vendor uses its own tokenizer, and code, numbers and non-English text often take more tokens. Use the usage fields from the API for exact counts.

Which model should I pick?

Read the table for the cheapest model, then test whether it finishes your task. A cheaper model that needs more steps or more retries can cost more. Compare cost per finished task, not cost per token.

Beyond the tool

Need this done for your program? Start with reliability and rescue sprint.

$5K-$15K. Book an intro call, or send a brief with what the tool showed you. We reply within one business day.

  • Acceptance in writing

    Criteria agreed before build starts

  • Proposal in 48h

    After a qualified scoping call

  • Change control

    Scope, exclusions, and owners named