LLM API Cost Calculator
Most providers charge separately for input tokens and output tokens, priced per million tokens. Enter the prices from your provider and your typical request size.
The formula
Cost per request = (input tokens x input price + output tokens x output price) / 1,000,000. Multiply by the number of requests for daily and monthly cost.
Where to find prices
Open the pricing page of your provider. Note the unit: most list a price per one million tokens, and some list per thousand. Check whether cached input, batch requests or long-context requests have different prices.
Hidden costs to include
- Chat history. Each turn usually resends earlier messages as input.
- System prompts and tool definitions count as input every time.
- Retries and failed calls.
- Embedding and search calls if you run retrieval.
Frequently asked questions
Why is output more expensive than input?
Providers usually price output tokens higher because generating text takes more compute than reading it.
How do I lower my bill?
Shorten prompts, cap output length, cache repeated input and use a smaller model for easy tasks.
Can I use it for any provider?
Yes. Enter that provider's numbers.
More free tools
Token Counter Estimator
Estimate tokens in any text for GPT-style models.
Context Window Checker
See if your prompt and answer fit a context window.
Chatbot Monthly Cost Calculator
Budget the monthly AI cost of a chatbot or app.
Tokens to Words Converter
Convert tokens to words, pages and characters.
Last updated 2026-11-27. Token counts are estimates. Each model uses its own tokenizer, so exact counts differ. Check your provider for current prices.