wzlxp.top builder tools

Claude calculator

Keep prompt caching visible, not confusing.

Estimate Claude API cost from usage tokens or planning text. Cache writes and cache reads are separated so repeated prompts do not hide inside one blended number.

Inputs
Numeric workload is saved locally in this browser for easier comparison. Prompt text is not saved.
Result
$360estimated monthly cost
Per request$0.02
Daily$12.00
Annual$4,320
Monthly calls15,000
Input$0.01
Cache write$0.00
Cache read$0.00
Output$0.01
Batch discount$0.00

High confidence: based on Claude usage or token-counting API numbers.

Pricing checked 2026-05-09. Claude Sonnet 4.6: input $3/1M, cache write $3.75/1M or $6/1M, cache read $0.3/1M, output $15/1M tokens.

Cost insight: the largest cost driver is input tokens. Cutting fresh input tokens by 50% would save about $90.00 per month.

Estimated planning result only. Prices can change, and provider bills may include taxes, minimums, feature-specific charges, or usage adjustments. Verify production spend in the official provider dashboard.

How to use

How to use this calculator

  1. Pick the Claude model

    Select the model version that matches your planned Messages API workload.

  2. Separate cache behavior

    Put repeated prompt context into cache writes and cache reads so recurring prompts do not hide inside one input number.

  3. Validate the estimate

    Use the monthly projection for planning, then verify production counts with Anthropic usage data or token counting.

Claude cost guide

Model Claude cost around prompt cache writes and reads.

Claude workloads often depend on long reusable context. Keeping cache writes, cache reads, normal input, and output visible makes the estimate easier to trust.

How the estimate works
Normal input

User messages and uncached context are estimated with the model's input token price.

Cache write and read

Prompt caching can charge differently when context is first written versus when that cached context is reused.

Output and batches

Claude responses use output token pricing. Message Batches are useful for async jobs where lower cost matters more than immediate response time.

Example workloads
Long system prompt

Estimate a reusable instruction block separately from new user messages to see when caching starts paying off.

Document QA

Model a stable policy document or knowledge base context as cached content, then add each user question as normal input.

Batch analysis

Use batch estimates for delayed classification, extraction, or review tasks that can run outside the user request path.

Cost optimization tips
  • Cache long stable context only when it will be reused enough times to justify the write cost.
  • Pick cache lifetime based on real reuse patterns instead of caching every prompt by default.
  • Track cache reads and writes separately in logs so the calculator can match production behavior.
  • Use Anthropic token counting before launch for exact request-shaped estimates.
Common mistakes
  • Treating cache write and cache read tokens as the same cost.
  • Caching content that changes on almost every request.
  • Ignoring output tokens on long analytical answers.
  • Mixing batch and realtime assumptions in one monthly budget.

References

Grounded in Claude token counting and pricing docs.

Anthropic Claude API pricing Claude Token Counting API

The official Token Counting API accepts the same message shape as Claude Messages and returns input token estimates before sending a request. This page does not call that API or collect API keys.

Web search, code execution, and managed-agent session fees are excluded from this first version so the core token and prompt-cache flow stays easy to use.

FAQ

Claude API cost quick answers

What does the Claude API cost calculator include?

It estimates input token cost, prompt cache write cost, cache read cost, output token cost, Message Batches discounts, and projected daily, monthly, and annual spend.

Why are Claude cache writes and cache reads separate?

Claude prompt caching can price cache writes and cache reads differently, so separating them makes repeated prompt costs easier to understand.

Does this calculator call Anthropic or store API keys?

No. It runs in the browser for planning. Use Anthropic usage data or the Token Counting API when you need exact production counts.