AI Token Cost Calculator
Enter your expected token usage and instantly see costs across all major AI providers. Last updated:
How do I calculate AI API costs? Multiply your input tokens by the provider's input rate and your output tokens by the output rate, then divide by 1 million. For example, 500,000 input + 100,000 output on GPT-5.4 ($2.50/$15.00 per 1M) = $1.25 + $1.50 = $2.75 per request cycle. This calculator runs that math across all 55 tracked models so you can spot the cheapest option in one glance.
| Provider | Model | Input Cost ↕ | Output Cost ↕ | Total ↑ |
|---|---|---|---|---|
| Mistral | Ministral 3B | $0.0002 | $0.00004 | $0.00024 |
| cohere | Command R7B | $0.000188 | $0.00015 | $0.000338 |
| cohere | Embed v3 English | $0.0005 | $0.00 | $0.0005 |
| cohere | Embed v3 Multilingual | $0.0005 | $0.00 | $0.0005 |
| Mistral | Ministral 8B | $0.0005 | $0.0001 | $0.0006 |
| Mistral | Mistral Small | $0.0005 | $0.0003 | $0.0008 |
| OpenAI | GPT-4.1 nano | $0.0005 | $0.0004 | $0.0009 |
| Meta | Llama 4 Scout | $0.00075 | $0.00015 | $0.0009 |
| Meta | Llama 4 Maverick | $0.001 | $0.0002 | $0.0012 |
| perplexity | Sonar Small Online | $0.001 | $0.0002 | $0.0012 |
| cohere | Command R 08-2024 | $0.00075 | $0.0006 | $0.00135 |
| OpenAI | GPT-4o mini | $0.00075 | $0.0006 | $0.00135 |
| xAI | Grok 4.1 Fast | $0.001 | $0.0005 | $0.0015 |
| DeepSeek | DeepSeek V3.2 (Chat) | $0.0014 | $0.00042 | $0.00182 |
| DeepSeek | DeepSeek V3.2 (Reasoner) | $0.0014 | $0.00042 | $0.00182 |
| OpenAI | GPT-5.4 nano | $0.001 | $0.00125 | $0.00225 |
| Mistral | Codestral | $0.0015 | $0.0009 | $0.0024 |
Gemini 3.1 Flash-Lite | $0.00125 | $0.0015 | $0.00275 | |
| OpenAI | GPT-4.1 mini | $0.002 | $0.0016 | $0.0036 |
Gemini 2.5 Flash | $0.0015 | $0.0025 | $0.004 | |
| together | Llama 3.3 70B (Together) | $0.0044 | $0.00088 | $0.00528 |
Gemini 3 Flash | $0.0025 | $0.003 | $0.0055 | |
| perplexity | Sonar Large Online | $0.005 | $0.001 | $0.006 |
| together | Mixtral 8x22B (Together) | $0.006 | $0.0012 | $0.0072 |
| together | Qwen 2.5 72B (Together) | $0.006 | $0.0012 | $0.0072 |
| together | DeepSeek V3 (Together) | $0.00625 | $0.00125 | $0.0075 |
| OpenAI | GPT-5.4 mini | $0.00375 | $0.0045 | $0.00825 |
| OpenAI | o4-mini | $0.0055 | $0.0044 | $0.0099 |
| Anthropic | Claude Haiku 4.5 | $0.005 | $0.005 | $0.01 |
| cohere | Rerank v3 | $0.01 | $0.00 | $0.01 |
| xAI | Grok 4.20 | $0.01 | $0.006 | $0.016 |
| Mistral | Mistral Large | $0.01 | $0.006 | $0.016 |
| Mistral | Mixtral 8x22B | $0.01 | $0.006 | $0.016 |
| Mistral | Pixtral Large | $0.01 | $0.006 | $0.016 |
Gemini 2.5 Pro | $0.00625 | $0.01 | $0.0163 | |
| OpenAI | GPT-4.1 | $0.01 | $0.008 | $0.018 |
| OpenAI | o3 | $0.01 | $0.008 | $0.018 |
| together | Llama 3.1 405B (Together) | $0.0175 | $0.0035 | $0.021 |
| together | DeepSeek R1 (Together) | $0.015 | $0.007 | $0.022 |
Gemini 3 Pro | $0.01 | $0.012 | $0.022 | |
Gemini 3.1 Pro | $0.01 | $0.012 | $0.022 | |
| cohere | Command R+ 08-2024 | $0.0125 | $0.01 | $0.0225 |
| OpenAI | GPT-4o | $0.0125 | $0.01 | $0.0225 |
| together | Mistral Large (Together) | $0.015 | $0.009 | $0.024 |
| OpenAI | GPT-5.4 | $0.0125 | $0.015 | $0.0275 |
| Anthropic | Claude Sonnet 4 | $0.015 | $0.015 | $0.03 |
| Anthropic | Claude Sonnet 4.5 | $0.015 | $0.015 | $0.03 |
| Anthropic | Claude Sonnet 4.6 | $0.015 | $0.015 | $0.03 |
| perplexity | Sonar Pro | $0.015 | $0.015 | $0.03 |
| perplexity | Sonar Huge Online | $0.025 | $0.005 | $0.03 |
| Anthropic | Claude Opus 4.5 | $0.025 | $0.025 | $0.05 |
| Anthropic | Claude Opus 4.6 | $0.025 | $0.025 | $0.05 |
| Anthropic | Claude Opus 4.7 | $0.025 | $0.025 | $0.05 |
| Anthropic | Claude Opus 4 | $0.075 | $0.075 | $0.15 |
| Anthropic | Claude Opus 4.1 | $0.075 | $0.075 | $0.15 |
- Ministral 3BMistralTotal$0.00024Input$0.0002Output$0.00004
- Command R7BcohereTotal$0.000338Input$0.000188Output$0.00015
- Embed v3 EnglishcohereTotal$0.0005Input$0.0005Output$0.00
- Embed v3 MultilingualcohereTotal$0.0005Input$0.0005Output$0.00
- Ministral 8BMistralTotal$0.0006Input$0.0005Output$0.0001
- Mistral SmallMistralTotal$0.0008Input$0.0005Output$0.0003
- GPT-4.1 nanoOpenAITotal$0.0009Input$0.0005Output$0.0004
- Llama 4 ScoutMetaTotal$0.0009Input$0.00075Output$0.00015
- Llama 4 MaverickMetaTotal$0.0012Input$0.001Output$0.0002
- Sonar Small OnlineperplexityTotal$0.0012Input$0.001Output$0.0002
- Command R 08-2024cohereTotal$0.00135Input$0.00075Output$0.0006
- GPT-4o miniOpenAITotal$0.00135Input$0.00075Output$0.0006
- Grok 4.1 FastxAITotal$0.0015Input$0.001Output$0.0005
- DeepSeek V3.2 (Chat)DeepSeekTotal$0.00182Input$0.0014Output$0.00042
- DeepSeek V3.2 (Reasoner)DeepSeekTotal$0.00182Input$0.0014Output$0.00042
- GPT-5.4 nanoOpenAITotal$0.00225Input$0.001Output$0.00125
- CodestralMistralTotal$0.0024Input$0.0015Output$0.0009
- Gemini 3.1 Flash-LiteGoogleTotal$0.00275Input$0.00125Output$0.0015
- GPT-4.1 miniOpenAITotal$0.0036Input$0.002Output$0.0016
- Gemini 2.5 FlashGoogleTotal$0.004Input$0.0015Output$0.0025
- Llama 3.3 70B (Together)togetherTotal$0.00528Input$0.0044Output$0.00088
- Gemini 3 FlashGoogleTotal$0.0055Input$0.0025Output$0.003
- Sonar Large OnlineperplexityTotal$0.006Input$0.005Output$0.001
- Mixtral 8x22B (Together)togetherTotal$0.0072Input$0.006Output$0.0012
- Qwen 2.5 72B (Together)togetherTotal$0.0072Input$0.006Output$0.0012
- DeepSeek V3 (Together)togetherTotal$0.0075Input$0.00625Output$0.00125
- GPT-5.4 miniOpenAITotal$0.00825Input$0.00375Output$0.0045
- o4-miniOpenAITotal$0.0099Input$0.0055Output$0.0044
- Claude Haiku 4.5AnthropicTotal$0.01Input$0.005Output$0.005
- Rerank v3cohereTotal$0.01Input$0.01Output$0.00
- Grok 4.20xAITotal$0.016Input$0.01Output$0.006
- Mistral LargeMistralTotal$0.016Input$0.01Output$0.006
- Mixtral 8x22BMistralTotal$0.016Input$0.01Output$0.006
- Pixtral LargeMistralTotal$0.016Input$0.01Output$0.006
- Gemini 2.5 ProGoogleTotal$0.0163Input$0.00625Output$0.01
- GPT-4.1OpenAITotal$0.018Input$0.01Output$0.008
- o3OpenAITotal$0.018Input$0.01Output$0.008
- Llama 3.1 405B (Together)togetherTotal$0.021Input$0.0175Output$0.0035
- DeepSeek R1 (Together)togetherTotal$0.022Input$0.015Output$0.007
- Gemini 3 ProGoogleTotal$0.022Input$0.01Output$0.012
- Gemini 3.1 ProGoogleTotal$0.022Input$0.01Output$0.012
- Command R+ 08-2024cohereTotal$0.0225Input$0.0125Output$0.01
- GPT-4oOpenAITotal$0.0225Input$0.0125Output$0.01
- Mistral Large (Together)togetherTotal$0.024Input$0.015Output$0.009
- GPT-5.4OpenAITotal$0.0275Input$0.0125Output$0.015
- Claude Sonnet 4AnthropicTotal$0.03Input$0.015Output$0.015
- Claude Sonnet 4.5AnthropicTotal$0.03Input$0.015Output$0.015
- Claude Sonnet 4.6AnthropicTotal$0.03Input$0.015Output$0.015
- Sonar ProperplexityTotal$0.03Input$0.015Output$0.015
- Sonar Huge OnlineperplexityTotal$0.03Input$0.025Output$0.005
- Claude Opus 4.5AnthropicTotal$0.05Input$0.025Output$0.025
- Claude Opus 4.6AnthropicTotal$0.05Input$0.025Output$0.025
- Claude Opus 4.7AnthropicTotal$0.05Input$0.025Output$0.025
- Claude Opus 4AnthropicTotal$0.15Input$0.075Output$0.075
- Claude Opus 4.1AnthropicTotal$0.15Input$0.075Output$0.075
How do I use the AI token cost calculator?
- Enter expected input tokens — roughly 0.75 words or 4 characters per token. A 2,000-word prompt is ~2,700 tokens.
- Enter expected output tokens — model responses are usually 200–2,000 tokens unless you explicitly set
max_tokens. - Set monthly request volume — multiplies the single-request cost to estimate monthly spend.
- Compare rows — the table sorts cheapest-first. Cached-input rates drop many providers by 75–90%.
- Click a model to jump to its provider page for context, FAQ, and rate-limit details.
Methodology
All prices come from the official API pricing pages of each provider, checked daily. The formula for a single request is:
cost = (input_tokens / 1,000,000 * input_rate) + (output_tokens / 1,000,000 * output_rate)
When the cached-input slider is above 0%, the input portion splits into cached and non-cached fractions, each multiplied by the respective rate. Models without a published cached rate use the standard input rate for both.