How is AI API cost calculated?
Per token, billed separately for input (your prompt, system instructions and any context) and output (the model's reply). Cost per call = input tokens / 1,000,000 x input rate + output tokens / 1,000,000 x output rate. This calculator multiplies that by your calls per month for monthly and yearly figures, using each provider's published per-million-token list price.
Which model is cheapest for my workload?
It depends on your input-to-output ratio. Output tokens cost 2 to 6 times more than input tokens on every listed provider, so a job that writes long replies is priced by the output rate while a summarization job is priced by the input rate. Enter your real token counts and the table ranks every model with a published price, cheapest first, for that exact shape.
Does the calculator include the long-context surcharge?
No. Every OpenAI model now carries a published list price, including GPT-6 Astra, the GPT-5.6 trio, GPT-5.5, GPT-5.4 and their Pro, mini and nano tiers, so all of them are priced here at the standard rate. OpenAI bills requests above 272K input tokens at 2x input and 1.5x output on its 1.05M-context models; if your calls are that long, double the input rate and multiply output by 1.5 before comparing.
How do I convert words to tokens?
One token is about three quarters of an English word on most models, so 1,000 words is roughly 1,333 tokens on OpenAI, Google, xAI and Claude Haiku 4.5. Claude Opus 5, Sonnet 5 and Fable 5.1 use Anthropic's newer tokenizer and take about 1,800 tokens for the same 1,000 words, which matters when you price a workload against them. For a count of a specific text, paste it into the free token counter; its estimate lands within roughly 10 to 15 percent on English prose.
Does the estimate include cached input, batch discounts or long-context surcharges?
No. It uses the standard list price per million tokens. Most providers discount cached or repeated input, some discount batch jobs, and some charge more for prompts above a context threshold. Treat the figures as a list-price ceiling and confirm the current rate card before committing a budget.
Does cost include the ChatGPT, Claude or Gemini subscription?
No. This tool estimates pay-as-you-go API cost, which is separate from a ChatGPT Plus, Claude Pro or Google AI Pro subscription. AI Toolbox is a browser extension that runs on top of the account you already have; it is not an AI subscription and does not sell model access.
Are the prices current?
Each figure carries the date it was verified against the provider's own pricing page; the provenance line under the table states them. Rate changes are noted there too: Claude Sonnet 5's $2 / $10 launch pricing is now its standard price, because Anthropic cancelled the increase it had scheduled for September 1, 2026. Always confirm on openai.com/pricing, platform.claude.com, ai.google.dev/pricing and docs.x.ai/pricing before you commit a budget.
Is this calculator free, and is anything uploaded?
Yes, with no account or sign-up, and nothing leaves your browser: the numbers you type stay on the page. The AI Toolbox extension is also free to install; the context gauge and two saved prompts are on the free plan, and Premium is $9.99/month or $99 once per module.