How to use Claude API cost calculator
- Enter the input and output tokens per request, or estimate input from a sample prompt.
- Enter how many requests you expect per day.
- Optionally enter the share of input served from the prompt cache.
- Compare the cost per request, per day and per 30 days across models, and add another provider's prices to compare.
How AI API costs add up
Claude and other language model APIs charge per token, a piece of text of roughly three to four characters in English, with separate prices for the tokens you send (input) and the tokens the model writes (output). On Claude, output costs about five times as much as input. Input includes everything sent with each request: the system prompt, the conversation so far, retrieved documents and tool definitions, which is why input often dominates the bill for chat and retrieval features even though each answer is short.
Enter typical input and output sizes and a daily request volume, and the calculator shows the cost per request, per day and over 30 days on every current Claude model side by side, so you can see what moving a feature to a smaller model would save.
Prompt caching
When many requests start with the same long prefix, such as a large system prompt or a reference document, prompt caching serves that prefix at a fraction of the normal input price. Enter the share of input you expect to come from the cache and the calculator applies the published cache-read price for each model that has one. It doesn't invent prices for models without one, and says so in the notes column. Writing to the cache costs a little more than normal input the first time, which this estimate leaves out.
Using the numbers
Treat the result as an estimate for planning. Real token counts depend on the model's tokenizer and your prompts, so count tokens on real requests with the API before committing to a budget, and judge cost per completed task rather than per request: a cheaper model that needs more retries isn't cheaper.
Prices are Anthropic's first-party list prices, dated under the table with a link to the official page. To compare another provider, enter its published input and output prices per million tokens. Nothing you enter is sent anywhere.
Questions
- Where do the prices come from?
- From Anthropic's published API list prices, with the date they were last checked shown under the table and a link to the official page. Amazon Bedrock and Google Vertex AI price Claude separately.
- How accurate is the token estimate from a sample?
- It assumes about 4 characters per token, which is close for English. Code and other languages use more tokens per character, and newer Claude models use a different tokenizer, so count tokens with the API for an exact figure.
- Why isn't caching applied to some models?
- The calculator only applies prompt caching where a cache-read price is published for the model, rather than guessing one. For those models the note column says so.