A six-step agent does not cost six times one call. If each step sees what came before, step
six pays again for every token steps one through five read and wrote — so cost grows
with the square of the step count, not linearly. Retries and fan-out multiply whatever a step
already costs, and prompt caching only discounts the repeated part. This calculates all of
that, and shows you which single step is actually spending your money.
Presets:
Workflow steps
#
Step
Model
Input tok
Output tok
×
Cost
Per run
—
Per 1,000 runs
—
Projected monthly
—
Tokens / run
—
Per-step breakdown — sorted by cost
#
Step
Model
Own in
Carried in
Out
×
Cost / run
Share
Carried in is the sum of every prior step's input and output tokens. Raw,
un-multiplied: a retry re-sends the context, it doesn't append to it. (Genuine fan-out
arguably does append — a known simplification.)
The × multiplier scales the whole step, input included, since a retry re-sends the
full prompt.
The cache discount applies only to carried tokens — never to a step's own fresh
input. The stable prefix is what caches.
Pricing reference — the exact rates driving the numbers above
USD per 1,000,000 tokens. Verified and maintained by hand, so it
will drift — check the provider before you commit budget to any of it.
Cache writes are not charged. This models steady state against an already-warm
prefix. Anthropic bills a cache write at 1.25× input (5-minute TTL) or 2× (1-hour), so
your real first run of any workflow costs more than shown.
Sonnet 5 is listed at its standard $3 / $15. An introductory $2 / $10 rate
applies through 2026-08-31 — until then this over-estimates Sonnet 5 by roughly a third.
Batch APIs are not modelled. All three providers discount asynchronous batch
work by about 50%. If your workflow tolerates latency, halve the input and output rates.
Thinking / reasoning tokens bill as output — fold them into a step's output count.
Long-context surcharges (Gemini Pro above 200K) and cache write tiers are ignored.