What a Claude Sonnet 5 coding-agent run costs
Short answer: Claude Sonnet 5 costs $2 per million input tokens and $10 per million output tokens. A coding-agent run that uses 120,000 input and 8,000 output tokens costs $0.32 at list price; with a 30% markup you would bill the client $0.416. Cached input is much cheaper ($0.20 per million tokens read), so long sessions cost less than the headline rate suggests.
Claude Sonnet 5 list prices
| Token type | USD per million tokens |
|---|---|
| Input | $2 |
| Output | $10 |
| Cache read (cache hit) | $0.20 |
| Cache write, 5-minute | $2.50 |
| Cache write, 1-hour | $4 |
Model id: claude-sonnet-5. The Batch API is 50% cheaper on input and output ($1 / $5 per million tokens), but interactive coding agents do not run as batches.
Source: Anthropic's pricing page, checked 2026-11-26. Prices change; check the source before you quote a client.
What a run costs: three worked examples
A coding agent does not make one request. It sends the conversation again on every step, so input tokens add up quickly and prompt caching does most of the saving. These are example token counts, not measurements of any particular tool: put your own numbers from your usage report into the formula or the calculator.
| Example run | Tokens | Cost at list price | Billed with 30% markup |
|---|---|---|---|
| Small fix | 30,000 input, 2,000 output | $0.080 | $0.104 |
| Calculator default | 120,000 input, 8,000 output | $0.320 | $0.416 |
| Long session with prompt caching | 50,000 input, 40,000 output, 200,000 cache write, 2,000,000 cache read | $1.400 | $1.820 |
The formula: cost = (input × input price + output × output price + cache writes × cache-write price + cache reads × cache-read price) ÷ 1,000,000. "Calculator default" is the run that eBRBe's AI agent cost & markup calculator opens with.
The same run on other Claude models
| Model | Input / M | Output / M | Cache read / M | 120,000 in + 8,000 out |
|---|---|---|---|---|
| Claude Opus 5.5 | $4 | $20 | $0.20 | $0.640 |
| Claude Sonnet 5.5 | $2 | $10 | $0.10 | $0.320 |
| Claude Haiku 5.5 | $0.10 | $0.50 | $0.01 | $0.016 – $0.080 |
| Claude Opus 5 | $5 | $25 | $0.50 | $0.800 |
| Claude Sonnet 5 | $2 | $10 | $0.20 | $0.320 |
| Claude Haiku 4.5 | $1 | $5 | $0.10 | $0.160 |
All six on one page: Claude model cost per coding-agent run.
What to bill the client
- At cost: the provider's charge, shown as its own "AI usage" line. The most transparent option.
- Cost plus a stated markup: pays for choosing, running and reviewing the agent's work. The examples above use 30%.
- A fixed price per deliverable, or absorbed in the fee: simpler for the client; you carry the risk of a long run.
Agree the rule in the contract before the first invoice. Our guide to billing AI agent costs compares the options, and there are tool-specific guides for Cursor and OpenAI Codex.
Frequently Asked Questions
How much does Claude Sonnet 5 cost per million tokens?
$2 per million input tokens and $10 per million output tokens (Anthropic list prices, checked 2026-11-26).
How is cached input priced on Claude Sonnet 5?
Reading from the prompt cache costs $0.20 per million tokens. Writing to the 5-minute cache costs $2.50 per million tokens, and a 1-hour cache write costs twice the base input price ($4).
How do I work out what one Claude Sonnet 5 agent run cost?
Take the run's token counts from your usage report and multiply each by its price: input, output, cache writes and cache reads, each divided by one million. Add the four numbers.
Can I pass this cost on to a client?
Yes, if the contract says so. Agree whether AI usage is billed at cost, at cost plus a stated markup, at a fixed price or absorbed, and show it as its own invoice line.
Put it on the invoice
eBRBe records what each agent run cost, adds your markup, and puts it on the same client invoice as your hours. Its built-in price table covers the Claude models on this page, so a run logged with its token counts is costed for you. Free for up to 3 people; paid plans from $9 per member a month, with a 14-day trial.
View eBRBe Pricing & Free Plan →