Short answer: AI cost per successful task is the expected model and tool spend across allowed attempts, plus human review cost, divided by the probability that the task succeeds before the retry limit.
The free calculator runs locally in your browser. It does not upload workflow inputs.
Why cost per AI call is the wrong number
A model provider prices an attempt. Your business needs a successful outcome. Those are different units.
One task can trigger an initial model call, retrieval, tool calls, validation, one or more retries, and human review. Some tasks still fail after the retry limit. A per-call figure excludes most of that system and hides the denominator.
Cost per successful task keeps three questions separate: What does one attempt cost? How often does an attempt pass the real acceptance test? How much human work is required before the result can be used?
The retry-adjusted formula
Let p be the probability that one attempt succeeds, and n be the maximum number of attempts.
Success within the retry limit equals 1 minus (1 minus p) raised to n.
Expected attempts equals 1 plus (1 minus p) plus each additional failure probability through the final allowed attempt.
Cost per successful task equals attempt cost multiplied by expected attempts, plus human review cost, divided by the probability of success within the limit.
This model assumes each attempt has the same independent success probability and review happens once per task. Those assumptions are useful for a first estimate. If retry quality changes after each failure, or reviewers inspect every attempt, model those stages separately.
A worked AI cost example
Suppose one attempt costs $0.18 across model, retrieval, and tools. One attempt succeeds 72 percent of the time. The workflow allows three total attempts. Final review takes four minutes, and the reviewer costs $75 per loaded hour.
Probability of success within three attempts: about 97.8 percent.
Expected attempts per task: about 1.36.
Expected model and tool spend: about $0.245.
Human review cost: $5.00.
Expected cost per successful task: about $5.36.
The $0.18 attempt price looks inexpensive. The successful outcome costs nearly thirty times more because review dominates. Chasing a cheaper model would barely move this workflow until review time changes.
How retries change AI economics
Retries increase eventual success, but they also add spend and latency. The first retry often has more value than the third because each additional attempt applies only to the smaller group that failed before it.
A retry is justified when the added probability of success is worth its model, tool, time, and review cost. If failures repeat for the same reason, another identical attempt may add cost without adding meaningful success. Route known failure classes to a different prompt, model, tool, or human instead.
Five inputs to measure in production
1. Attempt cost
Include every model, retrieval, search, database, browser, tool, and infrastructure charge triggered by one attempt. Use trace-level cost when possible.
2. Success per attempt
Measure against a task-specific acceptance test. Do not substitute benchmark accuracy or the percentage of runs that returned an answer.
3. Retry limit
Use the actual policy. Unlimited retries hide both cost and failure. Record how often tasks stop at each attempt.
4. Review minutes
Measure checking, correction, approval, and escalation. Use loaded hourly cost, not salary alone.
5. Final failure rate
Track tasks that never succeed inside the limit. They still consume spend and usually return to the manual queue.
When to optimize the model and when to optimize review
Compare model spend with review spend. If review represents most of direct cost, improve validation, reviewer interfaces, confidence routing, and exception handling before negotiating token prices. If expected attempts are high, classify failures and repair the workflow before adding volume. If eventual success remains below the operational threshold, the task is not ready to scale.
Use cost per successful task beside latency per successful task and the final failure rate. A cheap outcome that arrives too late, or leaves too many tasks unresolved, can still be the wrong system.
AI cost per successful task FAQ
How do I calculate AI cost per successful task?
Add expected spend across the initial run and allowed retries, add human review cost, then divide by the probability of succeeding before the retry limit.
Do failed attempts count?
Yes. They consume resources even when no usable outcome is produced. Excluding them makes the cost look artificially low.
Should human review be included?
Yes. Include checking, correction, approval, and escalation at loaded labor cost. In many real workflows, this exceeds model spend.
Are retries always worth it?
No. They are useful only when the extra chance of success is worth the added spend, latency, and operational complexity.
Get the cost behind the next AI claim
ResearchAudio publishes practical, evidence-led AI analysis for engineers and builders.

