OpenAI and Claude API Cost Calculator: Include Prompt Caching
Estimating an AI feature from input and output tokens alone is no longer enough. Current OpenAI and Claude API pricing separates regular input, cache writes, cache reads, and output. Each category has a different rate, so the shape of your traffic can matter as much as the model you choose.
We built a free OpenAI and Claude API token cost calculator that includes all four categories. Choose a model, enter millions of tokens, and the calculator shows the total cost, the cost of each token type, and the percentage of your token volume in each category.
Prices are stored from the providers' official pricing pages and carry a visible verification date. That matters because model names, promotional rates, context tiers, and regional pricing can change.
The Four Token Types In An API Bill
Regular input is prompt content processed normally. It includes user messages, system instructions, retrieved documents, tool definitions, and conversation history that is not read from cache.
Cache writes are reusable prompt prefixes stored for later requests. A write can cost more than regular input, but it may reduce the price of every later request that reuses the same prefix.
Cache reads are tokens retrieved from an existing prompt cache. These are usually much cheaper than regular input. They are where a stable system prompt, tool schema, document set, or long conversation history can create meaningful savings.
Output is the text or reasoning generated by the model. Output is often the most expensive category per token, which is why response length needs its own limit and measurement.
The calculator keeps these categories separate. Combining all input into one number hides whether a workflow is paying for repeated context or benefiting from cache reuse.
How Prompt Caching Changes The Estimate
The current OpenAI pricing table has separate columns for input, cached input, cache writes, and output. Anthropic documents a 5-minute cache write at 1.25 times the base input price, a 1-hour write at 2 times the base input price, and a cache read at 0.1 times the base input price.
This creates a simple design question: how many times will the same prompt prefix be reused before it changes?
A support assistant may reuse its system instructions and tools on every request.
A document assistant may reuse a large policy manual across many questions.
An agent may reuse tool definitions while its working context grows.
A content generator may have little reusable input but a high share of output.
Prompt caching is not automatic savings in every workflow. If the prompt changes on every request, the system may keep paying write or regular input rates without earning enough cache reads. Measure writes and reads separately.
A Worked GPT-5.6 Terra Example
Take this monthly token volume:
5.5 million regular input tokens
0.5 million cache write tokens
3 million cache read tokens
1 million output tokens
Using the standard short-context GPT-5.6 Terra rates verified on 19 August 2026, the calculation is:
Regular input: 5.5 x $2.50 = $13.75
Cache writes: 0.5 x $3.125 = $1.5625
Cache reads: 3 x $0.25 = $0.75
Output: 1 x $15.00 = $15.00
Estimated total: $31.06
The token mix is 55% regular input, 5% cache writes, 30% cache reads, and 10% output. You can reproduce this example in the AI token cost calculator and then replace the values with your own usage.
Token Mixes To Use As Planning Examples
There is no universal percentage split for AI applications. Prompt length, response length, conversation depth, retrieval design, cache lifetime, and user concurrency all change the result. These are illustrative starting points, not industry benchmarks:
Chat and support: 55% regular input, 5% cache writes, 30% cache reads, 10% output.
RAG and document Q&A: 45% regular input, 5% cache writes, 45% cache reads, 5% output.
Agents and coding: 50% regular input, 5% cache writes, 30% cache reads, 15% output.
Content generation: 40% regular input, 5% cache writes, 10% cache reads, 45% output.
Use them to create a first budget before launch. Once the workflow is live, replace them with token usage from API responses and production traces. Track the mix by route, customer, task type, and model rather than relying only on one account-wide total.
What The Calculator Does Not Include
The tool estimates standard first-party text token charges. It does not currently include Anthropic's 1-hour cache writes, batch discounts, long-context tiers, regional processing, tool-call fees, images, audio, fine-tuning, or provider platforms such as Amazon Bedrock.
Those exclusions are visible on the tool because a precise calculator needs a clear boundary. If your workload uses any excluded tier, add it as a separate line in the budget.
Calculate Your Own OpenAI Or Claude API Cost
Open the free OpenAI and Claude API cost calculator, choose a model, and enter your expected monthly tokens. The result updates instantly and can be emailed with the four-part cost breakdown.
For a production estimate, run a representative workload first. Measure actual input, cache writes, cache reads, and output, then model a normal month and a peak month. That produces a budget you can defend rather than a single optimistic number.
Official sources: OpenAI API Pricing · Anthropic Claude API Pricing