Skip to content
Free tool

AI API Cost Calculator

Enter how many requests you expect and how long they are. The calculator compares the monthly cost across current OpenAI, Anthropic and Google models, using their published per-token prices.

Start from an example

Prompt, instructions and documents: about 1,500 words.

The model's answer: about 225 words.

Instructions or documents repeated across requests.

30,000 requests a month · 69,000,000 tokens

Estimated cost per model, cheapest first
ModelInput / output per 1MPer requestPer month
GPT-6 LunaOpenAI · cheapest for this workload$0.10 / $0.50$0.00026$7.80
Claude Haiku 5.5Anthropic$0.10 / $0.50$0.00026$7.80
Gemini 3.1 Flash-LiteGoogle$0.25 / $1.50$0.00072$21.75
Gemini 3.5 Flash-LiteGoogle$0.30 / $2.50$0.0011$32.40
Gemini 3.8 FlashGoogle$0.75 / $3.75$0.0019$58.50
GPT-6.1 SolOpenAI$2.00 / $10.00$0.0051$153
Claude Sonnet 5.5Anthropic$2.00 / $10.00$0.0051$153
Gemini 3.1 Pro (preview)Google$2.00 / $12.00$0.0058$174
Claude Opus 5.5Anthropic$4.00 / $20.00$0.01$306
Claude Fable 5.1Anthropic$10.00 / $50.00$0.025$758
GPT-6 AstraOpenAI$10.00 / $50.00$0.026$780

* Gemini 3.8 Flash: Google lists double these prices from 1 January 2027.

* Gemini 3.1 Pro (preview): Preview model; context caching also charges for storage time.

Standard prices from the official pricing pages of OpenAI, Anthropic and Google, checked on 12 October 2026. Long prompts switch to the providers' higher long-context rates where they have them. Cache-write charges, priority tiers and tool fees are not included. A month is 30 days.

How AI API pricing works

Providers charge per token, roughly three quarters of an English word, with separate prices for input (your prompt, instructions and any documents) and output (the model's answer). Output usually costs several times more than input, so long answers drive the bill more than long questions.

Ways to cut the bill

Route simple tasks to a smaller model and keep the large one for hard questions. Cache instructions and documents that repeat across requests. Use batch processing for work that can wait a few hours. Cap the length of answers. Together, these often cut a bill by more than half.

Keeping the estimate honest

Prices change, and real usage rarely matches a forecast. Treat the result as an order of magnitude, check the providers' pricing pages before you commit, and measure actual token usage in the first week of production.

Frequently asked

How many tokens is a word?
In English, one token is about three quarters of a word, so 1,000 tokens is roughly 750 words. Many other languages, including Arabic and Urdu, need more tokens for the same text.
Which model is cheapest?
It depends on your mix of input and output, which is why the table sorts the models by your monthly cost. The cheapest model is not always the best value: one that answers correctly the first time can cost less overall than a cheaper one that needs retries.
Are these prices up to date?
They were checked on the date shown under the table, from each provider's official pricing page. Prices change, so confirm on the provider's site before you budget.
What does cached input mean?
When the start of your prompt repeats across requests, such as the same instructions or document, providers can bill those tokens at a lower cached rate. It applies to the repeated part only.

Want the bill lower, not just estimated?

Model routing, caching and batch jobs usually cut an AI bill by half or more. I build AI features with cost controls and per-customer budgets from day one.

More free tools