How the estimate is calculated
input_cost = input_tokens ÷ 1,000,000 × input_price_per_million output_cost = output_tokens ÷ 1,000,000 × output_price_per_million per_request = input_cost + output_cost monthly_cost = per_request × requests_per_day × operating_days
Example
A support chatbot sends 2,000 input tokens and gets 500 output tokens back per request, 1,000 times a day, 30 days a month. At $2 input / $10 output per million tokens:
- input: 2,000 ÷ 1,000,000 × $2 = $0.004
- output: 500 ÷ 1,000,000 × $10 = $0.005
- per request: $0.009 → per day: $9.00 → per month: $270.00
Getting realistic token numbers
- Input tokens include everything you send: system prompt, conversation history, retrieved documents and tool definitions — not just the user’s latest message. In chat apps, history makes input grow with every turn.
- Output tokens include the visible reply and, for reasoning models, any thinking tokens the provider bills as output.
- Measure real traffic with your provider’s usage dashboard and plug those averages in here.
What this calculator leaves out
It only multiplies tokens by base text prices. It does not model cached-input discounts, batch discounts, long-context or regional multipliers, image, audio or video tokens, web-search or tool fees, fine-tuning, minimum spends or taxes. Several presets note where long-context pricing applies. All prices are in US dollars as published by the providers.
Planning to charge customers for an AI-powered service? The profit margin calculator helps you price above your API costs, and the Stripe fee calculator covers payment fees.
Official pricing pages
- Anthropic — Claude API pricing (opens in a new tab) — checked 18 October 2026
- OpenAI — API pricing (opens in a new tab) — checked 18 October 2026
- Google — Gemini API pricing (opens in a new tab) — checked 18 October 2026