Polarison

AI API cost calculator

Describe your workload once and see what it would cost on every model we track, cheapest first. Not sure how many tokens your prompts use? Count them with the token counter.

Estimate your monthly API bill

Standard-tier list prices. Long-context rates apply automatically where the provider publishes a threshold. Excludes cache-write surcharges, taxes, batch and volume discounts.

How the estimate works

For each request, the calculator splits your input tokens into fresh and cached tokens, multiplies each by the model’s rate, then adds output tokens at the output rate:

cost = (fresh input × input rate + cached input × cached rate + output × output rate) ÷ 1,000,000

Monthly cost is that figure times your request count. When a provider publishes a long-context threshold (for example, Gemini 3.1 Pro above 200K prompt tokens), requests above it use the higher rate.

What the estimate leaves out

  • Cache writes. OpenAI and Anthropic charge a premium the first time a prompt prefix is cached. Heavy caching still saves money, but your first requests cost more.
  • Tokenizer differences. The same text can be a different number of tokens on different models. Anthropic says its newer tokenizer produces about 30% more tokens than its previous one.
  • Reasoning tokens. Thinking or reasoning tokens are billed as output. If you enable reasoning, raise your output estimate.
  • Discounts and surcharges. Batch APIs, off-peak hours, priority tiers, data residency uplifts and tool calls such as web search all change the final bill.

New to token pricing? Read how AI API pricing works.