kernel&chai
Subscribe
← Lab

agent cost calculator · free tool

What does your agent really cost?

Every turn re-sends the whole context. Enter your numbers to see the bill with and without prompt caching.

try:
conversation shape
tokens
tokens
tokens
turns
/ mo
prices · $ per million tokens

Defaults: Claude Sonnet 5.5 (Oct 2026). Cache write assumed at 1.25× input. Check your provider's current pricing.

per month

–

without caching

–

with caching

–

–

cost of one conversation, turn by turn

turn 1turn 20
Input tokens sent–
…of which cache reads–
Cost without caching–
Cost with caching–

Your real numbers will differ.

Cache misses, model choice and prompt structure decide what you actually pay. The write-up walks through the formula and what breaks the warm-cache assumption.

Read: the prompt-caching math →
How this is calculated

Turn t sends the stable prefix, every earlier turn (input + output), and the new input. Without caching, all of it is billed at the input price.

With caching, everything sent in the previous request is a cache read; only the tokens added since then are written to cache. The first turn writes the whole prefix.

It assumes the cache stays warm between turns. Long pauses can expire the cache and turn reads back into writes, so treat this as a best case.

the newsletter

One explainer a week.

The week's video, written out properly, with sources. Nothing else. Unsubscribe in one click.

Watch on YouTube ↗