AI Token Cost Calculator
Estimate AI API token costs for OpenAI, Claude, Gemini, and custom models. Calculate prompt and completion token expenses, compare models, and forecast monthly and yearly costs.
AI Token Cost Calculator
Estimate API costs for OpenAI, Claude, Gemini, and more. Enter token counts and requests to get instant cost breakdowns and monthly forecasts. We do not collect or store what you enter.
Model & Tokens
Context: 128.0K tokens
Supports: 100k, 1.5M, 2B — 100.0K tokens
50.0K tokens
Preset prices are example list prices collected mid-2025. Providers change prices often, so check the provider's pricing page and edit both fields.
Ctrl+Enter to recalculate
Cost Summary
Usage Templates
Cost Breakdown
💡 Token Reference
1M tokens ≈ 750,000 words ≈ 1,500 pages. Output tokens cost more because generation is compute-intensive. Use the model dropdown to auto-fill current pricing. For custom models, edit the $/1M fields directly.
Related tools
Frequently Asked Questions
How accurate are these cost estimates?
The math is exact for the prices you enter. The model presets are example list prices collected in mid-2025 and providers change prices often, so check the provider's pricing page and edit the input and output price. Caching, batch and volume discounts lower real bills.
What is the difference between input and output tokens?
Input tokens (also called prompt tokens) are the tokens you send to the model — your system prompt, conversation history, and user message. Output tokens (completion tokens) are generated by the model in its response. Output tokens typically cost more because generation is computationally intensive.
How do I estimate tokens for my use case?
A quick rule of thumb: 1 token ≈ 4 characters. For English text, divide word count by 0.75. For code, tokens per character are often lower. OpenAI's Tokenizer tool and the Tiktoken library can give exact counts.
Which model is cheapest for a chatbot?
For most chatbot use cases, GPT-4o Mini, Gemini 2.5 Flash, Claude Haiku, or Llama 3.1 8B (via Groq) offer the best price-to-performance ratio. Use the comparison tab to see side-by-side costs for your exact token usage.
Does caching reduce token costs?
Yes. OpenAI's prompt caching and Anthropic's cache-control feature allow repeated prompt prefixes to be cached, reducing input token costs by up to 75–90% for matching cached segments.
Related Tools
AI Prompt Length Calculator
Calculate token length.
Cloud Cost Calculator
Estimate cloud usage cost.
Download Time Calculator
Estimate download time.
Data Transfer Calculator
Calculate transfer time based on speed.
Time Complexity Calculator
Estimate Big-O complexity growth.
Latency Calculator
Estimate network latency.
Bandwidth Calculator
Estimate bandwidth usage.
Model Accuracy Calculator
Compute accuracy from predictions.
Precision Recall Calculator
Calculate precision and recall metrics.
Confusion Matrix Calculator
Generate confusion matrix metrics.
F1 Score Calculator
Calculate the F1 score, precision and recall from a confusion matrix or from precision and recall values.
Dataset Split Calculator
Split datasets into train, validation, and test sets for machine learning.