# AI API Cost Calculator: GPT, Claude, Gemini, Grok, DeepSeek

> Free LLM API cost calculator. Enter input and output tokens per call and the number of calls to compare total cost across OpenAI, Anthropic, Google, xAI…

Source: https://gaodong.ai/en/tools/api-cost

---

# AI API cost calculator

The same job can cost dozens of times more on one model than another. Enter your usage and the calculator below prices it at each vendor's **official list price**, cheapest first.

## How to use it

1. **Enter input and output tokens per call.** Not sure? Open "Count tokens from text", paste a typical prompt and count it.
2. **Enter the number of calls**, for example replies per month or documents per batch.
3. **Turn on caching or batch** if your workload can use them. Models without a cache or batch price are priced at the standard rate and flagged.
4. **To rank US-dollar and yuan prices together**, enter your own exchange rate. Without one, the two currencies are ranked separately; we never assume a rate for you.

The page URL keeps your numbers, so "Copy link with these settings" gives you a link to share.

## How costs are calculated

- Cost per call = (uncached input × input price + cached input × cache price + output × output price) ÷ 1,000,000.
- Standard list prices. Tiered models are tiered automatically: Claude Haiku 5.5 by prompt length, MiniMax-M3 by input length, and Gemini 4 Carbon's price rise on December 1, 2026 by today's date.
- DeepSeek has peak and off-peak prices, shown as two rows.
- Web search, code execution, images, audio and taxes are not included.
- Qwen and Zhipu GLM are not included because the official model pages we fetched list no per-token prices.

Prices are checked against the official pages every week. For the full price tables see the [API price comparison](/en/compare/2-models/03-api-price); to choose by quality see the [LLM leaderboard](/en/compare/2-models/04-leaderboard).

## FAQ

### What is a token?

A token is the unit LLM APIs bill by: a word, part of a word, or part of a Chinese character. Vendors use different tokenizers, so the same text gives different counts. The most accurate way is to paste your real text into the counter above. It uses OpenAI's o200k tokenizer, so counts for other vendors will differ somewhat.

### Why are dollar and yuan prices ranked separately?

Overseas vendors price in US dollars and Chinese vendors in yuan, and the exchange rate moves every day. Enter a rate and all models are converted and ranked together.

### How much do caching and batch save?

Cached input is usually much cheaper than regular input, which helps when every call repeats the same long system prompt or document. Batch suits work that can wait: Anthropic states that its Batch API halves both input and output prices, OpenAI's and Google's batch prices are also half the standard price, and Kimi's batch price is 60% of standard.

### How often are prices updated?

Every Monday they are checked against each vendor's official pricing page. The date at the top of the calculator shows how current they are. Always confirm on the official page before you buy.
