Skip to content
Lab Notes/2026-07-21

How Retry Limits Change an Example Token Budget

How much does the maximum iteration setting change the same loop's example monthly cost when every other input stays fixed?

Maintained by TianMingAI · reviewed 2026-07-21

We run the site's deterministic budget formula four times with identical token, price, frequency, and retry assumptions, changing only maximum iterations from one to ten.

Setup

The illustration uses 12,000 input tokens and 2,000 output tokens per iteration, example prices of $3 and $15 per million tokens, one run per day, and a 1.2 retry multiplier.

Method

  1. 1Hold token volume, example prices, runs per day, and retry multiplier constant.
  2. 2Calculate one-, three-, five-, and ten-iteration cases with calculateLoopBudget, the same function used by the public calculator.
  3. 3Compare the resulting per-run, monthly, and worst-case estimates without presenting the example prices as current provider pricing.

Actual artifact

Fixed assumptions: 12,000 input tokens, 2,000 output tokens, $3/M input, $15/M output, 1 run/day, 1.2 retry multiplier. Illustrative prices only. The exercise isolates iteration count while every other assumption stays fixed.
Max iterationsPer iterationPer runMonthly exampleWorst case
1$0.066$0.079$2.376$2.970
3$0.066$0.238$7.128$8.910
5$0.066$0.396$11.88$14.85
10$0.066$0.792$23.76$29.70

Observed result

  • The illustrative monthly estimate rises from $2.376 at one iteration to $23.76 at ten iterations because the formula scales with the allowed work.
  • Iteration caps affect cost predictably here, but they do not guarantee useful progress or correct output.
  • A smaller cap creates an earlier escalation point; it does not replace a checker or a fallback plan.

What this does not prove

  • The prices and token volumes are examples, not a quote or forecast for any provider.
  • Real usage varies with context growth, caching, tool output, provider billing, failed calls, and model choice.

Reproduce it

Open the same site tool