Learn AI compute, then follow the market
← Back to Compute College

Compute College

How to estimate cost per completed AI task

Learn how to estimate the full cost of an AI task, including input tokens, output tokens, retries, tool calls, latency, and model selection.

Plain-English definition

Cost per completed AI task is the total model-serving spend required to finish one useful workflow, including failed attempts and intermediate calls, rather than only the price of the first prompt.

Memory trick: The useful unit is not cost per prompt. It is cost per finished job.

Why it matters

This unit turns provider prices into buyer math. Coding agents, research agents, and verification workflows often invoke a model several times before one result is usable.

  • This unit converts provider token prices into the number a buyer actually plans against.
  • Agentic workflows call a model several times before one result is usable.
  • Pricing only the first prompt understates a real agent bill by a wide margin.

Simple example

An illustrative task uses 20,000 input tokens at $5 per million and 4,000 output tokens at $25 per million: $0.10 plus $0.10, or $0.20 per attempt. If only four of five attempts succeed, expected cost per completed task is $0.20 / 0.80 = $0.25 before tool fees or overhead.

  • Per attempt = input tokens x input rate + output tokens x output rate.
  • Per completed task = per-attempt cost / probability of an acceptable result.
  • Add tool, retrieval, and orchestration fees before treating the figure as all-in.

Example figures are illustrative calculations, not current quoted market prices.

Common mistake

Do not price only the first response when the real workflow routinely includes retries, verification, context refreshes, and tool rounds.

Practical takeaway

What you can do with this

Estimate input cost plus output cost plus tool or orchestration cost for all expected attempts, then divide by the probability of an acceptable completion.

  • Sum input, output, and tool cost across all expected attempts for one workflow.
  • Divide by the probability of an acceptable completion to get the planning unit.
  • Stress-test the figure at a lower completion rate before committing budget.

Decision check: does your estimate include failed attempts, tool calls, and a realistic completion rate — or only the first prompt?

Compute College

Follow model releases as market signals

Follow model releases as AI compute market signals in the ComputeTape Market Brief.

Read the Market Brief

Compute College track

Model Benchmarks & AI Compute Economics

Step 6 of 25: How to estimate cost per completed AI task