Token cost calculator
Written October 28, 2026 · Edited November 12, 2026
Price one API job from the vendors' published per-token rates. Enter the token counts from an API response, and the tool shows the cost of one job and of the number of jobs you expect to run. This tool runs entirely in your browser.
Token counts come from the API response, not from word counts: word counts understate code and overstate prose. Input tokens are the fresh tokens in the request. Cache-read tokens are the tokens read back from a stored prompt on Claude, or the cached input tokens on OpenAI — they are priced far below fresh input. Output tokens are what the model generated. The cheapest-model playbook covers how to pick the model in the first place.
What is not in the number
- Cache writes. Content stored to cache the first time is charged above the input rate (1.25 times for a 5-minute cache on Claude), and is not priced here. To include it, count first-store tokens as fresh input tokens.
- Haiku prompts over 100,000 tokens use the higher Haiku rates ($0.50 input, $2.50 output per million). The calculator applies those rates when the fresh input and cache-read tokens entered add to more than 100,000. The box covers prompts whose full length passes 100,000 only once cache writes are counted. The prompt length counts all input tokens, including cache reads and writes.
- Batch pricing here is the Claude Batch API discount. OpenAI models do not get a batch discount in this calculator; ticking the box with an OpenAI model selected has no effect. Cache reads in a batch job are charged at half their usual rate too, because the cache-read discount stacks with the batch discount.
- Server-side tool charges, such as web search calls, are billed separately by the vendors and are not in this number.
- Tax, and any regional uplift: the OpenAI page notes a 10% uplift for some regional endpoints.
Related tools
- Agent cost estimator
- Work out what DeepSeek Search and Fetch calls will cost
- Agent brief builder
- Agent readiness checker
Sources
Sources: Anthropic API pricing docs, OpenAI pricing.
Limits: this is an estimate from list prices. Providers state prices are subject to change; check the pricing page before paying. Token counts are estimates until they come from a real API response.