Skip to main content

Agent Session Cost Estimator

Model a full agentic coding session — turns, tool calls and growing context, priced.

100% client-side⛁ prices verified 2026-06-11⌁ zero network calls
25
20k
4k
1.5k
10
70%
$2.45

per session on Claude Sonnet 4.5$745.63/month at 10 sessions/day. Without caching it would be $5.66/session.

Cost per turn — context accumulates

turn 1 · $0.04turn 25 · $0.15
18
models priced, 4 vendors
2026-06-11
prices verified against vendor pages
90d
price staleness tripwire in CI
0
network requests per keystroke

How it works

Single-call calculators miss what makes agentic AI expensive: accumulation. An agent session is a loop, and on every turn the model re-reads everything that came before — the system prompt, your project instructions, every file it opened, every tool result. This estimator models that loop: turn k sends your starting context plus (k−1) × growth tokens, and the chart shows the per-turn cost curving upward.

The consequence is counter-intuitive: doubling session length roughly quadruples session cost, because you pay for the longer tail of heavier turns. A 50-turn session is not twice a 25-turn session — it is closer to four times. This is why one developer leaving an agent looping overnight can blow a week of team budget, and why per-turn context discipline (smaller tool outputs, targeted file reads) is the highest-leverage cost optimization in agentic coding.

The cache slider models prompt caching on the accumulated prefix, which is identical between turns and therefore highly cacheable — at a typical 70% hit rate the economics change by more than half. The estimator also checks your final-turn context against the model's window and warns when a real session would need compaction, with the turn number where it happens.

All math runs in your browser and the formula is exact for the inputs given; reality adds retries, failed calls and compaction overhead on top. Those are measurable, not estimable — FORG instruments your actual sessions and shows the true number per session, per developer, per repository.

Use the share link to capture a scenario before and after a proposed optimization: cut context growth from six thousand to three thousand tokens per turn and watch the monthly delta. Concrete numbers move engineering discussions faster than principles do, and the difference between a tidy session and a sprawling one is usually a four-figure annual sum per developer once you multiply it out across a working month.

Frequently asked questions

Why do later turns in an agent session cost more?

Each turn re-sends the accumulated conversation: every earlier message, tool result and file read travels with every new request. A session that starts at 20k tokens of context can be sending 120k by turn 25 — so turn 25 costs 6× turn 1. Total session cost grows quadratically with turn count.

What are typical values for an agentic coding session?

From observed Claude Code usage: 15-40 turns, 15-30k tokens of starting context (system prompt + project instructions), 2-6k tokens of growth per turn (tool results dominate), and 1-2k output tokens per turn. Heavy refactoring sessions run far hotter than Q&A.

How much does prompt caching change session cost?

Enormously. The accumulated prefix is identical between turns, so providers can serve it from cache at ~10% of the input rate. Real-world hit rates of 60-90% are normal in agentic tools — toggle the slider and watch the monthly number drop by more than half.

What happens when the session hits the context window?

The tool warns you when your final turn would exceed the model's window. In practice, agents must compact (summarize) the conversation — which costs extra calls and loses detail. If you routinely overflow, reduce per-turn growth (smaller tool outputs) or start leaner.

Can I measure my real session costs instead of estimating?

Yes — that is what FORG does. It attributes token spend to every real session, including cache hits, retries and compaction overhead this estimator can only approximate, and alerts you before a runaway session becomes an invoice.

FORG tracks this automatically across every agent session — live cost attribution, budgets, and alerts.

Start tracking with FORG