Claude API pricing › Cost of a coding agent

How much does a Claude coding agent cost per task?

Prices in USD per million tokens, checked against the official Claude pricing page on 2026-11-10.

A worked estimate you can check line by line. Change the numbers to your own in the cost calculator.

What we assume

One task is an agent loop of 25 model calls. On an average call the agent re-sends about 30,000 tokens (instructions, tool list, files it has read and earlier steps), adds about 3,000 new tokens of tool results, and writes 1,500 tokens of reasoning, edits or tool calls.

Cost per task

ModelNo cachingWith cachingPer 1,000 tasks, with caching
Claude Fable 5.2$8.10$2.40$2,400
Claude Opus 5.5$4.05$1.27$1,275
Claude Sonnet 5.5$2.02$0.637$638
Claude Haiku 5.5$0.101$0.036$35.63

"With caching" bills the reused prefix at the cache-read price and the new tokens at the 5-minute cache-write price, so the next turn can read them. It leaves out the first cache write of each session, which is small next to the total.

Cost per month

ModelOne developer (100 tasks/month)Team of 20 developers
Fable 5.2$240$4,800
Opus 5.5$127$2,550
Sonnet 5.5$63.75$1,275
Haiku 5.5$3.56$71.25

With caching. API usage only: hosting, database and payment fees come on top.

Where the money goes

  • Agent loops are where caching matters most: almost everything on each call was already sent on the previous call.
  • Cap the number of steps and the dollars per task. A loop that keeps calling tools is the classic surprise bill.
  • Large tool results (whole files, long logs) fill the context fast. Return only what the model needs.

To check what a plan price leaves you after these costs, use the AI SaaS margin calculator. To see how much caching saves on your own prompt sizes, use the prompt caching savings calculator.

Questions

How much does one task cost with the Claude API?

With prompt caching, from about $0.036 on Claude Haiku 5.5 to about $2.40 on Claude Fable 5.2, for a task of 25 calls × (30,000 reused + 3,000 new input tokens, 1,500 output tokens). Without caching it is $0.101 to $8.10.

How much does it cost per month?

One developer (100 tasks/month): about $3.56 on Haiku 5.5 up to $240 on Fable 5.2. Team of 20 developers: about $71.25 on Haiku 5.5 up to $4,800 on Fable 5.2, with caching.

How can I make it cheaper?

Agent loops are where caching matters most: almost everything on each call was already sent on the previous call.

Other workloads: Chatbot · Support bot · Document Q&A (RAG) · Document summarization · Classification & extraction

Run your own numbers. The free Claude API cost calculator works out cost per request, per user and per month, and the Claude Pricing MCP server lets Claude, Cursor or any MCP client answer the same questions inside your editor.

Building a Claude-powered SaaS? Agentwright Starter records token usage per user and turns it into dollars with this same price table.