Skip to content

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.

CalculatorAI API cost calculatorOfficial prices as of 2026-11-23
Examples (our assumptions, not official figures)
Count tokens from text

Paste a typical prompt; tokens are counted with OpenAI’s o200k tokenizer (other vendors’ tokenizers give different counts).

Priced in US dollars

  1. GPT-6 LunaOpenAI$0.450$0.00045 per call
  2. Claude Haiku 5.5Anthropic$0.450$0.00045 per call
  3. Gemini 3.5 Flash-LiteGoogle$1.85$0.00185 per call
  4. Gemini 4 HydrogenGoogle$6.75$0.00675 per call
  5. Grok 4.7xAI$7.00$0.00700 per call
  6. GPT-6.2 SolOpenAI$9.00$0.00900 per call
  7. Claude Sonnet 5.5Anthropic$9.00$0.00900 per call
  8. Gemini 4 CarbonGoogle$9.00$0.00900 per callPrice increase starting 2026-12-01
  9. Gemini 4 NeonGoogle$13.50$0.013 per call
  10. Claude Opus 5.5Anthropic$18.00$0.018 per call
  11. GPT-6.2 AstraOpenAI$36.00$0.036 per call
  12. Claude Fable 5.2Anthropic$36.00$0.036 per call

Priced in Chinese yuan

  1. deepseek-flash (off-peak)DeepSeek¥4.00¥0.00400 per call
  2. MiniMax-M3.1-FlashMiniMax¥4.00¥0.00400 per call
  3. deepseek-flash (peak hours)DeepSeek¥8.00¥0.00800 per call
  4. MiniMax-M3MiniMax¥8.40¥0.00840 per call
  5. deepseek-v4-pro (off-peak)DeepSeek¥15.75¥0.016 per call
  6. deepseek-v4-pro (peak hours)DeepSeek¥31.50¥0.032 per call
  7. Kimi K3.1 ProMoonshot¥60.00¥0.060 per call
  8. Kimi K3Moonshot¥90.00¥0.090 per call

Sources:OpenAI · Anthropic · Google · xAI · DeepSeek · Moonshot · MiniMax

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; to choose by quality see the LLM 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.

Discussion

Sign in with GitHub to comment. When asking for help, include your OS and the exact error message.

Updated:

gaodong.aiAboutPrivacyTermsContact

Created and maintained by Haorui Li, co-author of the KiT candlestick foundation model.

Independent tutorials, not affiliated with any product mentioned. Product names and trademarks belong to their owners. Check official pages for prices and policies.