| name | llm-cost-calculator |
| description | Estimate and compare LLM API costs across providers (OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Mistral, Cohere). Includes per-token pricing, batch/caching discounts, workload templates for common scenarios (chatbot, RAG, summarization, code review), and a cross-provider comparison matrix with per-use-case recommendations. Use this skill when the user asks about API token costs, wants to compare model pricing, needs a monthly cost estimate, or asks which model is cheapest for their use case. |
LLM Cost Calculator
A reference skill that gives Claude accurate, up-to-date LLM API pricing data and calculation templates to estimate costs and compare providers instantly.
Pricing data is updated monthly. AI providers change prices frequently. For critical cost decisions, verify against the official pricing page linked at the top of each reference file.
When to use this skill
Trigger on questions like:
- "How much does GPT-5.4 / Claude Sonnet / Gemini cost per token?"
- "Compare costs: Claude vs GPT vs Gemini for my chatbot"
- "What's the cheapest model for RAG / classification / summarization?"
- "Estimate my monthly API cost for N requests/day"
- "How much would it cost to process 10K documents with Claude?"
- "Is the Batch API worth it for my use case?"
- "How does prompt caching affect my costs?"
- "LLM pricing comparison"
- "Which provider has a free tier?"
How to answer
-
Extract parameters from the user's question:
- Provider/model (or "any" if comparing)
- Estimated input tokens per request
- Estimated output tokens per request
- Volume (requests per day/month)
- Latency requirements (real-time vs batch-tolerant)
-
If the user specified a model: Read the matching references/pricing-*.md file and references/calculation-templates.md. Calculate the cost, showing each step.
-
If the user wants a comparison or didn't specify a model: Read references/comparison-matrix.md to find 2-3 options at different price/quality tiers. Then read the relevant pricing files for exact numbers.
-
Always show the math so the user can verify:
Input: 2,000 tokens × 1,000 requests/day = 2M tokens/day
Cost: 2M / 1M × $3.00 = $6.00/day input
Output: 500 tokens × 1,000 = 500K tokens/day
Cost: 0.5M / 1M × $15.00 = $7.50/day output
Total: $13.50/day → $405/month
-
Mention applicable optimizations:
- Prompt caching (if same context is reused)
- Batch API (if latency is flexible)
- Model downsizing (if task is simple)
- Free tier (for low-volume use cases)
-
For workload estimates, use the templates in references/calculation-templates.md as starting points.
-
Always note the "Last verified" date from the pricing file and suggest verifying on the official pricing page for critical decisions.
Files
references/pricing-openai.md — OpenAI models: GPT-5.4, GPT-4.1, o-series, embeddings, audio, images
references/pricing-anthropic.md — Claude models: Opus, Sonnet, Haiku + prompt caching + extended thinking
references/pricing-google.md — Gemini models: Pro, Flash, Flash-Lite + free tier details
references/pricing-others.md — DeepSeek, Mistral, Cohere, xAI (Grok)
references/comparison-matrix.md — Cross-provider comparison by tier and use case
references/calculation-templates.md — Formulas, token estimation rules, workload templates
Related resources