Skip to content

Free tool

AI API Cost Calculator

Estimate your monthly API spend across GPT, Claude, and Gemini from your own usage — ranked cheapest-first. Free and instant.

1M tokens ≈ 750,000 words. Tip: a chatbot turn is often ~500–2,000 in / ~200–800 out.

  • GPT-5.4 minicheapest$30.00/mo
  • Claude Haiku 4.5$35.00/mo
  • Gemini 3.5 Flash$60.00/mo
  • Gemini 3.1 Pro$80.00/mo
  • Claude Sonnet 4.6$105/mo
  • Claude Opus 4.8$175/mo
  • GPT-5.6 Sol$200/mo

Cheaper still: run a capable model locally for $0/token.

Approximate public list prices ($/1M tokens). Directional only — confirm current pricing with each provider.

Reference prices (USD per 1M tokens)

The list rates this calculator runs on. On a 3:1 input:output mix, GPT-5.4 mini is the cheapest of the set at $1.69/1M blended.

ModelInput /1MOutput /1MBlended /1MContext
GPT-5.6 SolOpenAI$5$30$11.251.05M
GPT-5.4 miniOpenAI$0.75$4.50$1.69cheapest400K
Claude Opus 4.8Anthropic$5$25$101M
Claude Sonnet 4.6Anthropic$3$15$61M
Claude Haiku 4.5Anthropic$1$5$2200K
Gemini 3.1 ProGoogle$2$12$4.501M
Gemini 3.5 FlashGoogle$1.50$9$3.381M

Prices as of 20 Jul 2026 · list rates for prompts up to ~200K tokens · from the Frontier Ledger

Frequently asked

How is the AI API cost calculated?

Monthly cost = (requests × avg input tokens ÷ 1M × input price) + (requests × avg output tokens ÷ 1M × output price), summed for each model at its public per-million-token rate.

How many tokens is a typical request?

Roughly: 1M tokens ≈ 750,000 words. A single chatbot turn is often ~500–2,000 input tokens and ~200–800 output tokens, depending on context size.

How can I lower my AI costs?

Route cheap, short tasks to a smaller model (e.g. GPT-5.4 mini, Claude Haiku, Gemini Flash) and reserve the strong model for hard work — or run a capable open model locally for $0 per token.

How to estimate your AI API bill

Your API bill is driven by three things: how many requests you make, how many tokens each request sends and receives, and the per-token price of the model. Get rough numbers for each and the monthly cost follows.

Estimate requests and tokens

Start with requests per month, then the average input and output tokens per request. A short chatbot turn is often 500 to 2,000 input tokens and 200 to 800 output; a document task can be far larger. Rough numbers are fine for planning.

Output usually costs more

Most providers charge more per output token than per input token, often several times more. If your workload generates long replies, the output side can dominate the bill, so it pays to keep responses as short as the task allows.

The cheapest model that works

Price per token varies widely across models. Route simple, high-volume work to a smaller model and reserve the expensive frontier model for the hard tasks. This calculator ranks the models cheapest-first so you can see the gap.

Related reading

Go deeper on how this works and what to pick.

Newsletter

Liked the tool? Get the signal.

One weekly email on the AI + hardware that actually matters — from the people who build these calculators.

Free · unsubscribe anytime · no spam.