AI API Cost Calculator
Calculate LLM token expenses across OpenAI, Anthropic, and Google Gemini APIs, separating prompt input tokens, completion output tokens, and context caching discounts.
LLM Inference Tokens & Prompt Caching
Total Monthly AI Inference$86.45 / mo$0.000346 per user request
Prompt Cache Savings$11.25 / mo50% discount on cached system instructions
Total Processed Tokens387.5 MPrompt, generation & RAG embeddings
Step-by-Step Worked Example
Scenario:
Calculation Steps:
Result:
How to Use This Calculator
Assumptions & Limitations
- Output tokens are typically 3x to 5x more expensive than input tokens across frontier models.
- Prompt caching offers up to 50% to 75% savings for repeated long context documents.
Frequently Asked Questions
How many words are in 1,000,000 tokens?
In standard English text, 1 token is approximately 0.75 words, or 4 characters. Therefore, 1,000,000 tokens equals approximately 750,000 words (the length of ~10 average novels).
Related Cost Calculators
Software Development & SaaSInteractive
Cloud Hosting Cost Calculator
Estimate virtual machine cloud compute costs across AWS, GCP, and DigitalOcean with 1-year and 3-year savings commitments.
Software Development & SaaSInteractive
API Usage Cost Calculator
Calculate monthly third-party API request fees, tiered volume pricing per 1k calls, and payload network egress.
Software Development & SaaSInteractive
Serverless Computing Cost Calculator
Calculate AWS Lambda and Cloud Functions compute bills based on monthly invocations, execution duration, and RAM allocation.