Business & Ecommerce calculator

AI Agent Cost per Successful Task Calculator

Token cost is not task cost. Task cost is not successful-task cost.

This calculator is built from documented pricing inputs and transparent operational assumptions — see Sources below.

Your entries are calculated in your browser and never sent to Calculator Matters. Do not enter API keys, confidential prompts, or sensitive customer data.

Workload & success

per 1M tokens
per 1M tokens
%

The chance ONE attempt succeeds — not the chance the task ever succeeds.

$
$
$

Illustrative starting point — replace every assumption with your own workflow data. Switch to Advanced agent model for multi-model stacks, prompt-caching detail, agent trajectories, and scenario comparison.

Cost per successful task

$0.1430

This workflow is estimated to spend $0.1430 for each successfully completed task, after accounting for failed runs, retries, tools, and human review.

Formula verified 16 July 2026

Expected monthly AI-agent cost

$1,407.38

Fully loaded — API, tools, human ops, and fixed/amortised cost.

Expected successful tasks / month

9,844

Out of 10,000 incoming.

Success within retry cap

98.4%

First-attempt success: 75.0%

Failed / wasted spend

$16.78

1.2% of total monthly spend.

Human-operations cost

$787.50

Review, rework, escalation, and maintenance.

Cost per incoming task

$0.1407

Includes tasks that never succeeded.

Secondary results
First-attempt cost per task$0.0358
Expected attempts per task1.31
Monthly model + tool cost$469.88
Monthly tool cost$131.25
Monthly fixed cost$150.00
Operating-only cost (excl. amortisation)$1,407.38
Fully loaded annual cost$16,888.50
Cost without caching$0.0258
Caching savings (per attempt)$0.000

Monthly cost composition

  • Model tokens24%
  • Tools9%
  • Human review & rework56%
  • Fixed / infrastructure11%

Retry economics

Expected attempts and cost by attempt number
AttemptApprox. probability reachedCost contribution
Attempt 1100% of tasks$358.00
Retries (2–3)0.31 expected retry attempts / task$111.88
Permanently failed1.6%$16.78

Cost-reduction insights

  • Retries account for approximately 24% of your monthly model and tool spend.
  • Human-operations cost ($787.50) exceeds model and tool spend ($469.88) at your current settings.

Every insight above is generated directly from the values you entered — none of these are universal recommendations.

What this tool covers

An agent may call several models, use external tools, retry failed steps, and require human review before one task is truly completed — this calculator combines those costs into one operational estimate, in your browser.

  • Multi-model stack, tools, and prompt caching
  • Retry and permanent-failure economics
  • Human review, escalation, and ongoing ops
  • Fixed cost, amortisation, and scenario comparison
Cost per success Retries Model routing Caching Scenarios XLSX

Educational operating-cost estimate — not a guaranteed bill, and not investment, procurement, or employment advice.

Updated 16 July 2026

Token price is one of six lines on an agent’s bill

A token price only covers one model call. A real agent task typically involves several model calls (router, worker, verifier), tool calls, a chance of failing and retrying, and sometimes human review before it is genuinely done. Each of those adds cost that a simple token calculation never sees, which is why the results panel splits total monthly cost six ways — model tokens, tools, human review and escalation, ongoing maintenance, fixed infrastructure, and amortised implementation cost. Nothing is hidden inside a single blended number: each segment is shown as its own share of the total, with a text legend so the chart works without relying on colour alone.

Costing an agent by hand means adding up every model call in one attempt (input, output and cached tokens at their published rates), adding the tool and infrastructure cost for that attempt, then working out how many attempts one incoming task actually needs once retries and failures are counted. The result — total monthly cost divided by expected successful tasks — is the number that matters, not a single API call’s price.

Four of the six lines are the ones routinely left out. Input tokens — especially repeated context in multi-step agents — are frequently the larger share of cost, not output. A flat per-call average hides how much a long agent run grows in size step over step, which is what trajectory mode exists specifically to model. Search, retrieval, browsing, and code-execution calls often add up to a meaningful share of variable cost. And orchestration, hosting, observability, and evaluation platforms cost money every month regardless of usage, so leaving fixed infrastructure out understates a low-volume agent badly.

Model call cost

Every figure on this page is produced by a documented formula — nothing is hidden inside a tooltip. For each model call: uncached input cost = uncached input tokens ÷ 1,000,000 × input price. Cached-read cost = cached tokens ÷ 1,000,000 × cached-input price. Cache-write cost = newly cached tokens ÷ 1,000,000 × cache-write price. Output cost = output tokens ÷ 1,000,000 × output price. Model cost is the sum of all four, plus any flat per-call cost. Batch discounts apply only to the token-priced components.

1.11 attempts a task at 90% success, 1.56 at 60%

Let p be the per-attempt success probability and M = 1 + maximum retries. Success within the retry cap = 1 − (1 − p)M, and the expected number of attempts one incoming task consumes = (success within the retry cap) ÷ p. At p = 0 this is handled as the explicit limit M (every attempt is used and none succeed); at p = 1 it is handled as the explicit limit 1 (the first attempt always succeeds) — neither case divides by zero.

Every row below allows the same two retries and pays the same model price. Only the per-attempt success rate moves.

Three per-attempt success rates at a two-retry cap, with the resulting overall success rate, attempts consumed per task, and extra attempts against the 90% row.
Per-attempt successSucceeds within capAttempts per taskExtra calls vs 90%
90%99.9%1.11
75%98.4%1.31+18%
60%93.6%1.56+41%

Dropping from 90% to 60% buys a slightly worse outcome for 41% more model and tool calls. That gap is the price of unreliability, and nothing you negotiate on the token rate touches it.

Three figures therefore matter more than any single average: first-attempt success rate (the chance one attempt works), success within your retry cap (the chance the task eventually succeeds at all), and expected attempts per task (how many attempts, on average, one incoming task actually consumes). The retry-economics table in the results panel then splits monthly cost across the first attempt, the retries that follow, and the tasks that permanently fail after exhausting every retry. Failed runs are counted apart from successful ones, because a task that exhausts every retry and still fails is a real cost with zero successful output to show for it; the calculator reports it explicitly as wasted spend rather than folding it silently into an average. Retries consume real model and tool calls whether or not they ultimately succeed, and a single-attempt cost stops being the cost of a completed task the moment your success rate drops below 100%.

Cost per attempt and cost per successful task agree only at 100%

Total monthly cost = model + tool cost + human-operations cost + monthly fixed/subscription cost + amortised implementation cost. Cost per incoming task = total monthly cost ÷ incoming monthly tasks. Cost per successful task = total monthly cost ÷ expected monthly successful tasks: all of the month’s cost, failed attempts and retries included, divided by only the tasks that actually succeeded within your retry cap. Where there are zero incoming tasks or zero expected successes, the calculator shows “Not calculable” rather than Infinity, NaN, or a misleading zero.

Cost per attempt is the price of one pass through the agent, win or lose. Cost per successful task is always equal to or higher than it, because failed attempts and retries are folded into the successful tasks that remain — the two are the same number only when every attempt succeeds on the first try. Read cost per successful task as the figure that matters for budgeting: it already accounts for every attempt a task needed, successful or not. Read cost per incoming task as the lower, more optimistic figure that spreads cost across everything you attempted, permanent failures included. The gap between the two tells you how expensive unreliability actually is. Dividing spend by attempted tasks instead of successful ones is the single most common costing error this calculator exists to correct.

A high wasted-spend percentage means a meaningful share of spend went to tasks that never succeeded — worth investigating before adding more retries or a pricier fallback model. A human-operations cost that rivals or exceeds model cost is common for agents with meaningful review requirements, and is not by itself a sign of a badly built agent.

5,000 tasks in, 4,688 successes out

Illustrative example — replace every assumption with your own workflow data. These are not industry averages.

A customer-support research agent processes 5,000 tasks a month. Each attempt uses a primary model (2,000 input tokens, 600 output tokens, 1 call) and a verifier model (1,500 input tokens, 100 output tokens, 1 call). 50% of input tokens are structurally cache-eligible, with an 80% cache-hit rate. A web-search tool fires once per attempt at $0.01/call. The per-attempt success rate is 75%, with up to 1 retry allowed (M = 2, retry cost multiplier 1.1×). 20% of successful outputs get a 4-minute human review at a $28/hour loaded rate, and 50% of failed tasks are escalated for a 6-minute human look at $22/hour, recovering 30% of them. Fixed monthly infrastructure (orchestration $49 + hosting $25 = $74/month), plus an $8,000 one-time build cost ($6,000 development + $2,000 integration) amortised over 12 months (≈$667/month).

Success within the retry cap: 1 − (1 − 0.75)2 = 1 − 0.0625 = 93.75%. Expected attempts per task: 0.9375 ÷ 0.75 = 1.25. Expected successful tasks: 5,000 × 0.9375 ≈ 4,688/month. Combining the model-stack cost per attempt (with caching applied), the tool cost, the retry-weighted variable cost, human-operations cost, and the fixed-plus-amortised cost gives a total monthly cost that — divided by those 4,688 successes rather than by the 5,000 tasks that came in — produces the cost-per-successful-task figure shown live in the calculator when you load these same numbers. Because every input above is reproduced exactly in scripts/validate-ai-agent-cost.mjs’s Scenario C fixture, the arithmetic behind this example is independently verified, not just asserted.

Human review, escalation, and the amortised build

Review cost = reviewed successful tasks × review minutes ÷ 60 × loaded hourly cost. Escalation cost follows the same shape for failed tasks that get human attention. Amortised implementation cost = total one-time implementation cost ÷ amortisation period in months, which is how the $8,000 build above becomes ≈$667 a month across twelve.

Break-even task volume against an existing process

When a human-led or existing-software baseline is entered, break-even monthly task volume solves for the point where the AI workflow’s fixed-plus-variable cost equals the existing process’s fixed-plus-variable cost — shown as a task count, not a vague statement that “it depends on scale.”

When the cheaper model bills more per finished task

Compare models on cost per successful task for your actual workflow, never on list price per token. A lower per-token price can be offset by a lower success rate, a higher retry rate, larger context needs, or more human review — each of which raises cost per successful task independently of what a token costs. A cheaper model can therefore end up costing more per successful task than a pricier model that gets it right the first time, which is exactly why this calculator measures cost per successful task rather than stopping at cost per call. Use the Scenario Comparison to test it directly with your own numbers, and read the per-success row rather than the per-call one.

Read quality alongside cost, too. A cheaper workflow that fails more often, or produces worse output, is not simply “better,” and longer prompts and more calls raise cost without necessarily raising the success rate they were meant to buy.

The Cost-reduction insights panel above is generated directly from your own inputs — nothing there is a generic recommendation. Depending on what you enter, it may point out that retries dominate spend, that fixed costs are too large for your current volume, that a verifier model costs more than the model it is checking, or that your cache-hit rate has little effect because too little of your input is actually cacheable. The levers worth testing in the calculator itself: improving first-attempt success, reducing unnecessary context growth, increasing valid cache reuse, routing simpler tasks to a cheaper model, cutting unneeded verifier calls, reducing tool-call frequency, batching eligible requests, shortening output length, and compacting context safely in long agent runs.

Prompt caching discounts a share of a share

Providers charge a fraction of the standard input price for tokens read from a prompt cache, which is why the calculator prices three input streams separately: uncached input at the full rate, cached reads at the cached-input rate, and newly cached tokens at the cache-write rate. Caching only helps for the share of your input that is actually eligible — usually a system prompt or repeated context — and that actually gets reused. Assume every token is cacheable, or that every cache lookup hits, and the saving on screen will be larger than the saving on the invoice. Caching behaviour in practice depends on provider-specific rules, prompt structure, cache lifetime, and request similarity that this model only approximates, so treat the caching line as the most provisional figure in the whole breakdown.

Four costs you have to type in, because nothing here can see them

Human review. Count it whenever a person genuinely reviews, reworks, or escalates a task before it counts as done. Presenting only the API bill as “the cost of AI” understates the real number for most production agents, which is why this calculator has a dedicated human-operations section rather than treating labour as an afterthought.

Self-hosted compute. Self-hosted infrastructure can be modelled here at a basic level: enter your effective per-attempt compute cost — GPU cost per hour ÷ effective throughput, accounting for utilisation — as a custom model’s “other cost per call.” Low utilisation materially increases the real per-task cost of self-hosted infrastructure, so never assume 100%. The same slot absorbs anything billed per unit rather than per token: speech-to-text and text-to-speech are already available as tool types with their own per-call cost, so a voice agent goes in beside the model, retry, and human-review costs, with telephony or call-minute charges added as a custom tool cost.

Current provider prices. Check them before every significant budgeting decision. Provider pricing changes without much notice, and a number from months ago can materially understate or overstate current cost — which is why the presets below each carry the date they were last checked against the provider’s own pricing page.

Your real success rate. This calculator does not fetch live provider pricing, does not see your actual API usage, and cannot predict real-world success rates, latency, or output quality. It cannot certify security, compliance, or safety, and self-hosted compute is modelled at a basic level that does not capture the full complexity of production infrastructure. Every figure here is a planning estimate built from the assumptions you entered, not a forecast of your invoice and not a guaranteed bill — test it against real usage data rather than treating it as a substitute for monitoring what you are actually charged.

Sources and methodology

Formula: the retry-probability, expected-attempts, and cost-allocation formulas above are standard probability and cost-accounting identities, verified independently in this site’s automated test suite against hand-computed fixtures — not invented for this page.

Model pricing presets: copied only from official provider pricing documentation, never a third-party aggregator, with the source URL and verification date recorded for each. Model prices change — verify current rates with the provider before making a purchasing decision.

Related calculators

ROISimple, date-based, and net ROI with annualised ROI (CAGR), a reverse target solver, and a two-investment comparison.
Break-EvenFind units and revenue break-even, contribution margin, target profit, and margin of safety, with sensitivity tables and a chart.
Opportunity CostCompare two choices to see net value, opportunity cost, explicit vs implicit costs, and risk-adjusted scenarios.
Profit MarginWork out gross, contribution, operating, and net margin, with target pricing, break-even, scenarios, and SKU comparison.
Ecommerce ProfitSee net profit per order after product costs, fees, shipping, ads, and returns, with break-even price and ROAS.
LTV:CACCalculate CAC, discounted LTV, the LTV:CAC ratio, and CAC payback, with channel-by-channel decisions and scenarios.
Break-Even ROASWork out break-even and target ROAS from your real margins, plus max CAC, break-even MER, and ad budgets.
Diminishing ReturnsTurn input-output data into total, marginal, and average product and find the point of diminishing returns.

More in Business, or browse all calculators.

Educational disclaimer

This calculator provides an educational operating-cost estimate based on the assumptions and pricing values entered. Actual AI-provider bills, token use, cache behaviour, tool charges, reliability, latency, quality, and human-review requirements may differ. Verify current provider pricing and test the workflow with production data before making financial, technical, or procurement decisions. This is not investment, employment, legal, or security-certification advice, and does not guarantee savings or performance.

Built from documented pricing inputs and transparent operational assumptions · How we calculate · email us

Authorship & verification

Created and maintained by , finance educator.

What's changed (2 updates)

Published 16 July 2026

  1. Published the AI Agent Cost Calculator: multi-model stack, prompt caching, agent trajectory, retry/failure economics, human review, fixed and amortised implementation cost, scenario comparison, and cost-range uncertainty modelling.
  2. Cost per successful task (not cost per attempt) is the calculator's core metric, computed from retry mathematics rather than a naive token multiplication.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.