LLM API Cost Calculator
Estimate LLM API costs based on input tokens, output tokens, requests and monthly usage. Compare the estimated cost of popular AI models and understand how token usage affects your API bill.
LLM API Cost Calculator
Enter your token usage and select an AI model to estimate the cost of an API request and your projected monthly spend.
Tokens sent to the model.
Tokens generated by the model.
$2.00 input / $12.00 output per 1M tokens
Number of API calls using this token volume.
Based on the selected model and token usage
LLM API Cost Comparison
Compare the estimated cost of the same token workload across popular LLM models.
| Model | Input / 1M | Output / 1M | Cost / Request | Monthly |
|---|
Prices are reference API rates in USD per million tokens. Actual billing may vary based on provider, pricing tier, caching, batch processing, long-context pricing, tools, multimodal inputs and other charges.
LLM Monthly Budget Planner
See how many API requests your monthly budget could support with the selected token usage and model.
Budget estimates assume the same input/output token volume for every request.
Understanding LLM API Costs
Input tokens: These are the tokens sent to the model, including your prompt, system instructions and other request content.
Output tokens: These are the tokens generated by the model in response to your request.
Input and output are priced separately: Most commercial LLM APIs publish separate prices for input and output tokens. Output tokens are often more expensive.
Monthly cost: Your monthly bill depends on the number of API requests and the average number of input and output tokens consumed per request.
Production API costs can include additional factors such as cached input tokens, batch pricing, long-context pricing, tool usage, multimodal inputs, search or grounding charges, and provider-specific pricing rules.
LLM API Cost Scenarios
Use common workload patterns to understand how token usage affects API spending.
Suitable for simple prompts, classification and short responses.
Useful for document analysis, assistants and content workflows.
More representative of large-context applications and agents.
Frequently Asked Questions
How is LLM API cost calculated?
LLM API cost is generally calculated by multiplying input and output token usage by their respective prices per million tokens.
Are input and output tokens priced differently?
Yes. Most commercial LLM providers publish separate input and output token prices, and output tokens are often more expensive.
How much does 1 million LLM tokens cost?
There is no single price. The cost depends on the model, provider and whether the tokens are input, output or cached tokens.
How do I calculate my monthly LLM API cost?
Multiply the estimated cost of one request by the expected number of API requests per month. For more accurate planning, estimate input and output tokens separately.
Does this calculator include cached tokens?
The basic calculation uses standard input and output token pricing. Cached-token pricing can differ by provider and should be calculated separately when applicable.
Can I use this calculator for production budgeting?
It is useful for planning and estimates. Before finalizing a production budget, verify the provider's current pricing, usage tier, caching rules, tools and other applicable charges.
Does a cheaper model always mean lower API costs?
Not necessarily. A model that produces better results with fewer retries or shorter prompts can sometimes have a lower effective cost for a complete workflow.