Calc Ai
What will your AI API usage actually cost per month?
Enter your AI usage details to see your estimated monthly API cost, cost per request, and total token spend. Works for GPT-4, Claude, Gemini, and any model with a known token price.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
Think of AI API pricing like a phone call billed by the word — except the meter runs on both ends. You pay once for what you say, and again for what the model says back. That asymmetry is why AI costs catch teams off guard: a short prompt that triggers a long response is far more expensive than it looks.
Providers measure usage in tokens rather than words or characters. A token is roughly four characters of English text — the word 'calculator' is two tokens, while a short sentence of ten words is roughly thirteen. Every request you send bundles your system prompt, conversation history, and current message into the input count. Every word the model generates adds to the output count. The total for each request is then multiplied by the per-token rate and summed across all your daily calls.
The surprising part is how fast daily volume compounds into monthly spend. A cost per request that looks negligible — a fraction of a cent — can reach thousands of dollars monthly when multiplied across hundreds of requests per day and thirty days in a month. This calculator surfaces that compounding so you can see the monthly number before it appears on an invoice.
When To Use This
Right tool, right situation
Use this calculator when you are evaluating whether to integrate an AI model into a product, when you are comparing pricing across providers, or when your API invoices are higher than expected and you want to trace the cause. It is especially useful before scaling up request volume — the difference between 100 and 10,000 requests per day is not obvious until you see the monthly number.
This tool is also well-suited for building business cases. If you need to justify an AI feature to a stakeholder, the monthly cost estimate alongside a markup gives you the input cost and the price-to-customer floor in a single view. It also works for teams setting internal budgets and wanting to know when to trigger a cost review.
This tool is not appropriate for estimating costs when your usage pattern is highly irregular — burst traffic with long idle periods will not average out neatly across 30 days. It also does not account for provider-specific features like caching, batch processing, or free tier credits, which can materially reduce your actual bill. For fine-tuned model hosting or on-premise deployments, the per-token pricing model does not apply at all — those have fixed infrastructure costs that require a different calculation entirely.
Common Mistakes
Why results sometimes look wrong
Forgetting that conversation history multiplies input tokens. In a multi-turn chat application, the full message history is typically resent as context with every API call. A ten-message conversation sends roughly ten times as many input tokens as the first message alone. Teams that estimate cost based on a single-turn test and then deploy a chatbot routinely see costs five to fifteen times higher than projected.
Using list-price tokens without checking your actual logs. Developers often estimate token counts from word count rules of thumb, then find the real numbers are 30% to 60% higher once system prompts, formatting instructions, and JSON wrappers are included. The safest approach is to pull real usage.prompt_tokens and usage.completion_tokens values from a sample of live API responses before committing to an architecture.
Ignoring the output-to-input cost ratio when choosing a model. A model with a lower input price can still be more expensive overall if its output price is significantly higher. Some teams switch to a cheaper-looking model and end up paying more because their use case is output-heavy. Always enter both prices and check the cost-per-request figure, not just the headline token rate.
The Math
Worked examples and deeper derivation
The calculation works in three layers. First, the cost per single request: divide your input token count by 1000 and multiply by the input price, then do the same for output tokens and add them together. For the example values of 850 input tokens at $0.005 per 1000 and 350 output tokens at $0.015 per 1000, the cost per request is $0.009500.
Second, scale to a day: multiply cost per request by the number of requests per day. At 500 requests per day the daily spend is $4.75. Third, scale to a month: multiply daily spend by 30 to get the estimated monthly cost of $142.50. If you add a markup percentage, the engine multiplies the base monthly cost by (1 + markup divided by 100) — a 20% markup on the example produces $171.00.
The monthly token volume is derived by adding input and output tokens per request, multiplying by requests per day, then multiplying by 30. For the example, that gives 18,000,000 tokens. This figure matters because providers often set volume discount tiers in millions of tokens, not in dollars — knowing your token volume tells you whether you qualify.
Expert Unlock
The thing most explanations skip
The per-token pricing model assumes every token is equally expensive to generate, but in practice output token cost varies by context length. Most transformers use a KV cache for the prompt, so incremental tokens are cheaper to generate when the prompt is stable across requests. If your application reuses a long system prompt across thousands of calls, prompt caching — offered by Anthropic and OpenAI — can reduce input costs by 50% to 90% on the cached portion. This calculator does not model caching, so for high-volume stable-prompt applications it systematically overestimates input cost. The output cost estimate remains accurate regardless of caching. At the boundary of context window limits, generation latency — not just cost — often becomes the binding constraint, which this tool does not model.
Why does my AI API bill keep coming in higher than expected?
Need something this doesn't cover?
Suggest a tool — we'll build it →