Claude API cost planning

Claude Token Calculator, Models & API Cost

Estimate Fable 5.1, Opus 5, Sonnet 5, or Haiku 4.5, model your real cache-hit rate plus actual cache-write cost, and layer on the Batch API discount — all in one Claude token calculator.

This tool exists because "tokens" in Claude get used to mean two different things. On the Claude API, a token is a billing unit — input tokens, output tokens, and cache tokens each carry their own rate, and this calculator turns those into a real dollar-per-request and dollar-per-month number for any of the four current Claude models. On Claude.ai's Pro and Max plans, "how many tokens do I have left" instead means a usage allowance that resets on a rolling window, not a per-token API bill. Whichever question brought you here, the sections below cover both: what a Claude token actually is, how Claude API pricing is structured for each model, and how Claude Pro's usage limits work differently from API billing.

Count Tokens Locally

Request cost = cache-miss input + cache-read input + output — plus a cache write if this call creates a new cache entry, and half of all of that on the Batch API. Most calculators quote only the headline input/output rate. This one models the three levers that actually move a Claude bill in production, together in one place.

Estimate a Claude request

Currency

Set your request shape once — all four models update instantly below.

Sonnet 5 is priced at $2 / $10 per million tokens, permanently. Anthropic cancelled the increase to $3 / $15 that was originally planned for 1 Sep 2026 — the introductory rate is now the standard rate, not a temporary window.

Example workloads
65%

How much of your input matches a prefix already sitting in the prompt cache — system prompt, tool schemas, a long document, or earlier turns.

Cache write this request
Batch API
Haiku 4.5
$81.13
$0.001623/req
Sonnet 5
$162.25
$0.003245/req
Opus 5
$405.63
$0.008112/req
Fable 5.1
$774.69
$0.015494/req
How this is calculated (Sonnet 5)
cache_miss = 1500 × 35% = 525 tokens
cache_read = 1500 × 65% = 975 tokens (billed at 0.1x input)
input + cache_read + output = $0.003245 per request
× 50,000 requests/mo = $162.25 per month
Recommendation

At this request shape, Haiku is about 80% cheaper than Opus ($81.13 vs $405.63 per month). Worth paying up for Opus or Fable only where an evaluation shows Haiku or Sonnet genuinely falling short on this task.

Monthly cost across every model

Same request shape as above, sorted cheapest to priciest.

ModelRate (in / out)Per requestPer month
Claude Haiku 4.5$1 / $5$0.001623$81.13
Claude Sonnet 5$2 / $10$0.003245$162.25
Claude Opus 5$5 / $25$0.008112$405.63
Claude Fable 5.1$10 / $50$0.015494$774.69

Covers standard text input, cache reads/writes at the toggles set above, and generated output only — not tool-use system-prompt overhead or images.

What is a token in Claude?

A token is the unit Claude actually reads and writes in — not a word, and not a character. Anthropic's tokenizer breaks text into sub-word pieces, so a single English word can be one token or several depending on how common it is, and the same is true in reverse for punctuation, whitespace, and code syntax. Every Claude model prices its work in these tokens, split into two directions:

Input tokens

Everything sent to Claude on a call — the system prompt, the conversation history, any documents, tool definitions, and the user's message. Input tokens are what a Claude token calculator counts first, because on a long-context workflow they usually dominate the bill.

Output tokens

Everything Claude generates in response, including any extended-thinking reasoning tokens that never reach the visible answer. Output is priced well above input on every Claude tier, so a small number of unusually long responses can dominate a monthly bill even when most requests look cheap.

As a rough rule of thumb, one token is close to four characters or three-quarters of a word in English — but that ratio drifts for other languages, dense code, and structured data, and it changed again with the newer tokenizer that Claude 4.7 and later models — including Sonnet 5 and Fable 5.1 — use, which can produce roughly 30% more tokens for identical text than older Claude models. That's exactly why a hard production limit should be checked against Anthropic's official token-counting endpoint for the specific model in use, rather than assumed from an older model's count or a generic word-count estimate.

Match the model to the job, not the name

Begin with the least expensive model that might plausibly pass your evaluation, and move up only when the result is measurably better for the specific task — not because a newer or larger name feels safer to default to.

Claude Haiku 4.5
Fast, high-volume — routing, extraction, short summaries
Context / output: 200K / 64K
Claude Sonnet 5
Balanced production default for agents, coding, analysis
Context / output: 1M / 128K
Claude Opus 5
Deep reasoning, agentic coding, demanding enterprise work
Context / output: 1M / 128K
Claude Fable 5.1
Anthropic's most capable widely released model
Context / output: 1M / 128K

What goes into a Claude request

A document review request can include a system prompt, the source document, a rubric, prior turns, tool definitions, and a long answer — measure each piece separately before deciding whether the whole document belongs in every call.

Cache-miss input

New content processed at the standard input rate — anything that doesn't match a live cache entry, including the first time any prompt is ever sent.

Example: A document-review agent that pastes a different 40-page report on every call gets no caching benefit at all, no matter how similar the prompts look structurally.

Trap: Assuming a prompt 'looks cacheable' is the same as it actually matching a live entry — a single upstream edit to a shared system prompt invalidates the match for everyone using it.

Cache read

The portion of input matching a previously written cache entry, billed at roughly a tenth of standard input — the single largest lever most teams underuse.

Example: A coding agent with a fixed 8,000-token repository summary can push most of that context into cache-read pricing across a long session.

Trap: Not accounting for the 5-minute default TTL — a cache entry that goes cold between calls has to be rewritten, paying the write premium again.

Cache write

Creating a new cacheable entry costs more than standard input, not less: 1.25x for a 5-minute entry, 2x for a 1-hour entry. It's an upfront cost that only pays off across enough subsequent reads.

Example: Writing a 1-hour cache entry for a 20,000-token system prompt costs double on that first call, but pays back quickly if dozens of requests read it within the hour.

Trap: Treating caching as pure savings and forgetting the write premium exists — a workload with very few repeat reads can end up more expensive with caching turned on.

Generated output

Output is priced well above input on every Claude tier, and thinking-mode reasoning tokens count as output the same as the visible answer.

Example: A 1,200-token document summary on Opus costs more from output alone than the 45,000-token source document would on Haiku.

Trap: Leaving output length uncapped, so a small share of unusually long responses ends up dominating the average monthly bill.

Three practical ways to cut your Claude spend

Route by difficulty

Send routine classification and extraction to Haiku, keep Sonnet as the general default, and reserve Fable or Opus for requests that prove they need it.

Reuse stable context

Prompt caching helps when the same large instructions or documents appear across requests — include the write cost and TTL choice in the business case, not just the read discount.

Batch work that can wait

The Batch API's flat 50% discount can change the economics of evaluations, classification runs, and offline document processing that don't need an immediate response.

Claude Pro tokens vs API tokens — two different systems

"How many tokens do I have left on Claude?" usually means one of two very different questions, and mixing them up leads to the wrong answer either way.

Claude.ai Pro or Max plan

A flat subscription with a usage allowance that resets on a rolling window, not a per-token invoice. Anthropic doesn't publish an exact token count for this allowance because it scales with which model you're chatting with and how long your conversation has grown — a single long chat with a large model consumes the allowance faster than several short ones.

To check how much of your Claude Pro allowance is left, look at the usage indicator inside the Claude.ai app itself — this calculator, and every third-party tool like it, has no visibility into a Claude.ai account's remaining usage. Anthropic's support site is the accurate source for current plan limits.

Claude API (what this page calculates)

Pay-as-you-go billing in USD per million tokens, metered exactly, with no rolling allowance to run out of — a request either fits your account's rate limit or it doesn't, and every token is billed at the published per-model rate.

This is the system the calculator above models: set an input/output shape and monthly request volume, and it prices that exactly against Haiku 4.5, Sonnet 5, Opus 5, and Fable 5.1's current published rates.

If you're building a product or an internal tool on top of Claude, the API and its per-token pricing above is the relevant system. If you're a Claude.ai subscriber wondering why a conversation slowed down or got capped, that's the Pro or Max usage allowance, and the fix is checking the in-app usage indicator or Anthropic's own support documentation rather than a token calculator.

Worked scenario: a support ticket triage system

A support triage system sends a fixed 900-token classification rubric plus a 600-token ticket on every call, generating a 200-token category and summary on Haiku 4.5. The rubric hits the cache about 65% of the time across a shift, with no cache write modeled and no Batch discount, running 80,000 times a month.

input = 1,500 tokens, 65% cache hit
cache-miss = 525 tokens × $1/M = $0.000525
cache-read = 975 tokens × $0.1/M = $0.0000975
output = 200 tokens × $5/M = $0.001
per request ≈ $0.001623 → ≈ $129.80/month at 80,000 requests

Switching this same shape to Sonnet 5 would run roughly $259.60/month — about double Haiku's cost, for a task a fixed-rubric classifier rarely needs the extra capability for. That gap is the entire argument for routing by difficulty rather than defaulting every request to the more capable model.

Common mistakes when estimating Claude cost

  • Assuming Sonnet 5 will jump from $2/$10 to $3/$15 — that planned increase was cancelled, so budgeting for it overstates cost by 50%.
  • Applying the standard 0.1x cache-read discount to Fable 5.1, which actually reads cached tokens at a deeper 0.025x multiplier ($0.25 per million, not $1).
  • Counting only cache-read savings while ignoring that the first write to a new cache entry costs more than standard input, not less.
  • Assuming a 200K-token document that "fits" a model's context window is therefore cheap to send on every single call.
  • Using an older model's token count to size a hard limit for Sonnet 5 or Fable, whose tokenizers can produce meaningfully more tokens for the same text.
  • Defaulting every request to Opus or Fable "to be safe" instead of testing whether Haiku or Sonnet already clears the quality bar.

Other levers worth knowing

Long document review
Separate source text from the answer

Keep the source document separate from the expected answer in your estimate. If the document rarely changes, evaluate prompt caching instead of resending it at the ordinary input rate on every call.

When to use it
Contract review, research synthesis, and any workflow re-reading the same large document repeatedly.
Watch out for
A document that changes even slightly between calls breaks the cache match and returns you to full input pricing.
Coding sessions
Prune before you resend

Repository context, tool results, patches, and conversation history accumulate quickly across a session. Summarizing stale turns and sending only the files the next step genuinely needs keeps input cost from growing unbounded.

When to use it
Any agentic coding workflow running more than a handful of turns per task.
Watch out for
Aggressive summarization can drop context the model actually needed, trading token savings for more retries.
Long-running agents
Budget for the whole loop

An agent that loops through tools can multiply both input context and output far faster than a single chat request — budget for the full loop, not just the opening prompt.

When to use it
Multi-step agents, autonomous research tasks, and anything that calls tools repeatedly before returning a final answer.
Watch out for
A single expensive tool-call loop can dominate a month's spend even if most individual requests look cheap in isolation.
Fast Mode (premium-speed inference)
Pay more for lower latency, same model

Anthropic's Fast Mode offers premium-speed inference on top-tier models at a higher per-token rate than standard throughput — a genuinely different tradeoff from tier or caching choices.

When to use it
Latency-sensitive interactive products where a faster response justifies a higher per-token cost.
Watch out for
Fast Mode pricing is separate from the standard rates modeled on this page — check current Fast Mode rates before committing a latency-sensitive feature to it.

Embed this calculator

Drop the calculator into your own docs or internal wiki with a single iframe. The embedded version keeps a small credit link back to Apex Tech Journal.

<iframe
  src="https://apextechjournal.com/embed/claude-token-calculator?ref=widget"
  width="100%"
  height="440"
  style="border:0;border-radius:12px;"
  loading="lazy"
  title="Claude Token Calculator by Apex Tech Journal"
></iframe>

Claude Token Calculator FAQ

Tokens are the sub-word units Claude's tokenizer breaks text into for both reading input and generating output — not words or characters. Every Claude model prices input tokens, output tokens, and cached tokens separately, which is why a request's true cost depends on its shape (how much is input vs. output) and not just its total length.