AI Prompt Cost Calculator
Calculate the cost of an AI API call based on input/output tokens and model pricing.
Did this tool work for you?
How to use this calculator
AI providers charge separately for input (prompt) tokens and output (completion) tokens, priced per million tokens. Total cost is the sum of both.
- 1
Select the AI model you are using, or choose "Custom pricing" to enter your own rates.
- 2
Enter the number of input (prompt) tokens and output (completion) tokens per call.
- 3
Enter how many API calls you make per day to see daily, monthly, and annual cost projections.
Frequently asked questions
What is the difference between input and output tokens?
Input tokens are the tokens in your prompt (the text you send to the model). Output tokens are the tokens in the model's response. Providers typically charge more for output tokens because generating text is computationally heavier than reading it.
Are the prices shown up to date?
Prices reflect publicly available rates at the time of writing. AI provider pricing changes frequently — always verify the latest rates on the provider's pricing page before making budget decisions.
How can I reduce my AI API costs?
Common strategies include: caching repeated prompts, using smaller/cheaper models for simpler tasks, compressing prompts, batching requests where the provider offers batch discounts, and setting a max_tokens limit on responses.
AI Prompt Cost Calculator — GPT-4, Claude, Gemini API Pricing
Understanding AI API pricing
Most major AI providers — OpenAI, Anthropic, Google — price their APIs per million tokens consumed. Input (prompt) tokens and output (completion) tokens are billed at different rates, with output typically costing 3–5× more. Understanding this structure is the first step to keeping your AI costs under control.
Budgeting for production AI applications
At scale, even small per-call costs accumulate quickly. An app making 5,000 calls per day with GPT-4o at $0.0075 per call spends $37.50 daily — over $13,000 annually. Use this calculator to model costs at different traffic levels and compare models to find the best performance-to-price trade-off for your use case.
Learn more from an authoritative source:
OpenAI Platform DocsWords to Tokens Converter
Convert between words, characters, tokens, and pages for AI models and content planning.
AI API Budget Calculator
Plan your monthly AI API budget based on usage volume, model selection, and request patterns.
Context Window Checker
Check if your text fits within the context window of popular AI models. Paste your prompt and see which models can handle it.
LLM Cost Comparison Calculator
Compare monthly token costs across major LLM models — GPT-4o, Claude, Gemini, and more — for your specific workload.
Embedding Cost Calculator
Calculate monthly and annual costs of generating text embeddings with OpenAI or Cohere models.
Fine-Tuning Cost Calculator
Estimate the training cost and ongoing inference cost of fine-tuning an OpenAI language model.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →