Research-backed calculator guide

Claude API Cost Calculator: Pricing, Prompt Caching and Batch Economics

Calculate Claude API cost per request and month with per-million-token rates, separate cache reads and writes, 5-minute versus 1-hour TTLs, and Batch API economics.

● First-party sources checked▧ Original calculation examples◌ Estimate, not a vendor quote

Quick answer

A defensible Claude API estimate separates five token meters: uncached input, cache reads, 5-minute cache writes, 1-hour cache writes, and output. Multiply each token count by its current price per million tokens, add the lines, and apply a 50% Batch API multiplier only when the workload is eligible for asynchronous processing. Anthropic documents that prompt-caching and batch discounts can stack [1] [3].

As of 2 November 2026, the direct Claude API list rates most useful for a planning estimate include Sonnet 5.5 at $2 input, $2.50 for a 5-minute cache write, $4 for a 1-hour cache write, $0.10 for a cache read, and $10 output per million tokens. Opus 5.5 is $4, $5, $8, $0.20, and $20 respectively. Haiku 5.5 is $0.10, $0.125, $0.20, $0.01, and $0.50 for prompts up to 100,000 tokens; Anthropic publishes a different Haiku rate above that boundary [1].

Use the Claude API cost calculator to replace those dated public rates with your model, usage meters, request volume, cache behavior, and batch assumption.

Claude API cost calculator form with model, token and cache inputs and a monthly cost result
Interactive calculator demonstration. Replace the sample inputs with your own workload before using the result.

What the current results cover—and the useful gap

A dated, English-language, location-limited search snapshot on 2 November 2026 for “Claude API cost calculator” returned a mixed first ten organic results. Six pages were interactive tools or token counters: fixed input/output fields, prompt-paste token counting, monthly presets, or multi-provider comparison tables. Three were long-form pricing or cost guides. Anthropic’s own pricing documentation was the first-party reference page in the set.

Freshness varied. Some pages displayed October 2026 update dates, one guide showed a July 2026 publication with an October update, another still labeled its pricing “2025,” and several tools exposed no clear verification date. Sources ranged from official Anthropic links to self-maintained feeds and provider catalogs. The supportable gap in this sample is narrower than “no one covers Claude pricing”: most pages calculate base input and output from a prompt or preset, but the set rarely makes separate cache-read and cache-write meters, both TTLs, usage-field reconciliation, batch eligibility, and break-even hit-rate math explicit together. This guide focuses on that decision boundary without claiming that any competitor is absent globally.

Claude API pricing per million tokens

Anthropic labels one million tokens as MTok. The basic cost line is:

Token cost = tokens ÷ 1,000,000 × price per MTok

The price card must match the exact model and billing path. Sonnet 5.5, Opus 5.5, and Haiku 5.5 are not interchangeable records, even when they have similar context capabilities. A model’s context window is also not the same thing as a cache threshold or a pricing tier. For example, Anthropic lists Haiku 5.5 separately for prompts up to 100,000 tokens and prompts over 100,000 tokens [1]. Do not apply the short-prompt Haiku rate to a longer request merely because the model can accept it.

For current direct API planning, the five relevant Sonnet 5.5 rates are:

  • Base input: $2/MTok.
  • 5-minute cache write: $2.50/MTok.
  • 1-hour cache write: $4/MTok.
  • Cache read or refresh: $0.10/MTok.
  • Output: $10/MTok.

The same order for Opus 5.5 is $4, $5, $8, $0.20, and $20. For Haiku 5.5 up to 100,000 prompt tokens it is $0.10, $0.125, $0.20, $0.01, and $0.50 [1]. These are public USD list prices checked on the date above, not a quote for a region, contract, cloud marketplace, or negotiated tier.

Anthropic also notes that newer model families can tokenize the same text differently. A comparison based only on a nominal “per token” price can therefore misstate the cost of a real document. Measure representative usage with the selected model’s tokenizer or, better, use the provider usage fields from production [1].

Prompt caching: writes are not reads

Prompt caching stores a reusable prefix. The prefix can include tools, system content, messages, images, documents, tool use, and tool results up to the cache breakpoint [2]. Keep stable instructions and shared reference material before the breakpoint; keep timestamps, user-specific details, and changing retrieval results after it. A changed prefix can create a miss even when the application looks conceptually similar.

The default ephemeral cache lifetime is 5 minutes. Anthropic also supports a 1-hour duration by adding "ttl": "1h" to cache_control; that longer duration costs more to write [2]. A 5-minute entry is refreshed when it is used, so a regularly reused prefix may not require a new paid write each time. The API response separates cache_read_input_tokens, cache_creation_input_tokens, and uncached input_tokens. In the documented accounting, total input is the sum of those three fields [2].

Cache eligibility is model-specific. Anthropic lists different minimum cacheable token counts, including 512 tokens for Sonnet 5.5 and Haiku 5.5, 1,024 for Sonnet 4.6, and 4,096 for Haiku 4.5. A shorter marked prefix is processed without caching rather than becoming a small cache hit [2]. This is why a calculator should expose observed cache meters instead of treating a user-entered “cache percentage” as proof that the API produced hits.

Use this input formula when the usage fields are known:

Input cost = (uncached input × base rate + cache reads × read rate + 5-minute writes × 5-minute rate + 1-hour writes × 1-hour rate) ÷ 1,000,000

Then add output cost. If you only know a theoretical hit rate, label it as a scenario and compare it with a no-cache case. Do not put cache-write tokens into cache reads or subtract them from total input.

Batch economics and break-even hit rate

Anthropic’s Message Batches API offers a 50% discount on usage compared with standard API prices, including input, output, and special tokens. Anthropic says this discount can stack with prompt caching [1] [3]. Batch work is asynchronous: processing can take up to 24 hours, and supported parameters are not identical to a real-time Messages request. For example, the batch documentation excludes stream, speed, fallbacks, and max_tokens: 0, and advises checking supported models and features before submission [3].

For an eligible all-batch workload, the simple planning expression is:

Batch token subtotal = 0.5 × standard token-meter subtotal

That expression assumes every included meter is eligible and does not include separate taxes, credits, regional charges, or non-token services. A batch cache hit is also best-effort because requests can be processed concurrently and in a different order; do not budget on a perfect hit rate just because every request contains the same breakpoint [3].

A useful cache decision is the break-even hit rate. Let B be the base input rate, R the cache-read rate, W the one-time cache-write rate, N the number of requests sharing a prefix, and h the fraction of requests that read it. Ignoring expiry and later refresh writes for this simplified scenario:

No-cache cost = N × B × prefix tokens Cached cost = W × prefix tokens + N × [(h × R) + ((1 − h) × B)] × prefix tokens Break-even h > W ÷ [N × (B − R)]

Rates are per token in that expression; dividing all token totals by one million gives dollars. For Sonnet 5.5 with a 5-minute write, B = $2, R = $0.10, W = $2.50. With one write spread across two requests, the threshold is about 65.8%. With five requests, it falls to about 26.3%. The 1-hour write is more expensive, so it needs more reuse or a longer-lived cadence to win. This is a planning threshold, not a promise: prefix changes, expiry, minimum token rules, and batch ordering can change the observed result.

Run your scenario

Turn this framework into an editable estimate.

Use dated, source-linked assumptions and see cost per request, successful task and month.

Open Claude API Cost Calculator

Worked scenario: a cached monthly Sonnet workload

Assumptions, not a provider quote: 10,000 requests per month; Sonnet 5.5 direct API; 12,000 reusable prefix tokens per request; 1,000 uncached dynamic input tokens per request; 800 output tokens per request; 8,000 requests produce cache reads; 2,000 requests produce 5-minute cache writes; and all requests are eligible for batch processing. Taxes, tools, retries, image tokens, and infrastructure are excluded.

The monthly usage meters are therefore 10M uncached input tokens, 96M cache-read tokens, 24M 5-minute write tokens, and 8M output tokens. The cached standard subtotal is:

  • Uncached input: 10M × $2 = $20.00.
  • Cache reads: 96M × $0.10 = $9.60.
  • 5-minute writes: 24M × $2.50 = $60.00.
  • Output: 8M × $10 = $80.00.
  • Standard cached total: $169.60 per month, or $0.01696 per request.

Without caching, the 120M-token prefix plus 10M dynamic tokens would be 130M input tokens: 130M × $2 = $260, plus $80 output, for $340.00. The assumed cache behavior reduces the standard estimate by $170.40, or 50.1%, before batch processing. Applying the documented 50% batch discount to the eligible token subtotal gives $84.80 per month, or $0.00848 per request. That lower result only makes sense if the workload can tolerate asynchronous completion and the cache behavior is actually observed.

Formula and exclusions

For a monthly estimate, sum the token-meter formula for every model route, then multiply by requests or measured monthly token totals. Keep separate rows for each model when a workflow routes between Haiku, Sonnet, and Opus. Use the AI Token Cost Calculator for a broader token-meter check and Model Pricing Comparison when the same workload must be held constant across model records.

This guide and the calculator estimate the displayed token meters. They do not automatically include web search, tool-provider fees, images, audio, storage, taxes, cloud-marketplace pricing, priority tiers, negotiated discounts, retries, failed work, rate-limit effects, or engineering overhead. A subscription to a Claude consumer or team product is a separate commercial boundary from direct API usage. Reconcile the estimate against Anthropic usage records and your invoice with the same date range and model IDs.

FAQ

Is a cache read the same as uncached input?

No. A cache read is a separately reported meter charged at the cache-read rate. The uncached input_tokens field represents the portion after the last cache breakpoint, not necessarily every token sent in the request [2].

Which is cheaper: the 5-minute or 1-hour cache?

The 5-minute write is cheaper, but it expires sooner. The 1-hour write costs more and is useful when reuse is separated by more than five minutes but still occurs within an hour. Compare the write premium with your measured reuse cadence rather than choosing a TTL from the label alone [1] [2].

What cache hit rate makes prompt caching worthwhile?

There is no universal percentage. Under the simplified one-write model, use h > W ÷ [N × (B − R)]. Add expected refresh writes and expiry misses for a production forecast. A high theoretical reuse rate is not enough if dynamic content changes the cached prefix.

Does Batch API halve cache writes and cache reads too?

Anthropic documents that batch discounts and prompt-caching discounts can stack. For a fully eligible scenario, apply the 50% batch multiplier to the token-meter subtotal after separating base input, reads, writes, and output. Confirm the supported features and actual usage treatment for your endpoint before budgeting [3].

What happens when a Haiku 5.5 prompt exceeds 100,000 tokens?

Anthropic publishes a separate Haiku 5.5 price row for prompts over 100,000 tokens. Select the matching long-prompt record rather than using the up-to-100,000-token rates. Context capacity, cache minimums, and pricing boundaries are related but not interchangeable [1] [2].

Will this estimate match my invoice?

It is a planning estimate, not a provider quote. It matches an invoice only when the model IDs, token meters, processing mode, cloud or region, time period, discounts, taxes, and other billable services match. Replace public list assumptions with your usage export when reconciling.

Primary sources checked

Pricing and product behavior can change. These sources support the time-sensitive claims in this guide; verify current provider terms before committing spend.

  1. Anthropic Claude model pricing
  2. Anthropic prompt caching documentation
  3. Anthropic Message Batches documentation

About the Author

Zunair Ali Syed is a doctoral researcher in Management Sciences at Minhaj University Lahore and a research consultant with experience in academic research and editing since 2011. He runs QuickEduHelp, with professional interests in digital learning, research methods, and evidence-based academic support.