Free agent cost calculator
AI Agent Cost Calculator for Steps, Tokens & Retries
AI agent cost is the sum of input-token, cached-input, and output-token charges across every model step, including expected retries. This calculator multiplies editable per-million-token prices by workflow volume, tokens per step, steps per task, and retry overhead. It uses no fixed vendor price, so the assumptions remain visible and replaceable.
Last updated: July 19, 2026 · No sign-up · Runs in your browser
Workflow and price inputs
Use observed usage where available. Prices are editable examples—not a provider preset.
Expected model spend
Monthly model cost
—
Cost per completed task
—
Monthly tasks
—
Expected billed steps
—
| Uncached input | — |
|---|---|
| Cached input | — |
| Output | — |
| Spend caused by expected retries | — |
How the AI agent cost estimate works
The calculator estimates expected monthly model spend. It first expands tasks into model steps, applies retry overhead, separates cached and uncached input tokens, prices each token class, and divides the result by completed task volume. It excludes provider-specific cache-write fees, tool/API charges, storage, search or grounding, embeddings, infrastructure, observability, taxes, and minimum commitments.
| Stage | Formula |
|---|---|
| Monthly tasks | tasks/day × active days |
| Expected steps | tasks × steps/task × (1 + retry %) |
| Token cost | tokens ÷ 1,000,000 × class price |
| Cost per task | monthly model cost ÷ completed tasks |
Check current provider prices
Token prices and caching rules change. Copy current values from the provider before treating the estimate as a budget.
Frequently asked questions
How do I calculate AI agent cost per task?
Add input, cached-input, and output token charges for every model step, include expected retries, then divide the total by completed tasks. Tool calls, search, storage, and infrastructure may add separate charges.
Why do agent retries matter for cost?
A retry repeats one or more model steps and therefore consumes additional input and output tokens. Use observed retry or failed-step data when possible instead of assuming every task succeeds on the first pass.
Does prompt caching make every cached token free?
No. Providers can price cache reads, writes, and storage differently. Enter the cache-read ratio that applies to the model and treat cache-write or storage fees separately when the provider charges them.
Are the default token prices tied to a model?
No. The defaults are editable examples for testing the formula. Replace them with current input, output, and cached-input prices from the provider before using the estimate for a decision.
Continue exploring
Related free tools
Move from this result to a related planning, infrastructure, or validation task. Each tool is free to use without sign-up.