What this calculator does
It prices a Claude API workload at Anthropic's current list prices: choose a Claude model, enter tokens per request and requests per month, and get the monthly bill with a breakdown of input, cached input and output. The table under the result runs the same workload on every Claude model in the price list, so you can see what moving between Opus, Sonnet and Haiku would cost.
How Claude pricing works
- Input and output are priced separately per million tokens (MTok); output costs five times the input price on the current models.
- Prompt caching: reading a cached prompt prefix costs a small fraction of the input price. Writing to the cache costs more than normal input — 1.25× for a 5-minute cache and 2× for a 1-hour cache on the current models. This calculator prices cache reads; add writes if your cache is rebuilt often.
- Batch API: 50% off input and output for asynchronous jobs.
- Long prompts on Claude Haiku 5.5: one price up to 100,000 prompt tokens, a higher one above — the calculator picks the tier from your input tokens.
- Tokenizer: Anthropic notes that Claude 4.7 and later models produce about 30% more tokens for the same text than earlier models. Count tokens with the model you plan to use.
- Data residency: requests pinned to US-only inference cost 1.1× on Claude 4.6 and later; the calculator uses the default global price.
The formula
Providers bill input tokens (what you send) and output tokens (what the model writes) at separate rates, quoted per million tokens. Cached input — a prompt prefix the provider has already stored — is billed at a much lower rate. For one request:
$$\text{Cost} = \frac{(1-c)\,T_{in}\,P_{in} + c\,T_{in}\,P_{cache} + T_{out}\,P_{out} }{1\,000\,000}$$where \(T_{in}\) and \(T_{out}\) are input and output tokens per request, \(c\) is the share of input served from the cache, and \(P\) are the prices per 1M tokens. The monthly cost is the cost of one request times the number of requests per month. The Batch API option replaces \(P_{in}\) and \(P_{out}\) with the provider's batch prices.
Worked example
A support bot sends 2,000 input tokens and receives 500 output tokens per request, 10,000 times a month, on a model priced at 2 USD per 1M input tokens and 10 USD per 1M output tokens:
- Input: 2,000 × 2 ÷ 1,000,000 = 0.004 USD
- Output: 500 × 10 ÷ 1,000,000 = 0.005 USD
- Per request: 0.009 USD; per month: 0.009 × 10,000 = 90 USD
Output is only 20% of the tokens but 56% of the bill — trimming long answers usually saves more than trimming prompts. If half of the input were a cached system prompt billed at 0.10 USD per 1M, the input part would fall from 40 USD to 21 USD a month.
Where the prices come from
Prices come from LiteLLM's open model price list (model_prices_and_context_window.json, MIT licence), pinned to a dated commit, and every model is cross-checked by hand against the provider's own pricing page; the check date and links to both are printed under the result. Where the two disagree, the calculator uses the provider's page. Prices LiteLLM does not carry — announced future changes such as Google's new Gemini prices from 1 December 2026, and DeepSeek's off-peak rates — come from the provider's page and switch over automatically on their date. The list is refreshed weekly, and a large price change is held for a human check before it goes live. Prices are list prices for the standard (pay-as-you-go) tier in US dollars, before tax; enterprise discounts, regional-endpoint surcharges and priority tiers are not included. If a price looks different from the provider's page today, use the custom price fields and tell us.
FAQ
- Is the cheapest model the best choice?
- No. Price per token is one factor; quality, speed, context length and how many tokens a model needs for the same task all change the real cost per finished task. Use the comparison to shortlist, then test.
- Why does my invoice differ from the estimate?
- Invoices count every token actually processed: retries, tool definitions, system prompts, reasoning tokens and cache writes. Taxes and regional surcharges also apply. Start from token counts reported in your API responses for the most accurate estimate.
- How do I convert a price per 1K tokens?
- Multiply by 1,000: 0.002 USD per 1K tokens is 2 USD per 1M tokens.
- Is Claude on Amazon Bedrock or Google Cloud priced the same?
- Not necessarily. Partner-operated cloud platforms publish their own prices and regional rules; this calculator uses Anthropic's own API list prices.
- What happened to the Claude 3 models?
- They are no longer in Anthropic's price list. An old link that names a Claude 3 model opens with the current default model instead, and the page says so.