Agent loop cost methodology

Open formula. Browser-based calculations. Source-dated rates. No API keys. No provider login. No tracing SDK. No account required. Input payloads are not stored.
Pricing source date: 2026-05-28 · Build verification: 2026-05-28 · Stale threshold: 30 days. Estimates use published per-token API pricing for the model/provider path shown by the calculator, reviewed on the source date shown. Provider rates change frequently; verify current pricing on the provider's own page before committing to traffic volume, eval cadence, or agent-loop workload shape.

Models cost per successful agent task by multiplying turn count, tool-call fan-out, context growth, and failure overhead.

Formula

cost_per_successful_task = cost_per_attempt / success_rate; monthly_cost = tasks_per_month * cost_per_attempt

Primary source register

Agent economics are highly sensitive to loop depth, success rate, and context growth. Re-run with production traces once available.

Included assumptions

Excluded assumptions

Architecture-cost audit

Agent-loop fan-outSteps per task, tool calls, retries, success rate, and context growth that multiply per-task cost.
Context growthDocument tokens, system overhead, output reserve, and cumulative context requirements.
Observability overheadTraced requests, log volume, retention, seats, and provider-specific usage tiers.

Diagnostic output

This tool returns Cost classification, Dominant cost driver, Decision threshold, and Sensitivity. Diagnostic focus: Cost per successful task and loop-depth/success-rate sensitivity..

Affiliate link. Model Ruler may earn a commission if you sign up. This does not affect what you pay.

Return to calculator