Agent Cost Compare
LangGraph · graphs, loops & handoffs

LangGraph cost calculator

LangGraph agents loop through nodes, call tools, retry edges, and hand off between sub-agents — each step re-sending a growing state. Model your graph's calls, loops, retries and handoffs to see cost per task, monthly spend, and where tokens leak.

Cost / task
$2.05
Cost / successful task
$2.28
90% success
Monthly spend
$4.1K
2,000 tasks
Monthly waste
$854
21% of spend
Cheaper routing suggestion

Switching from Claude Sonnet 4.6 to DeepSeek-V4 Pro (reasoner) (DeepSeek, same frontier tier) cuts monthly spend by $3.5K 86% — for this workload.

Where each task's cost goes

Productive work: 89%Retries / loops / hallucinations: 11%
Input tokens / task: 619K
Output tokens / task: 11K
Model$/task$/successfulMonthlyvs current
CHEAPEST
Groq · fast
$0.0357$0.0397$71.40
cheapest
OpenAI · fast
$0.036$0.04$71.95
cheapest
Gemini · fast
$0.0671$0.0746$134
1.9×
OpenRouter · mid
$0.0733$0.0815$147
2.1×
DeepSeek · mid
$0.0897$0.0996$179
2.5×
OpenRouter · mid
$0.1486$0.1651$297
4.2×
OpenAI · mid
$0.1799$0.1998$360
5.0×
Gemini · mid
$0.217$0.2412$434
6.1×
Together · mid
$0.2378$0.2642$476
6.7×
DeepSeek · frontier
$0.2783$0.3092$557
7.8×
Groq · mid
$0.4194$0.466$839
11.7×
Anthropic · mid
$0.6832$0.7591$1.4K
19.1×
Together · mid
$0.735$0.8167$1.5K
20.6×
OpenAI · frontier
$0.8993$0.9992$1.8K
25.2×
Gemini · frontier
$0.8993$0.9992$1.8K
25.2×
OpenAI · frontier
$1.37$1.52$2.7K
38.3×
CURRENT
Anthropic · frontier
$2.05$2.28$4.1K
57.4×
Anthropic · frontier
$3.42$3.80$6.8K
95.7×

Per-1M-token list prices; figures are estimates and exclude embeddings, fine-tuning, image/audio, and infrastructure. Rows marked verifystill need a final check against the provider's live pricing. LLM prices change often.

Frequently asked questions

Why do LangGraph agents get expensive?+

Cyclic graphs re-enter nodes and re-send the accumulated state each time. A loop that runs a few extra iterations, or a handoff that copies the full context to a sub-agent, multiplies token usage fast. The calculator's loop, handoff and context inputs make that cost visible.

How do I estimate LangGraph token costs before running?+

Estimate the average number of model calls per task, the tokens each tool node returns into state, and how much context accumulates per turn. Plug those in here; the model is the same accumulate-and-re-send loop LangGraph executes.

Do agent handoffs cost extra tokens?+

Yes. Each handoff re-reads the stable prefix plus the accumulated conversation in the receiving agent's context. Set the handoff count and watch per-task cost climb — it's one of the most underestimated LangGraph line items.

Which model is cheapest for a LangGraph agent?+

It depends on the graph. The comparison table runs your exact graph profile across every provider so you can see, for example, whether routing tool-heavy nodes to DeepSeek-V3 or Gemini Flash beats running everything on a frontier model.

More agent cost calculators