The Cost-Ceiling Workbook
Price an AI agent the way your CFO will see it: per attempt, per accepted result, per period, and what it costs when the ceiling stops the work.
Download the workbook (.xlsx) Try the calculator
Free resource. Companion to Agentic system design, Episode 5. Model prices checked 16 September 2026.
The control worked perfectly.
A composite scenario with illustrative numbers. It is not an account of a real airline, a real incident or a real bill.
A storm night, and an airline rebooking agent. Six hours, 38,000 passengers to move, against 2,000 on a normal day. The agent had run for months without anybody thinking hard about what it cost.
Retries rose from 1.3 to 3.1 attempts per passenger. Every single attempt stayed under its $0.40 cap, so no per-attempt control ever fired. 600 attempts were in flight at once against a $26,600 shared ceiling. The price per token did not change that night. Cost per passenger rose 3.5x anyway.
At 01:52 the ceiling tripped. 2,926 rebookings froze in a state no operator queue showed. The control saved $2,219 in tokens. The airline paid $351,120 in hotel vouchers.
A cost ceiling is a business decision wearing an engineering costume.
Four questions, in the order the workbook asks them.
- What does one attempt really cost once context re-sending, caching, reasoning tokens and tools are counted?
- What does a completed case cost, and what does the whole period cost, in a normal and a stressed scenario?
- If several workers share one ceiling, how far can spend overshoot it, and what does a reservation cost in headroom?
- When the ceiling trips, is stopping actually cheaper than continuing?
The same model as the workbook, in the browser.
Every value below is an invented teaching value. Change any of them and every figure recalculates as you type. Nothing is stored and nothing is sent anywhere, so a refresh puts the example back.
Storm night. The normal day is in step 1 and step 2.
1 · What one attempt costs
Normal day 24 hours, ordinary traffic.
Trackers · checked 16 September 2026
Enter your own rates in USD per million tokens. Leave a cache field empty to charge it at the input price.
Storm night: a slow seat-availability API adds turns.
Stable system prompt and tool schemas, sent every turn.
Booking record, disruption notice, policy extract.
Tool results and prior output, re-sent on later turns.
Billed as output. Often the largest hidden line.
Cache expiry during bursty traffic lowers this.
A live rebooking agent cannot wait.
Seat search, fare quote, notification calls.
- Total input tokens
- 76,500
- Cache read
- 32,400
- Cache write
- 3,600
- Uncached input
- 40,500
- Output tokens
- 6,000
- Last turn's input
- 16,500
- Last turn vs first
- 1.8x
- Cache read cost
- $0.0065
- Cache write cost
- $0.0090
- Uncached input cost
- $0.0810
- Output cost
- $0.0600
- Output's share of model cost
- 38.3%
- Reasoning's share of output
- 60.0%
- Model cost
- $0.1565
- Cost per attempt
- $0.1665
Storm night Six hours, the disruption.
Trackers · checked 16 September 2026
Enter your own rates in USD per million tokens. Leave a cache field empty to charge it at the input price.
Storm night: a slow seat-availability API adds turns.
Stable system prompt and tool schemas, sent every turn.
Booking record, disruption notice, policy extract.
Tool results and prior output, re-sent on later turns.
Billed as output. Often the largest hidden line.
Cache expiry during bursty traffic lowers this.
A live rebooking agent cannot wait.
Seat search, fare quote, notification calls.
- Total input tokens
- 114,000
- Cache read
- 43,200
- Cache write
- 4,800
- Uncached input
- 66,000
- Output tokens
- 8,000
- Last turn's input
- 19,500
- Last turn vs first
- 2.2x
- Cache read cost
- $0.0086
- Cache write cost
- $0.0120
- Uncached input cost
- $0.1320
- Output cost
- $0.0800
- Output's share of model cost
- 34.4%
- Reasoning's share of output
- 60.0%
- Model cost
- $0.2326
- Cost per attempt
- $0.2446
2 · What the period costs
Normal day 24 hours, ordinary traffic.
Late tool responses and timeouts drive retries under load.
Use one written acceptance definition for both scenarios.
Allocate shared cost to the period once.
Reporting basis: USD, no conversion. The rate multiplies the total and nothing else.
- Attempts
- 2,600
- Agent cost
- $432.85
- Background jobs
- $12.00
- Human review
- $480.00
- Fixed cost
- $60.00
- Total for the period
- $984.85
- In reporting currency
- $984.85
- Accepted results
- 1,840
- Agent cost per case
- $0.2164
- Fully loaded cost per accepted result
- $0.5352
Storm night Six hours, the disruption.
Late tool responses and timeouts drive retries under load.
Use one written acceptance definition for both scenarios.
Allocate shared cost to the period once.
Reporting basis: USD, no conversion. The rate multiplies the total and nothing else.
- Attempts
- 117,800
- Agent cost
- $28,819
- Background jobs
- $27.00
- Human review
- $22,800
- Fixed cost
- $40.00
- Total for the period
- $51,686
- In reporting currency
- $51,686
- Accepted results
- 30,400
- Agent cost per case
- $0.7584
- Fully loaded cost per accepted result
- $1.70
The storm night costs 3.5x per case what the normal day costs. The price per token never moved.
3 · What a shared ceiling actually holds
This step and the next one run against the storm night. A ceiling that is never approached on a normal day tells you nothing.
One budget, claimed against by every worker at once.
The worst case a single attempt may reach before it is stopped.
Every one of them can read the same balance before any of them writes.
Money already spent that the provider has not reported yet.
- Cases completed before the ceiling trips
- 35,074
- Cases stranded
- 2,926
- Check-then-act overshoot
- $240.00
- That overshoot, as a share of the ceiling
- 0.9%
- Reserve-then-settle overshoot
- $0.0000
- Headroom locked by live claims
- $93.22
- Spend per minute
- $80.05
- Spent but not yet billed
- $4,803
Check-then-act means every worker reads the balance and then writes. Between the read and the write, every other worker sees the same balance, so the ceiling is breached by one full cap for each of them.
Reserve, then settle
- Before an attempt starts, atomically claim its worst-case cost from the shared ceiling. If the claim fails, do not start.
- When the attempt ends, record the actual cost and release the unused part of the claim.
- If a worker dies, expire its claim after a timeout and send the case to review instead of retrying silently.
- Reconcile claims against provider usage on a schedule. The provider bill is the final record.
The overshoot above is zero only when the reservation is atomic and every retry reserves again. A reservation that is not atomic is check-then-act under a better name.
4 · Whether stopping is cheaper than continuing
The voucher, the compensation, the call. Not a token cost.
Some frozen cases resolve themselves. Most, on a storm night, do not.
The rest still incur the business cost, after the human time is spent.
- Token cost the ceiling avoided
- $2,219
- Business cost per dollar avoided
- $158.23
- Break-even business cost per frozen case
- $0.7584
Above this business cost per frozen case, freezing costs more than finishing the case with the agent.
On these numbers the lowest-cost option is A (continue). The ceiling saved $2,219 in tokens and cost $351,120 in vouchers.
A limit nobody wrote down is a limit nobody owns.
Eleven fields per boundary. One row is filled in below as an example; the editable version is the Boundaries tab of the workbook.
| Boundary | Limit | Unit | Enforcement point | Stop behaviour | State preserved | Owner | Cost of stopping per case | Test case | Evidence | Review trigger |
|---|---|---|---|---|---|---|---|---|---|---|
| Aggregate period cost | 26,600 | USD per disruption night | Budget service: atomic reservation before each attempt | Stop new cases; finish in-flight attempts; route new cases to the disruption desk queue | Case id, passenger contact, last confirmed seat hold, attempts so far | Disruption ops lead | $120 | 600 concurrent attempts at 99% of ceiling, with the seat API responding late | Load-test report and reconciliation against provider usage | Volume change over 20%, model or price change, voucher policy change |
Eight boundaries to fill in
- Attempts per case
- Model turns per attempt
- Tool calls per attempt
- Elapsed time per case
- Cost per attempt
- Aggregate period cost
- Concurrent in-flight attempts
- Background job spend
Seven tests before trusting any boundary
- At the limit A case whose next attempt would cross the cap stops cleanly, and its state is visible to an operator.
- Repeated submission An idempotency key prevents a second rebooking or a second charge.
- Concurrency Many workers claim the shared ceiling at once, and total claims never exceed the ceiling.
- Late tool response A seat API answer arriving after a timeout does not create a second seat hold or silently restart the case.
- Worker failure An expired claim is released and the case appears in a review queue.
- Billing reconciliation Local reservations are compared with provider usage after the lag window, and the difference and its investigator are recorded.
- Model swap A cheaper per-token model is compared on cost per accepted result for the same cases, not on rate cards.
Seven tabs, and four colours.
- Start
- Read the legend, set your reporting currency, and pick the model you are pricing.
- Prices
- The price card, with a Custom row for a rate you have been quoted.
- Attempt
- What one attempt costs, broken into cached input, uncached input, output and tools.
- Period
- Two scenarios side by side, from cost per attempt to fully loaded cost per accepted result.
- Ceiling
- How far a shared ceiling overshoots under concurrency, and what a reservation locks up.
- Stopping
- The three options when the ceiling trips, priced against each other.
- Boundaries
- The register: eleven fields per boundary, with one row filled in as an example.
The legend
- Blue text is an input. Change it.
- Yellow fill is a key assumption. Change it, and write down why.
- Green text is linked from another tab. Change it at the source.
- Black is a formula. Leave it alone unless you mean to change the model.
Model choice is usually the largest lever.
| Model | Input | Output | Cache read | Cache write (5 min) | Batch discount | Source | Note |
|---|---|---|---|---|---|---|---|
| Claude Opus 5 | 5 | 25 | 0.5 | 6.25 | 50% | Anthropic pricing via trackers | Cache read 0.1x input; 5-minute write 1.25x |
| Claude Sonnet 5 | 2 | 10 | 0.2 | 2.5 | 50% | Trackers | Most report $2/$10 permanent; one lists $3/$15. Verify. |
| Claude Haiku 4.5 | 1 | 5 | 0.1 | 1.25 | 50% | Trackers | — |
| Claude Fable 5.1 | 10 | 50 | 0.25 | — | 50% | Trackers | Cache read from one tracker only |
| GPT-5.6 Sol | 4 | 20 | — | — | — | Tracker | Enter cache and batch terms from provider |
| Gemini 3.1 Pro | 2 | 12 | — | — | — | Tracker | Enter cache and batch terms from provider |
| Low-cost open model | 0.3 | 1.2 | — | — | — | Tracker (MiniMax M3) | Check data-governance terms |
| Custom | yours | yours | yours | yours | yours | — | User-entered rate |
USD per million tokens. A dash means the term was not published. The calculator charges a blank cache price at the input price and treats a blank batch discount as none, which is the pessimistic reading and the only safe one.
2026 tokenomics
- Output tokens usually cost several times input (5x on current Claude tiers). Reasoning tokens are billed as output even when you never display them.
- An agent re-sends its accumulated context on every turn, so input tokens grow with the square of the turn count.
- Across current models, output prices span roughly $0.50 to $50 per million tokens, so model choice is usually the largest single lever.
- Cache reads on current Claude models cost about a tenth of input price. Batch processing halves eligible cost but only suits work that can wait.
- A cheaper price per token can still cost more per case if the model takes more turns or retries. Compare cost per accepted result, not rate cards.
- Prices moved several times between June and September 2026. Record the checked date and re-run the estimate when a rate changes.
Prices were compiled from public pricing pages and trackers on 16 September 2026. Trackers disagreed on at least one current rate. Verify on the provider’s own pricing page before relying on any figure.
What this does not give you.
- All example values are invented teaching values, not prices, forecasts or observed results.
- This workbook supplies no universally safe budget.
- Money is not the only stopping cost. If a stopped case can cause harm, a regulatory breach or an unsafe action, the ceiling may be right even when it costs more.
Two neighbours
- Cost-ceiling worksheet Cost-ceiling worksheet — One page, one workflow. Decide what it may spend or repeat and who reviews the result, with no arithmetic.
- The Run-Cost Model The Run-Cost Model — Twelve months, four ways to do the same job. The business case around the per-attempt figure this workbook produces.
Build agentic systems that hold up in production
The next Living Craft cohort for senior engineering leaders and architects starts in October 2026.
The 6-week programme covers exactly this material: agents with bounded failure, defensible cost, and the evaluations that show they hold up. 8 seats, for Staff+ engineers, engineering managers and architects who ship to production.
Apply to the cohort All resources
Published 16 September 2026 · free to use, to change and to pass on