What this calculator does
This ai cost calculator is built for the moment you need a defensible number — quoting a client, comparing options, or checking someone else's math — not a generic estimate.
The AI Cost Calculator estimates how much you will spend on large-language-model APIs each month. Pick a model, describe an average request in tokens, and set your monthly request volume — the calculator returns cost per request, monthly and yearly spend, plus a breakdown of input vs output cost.
How to use the AI Cost Calculator
- Pick the model or enter its per-million-token prices.
- Enter average input & output tokens per request and monthly request volume.
- Review the monthly cost, per-request cost and input/output split chart.
The formula
monthly_cost = ((input_tokens × input_price + output_tokens × output_price) ÷ 1,000,000) × requests_per_month
Worked example
GPT-4o-mini at 800 input + 400 output tokens over 10,000 requests: ((800 × $0.15 + 400 × $0.60) ÷ 1,000,000) × 10,000 = $3.60/month.
Common mistakes
- Forgetting that output tokens are usually 2–5× more expensive than input tokens.
- Ignoring system prompts and conversation history — they count as input tokens on every turn.
- Assuming prices are fixed — providers change list prices, and enterprise rates differ.
When to use it
Use before rolling out a chatbot, RAG pipeline or agent to production so you know the unit economics and can compare providers.
Pro tips for the AI Cost Calculator
- Save your favorite scenarios by clicking the star icon — they're stored locally, no account needed.
- For big decisions, run best-case, expected, and worst-case scenarios and compare the breakdowns side by side.
- Copy the result to paste it directly into email, Notion, or a spreadsheet cell.
Frequently asked questions
›How is cost calculated?
Cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000, then multiplied by monthly requests.
›What is a token?
Roughly 4 characters or ¾ of an English word. 1,000 tokens ≈ 750 words.
›Are prices real-time?
No — prices reflect published list rates and can change. Verify with the provider before budgeting.
›Does this include fine-tuning or images?
No. This estimator covers text chat/completion tokens only.
›Which model is cheapest?
Gemini 1.5 Flash and GPT-4o-mini are among the cheapest general-purpose models; open-weights on Groq/Together can be cheaper still for high volume.
›Do I need to include the system prompt?
Yes — add it to your average input tokens. Long system prompts dominate cost for short user messages.
›Where does the formula come from?
The formula shown in the "How it works" section is the same one you'll find in standard developer & utility references — no proprietary tweaks or hidden weightings.
›Can I embed the AI Cost Calculator on my site?
Embedding isn't public yet, but you can link directly to this page — the URL is stable and shareable.
LLM pricing comparison
Prices per 1M tokens, USD| Provider | Model | Input | Output | Context |
|---|---|---|---|---|
| OpenAI | GPT-4o | $2.500 | $10.00 | 128k |
| OpenAI | GPT-4o mini | $0.150 | $0.60 | 128k |
| OpenAI | o1 | $15.000 | $60.00 | 200k |
| Anthropic | Claude 3.5 Sonnet | $3.000 | $15.00 | 200k |
| Anthropic | Claude 3.5 Haiku | $0.800 | $4.00 | 200k |
| Anthropic | Claude 3 Opus | $15.000 | $75.00 | 200k |
| Gemini 1.5 Pro | $1.250 | $5.00 | 2M | |
| Gemini 1.5 Flash | $0.075 | $0.30 | 1M | |
| Meta | Llama 3.1 405B (host) | $2.700 | $2.70 | 128k |
| DeepSeek | DeepSeek V3 | $0.270 | $1.10 | 64k |
Prices reflect public API list rates and may change — check each provider for current pricing before committing to spend.
Embed this calculator
Drop the AI Cost Calculator into your own site or blog post. Free to use — a small “Powered by CalcPilot” link is appreciated.
<iframe src="https://calcpilot.tools/calculators/ai-cost-calculator?embed=1" width="100%" height="720" style="border:1px solid #e5e7eb;border-radius:12px;max-width:720px;" loading="lazy" title="AI Cost Calculator — CalcPilot"></iframe>Related calculators
Hand-picked next steps if you found the AI Cost Calculator useful.