AI API Cost Calculator

AI API Cost Calculator

See what a GPT, Claude, Gemini or DeepSeek model costs for your workload, per request, per day and per month. Pick a preset or type your own numbers.

Workload
Start from a preset

The share of each prompt that repeats from request to request, like a system prompt or tool definitions.

Results within about a day instead of seconds, at the provider's published batch discount.

Count the tokens in a prompt

Your text stays in your browser. It is never sent anywhere or added to the share link.

OpenAI approx.
0
Anthropic approx.
0
Google approx.
0
DeepSeek approx.
0

Cheapest model for this workload

— a month

Loading prices

Prices verified on from each provider's official pricing page: OpenAI, Anthropic, Google, DeepSeek.

Every model, cheapest first

Cost of the workload on each model, for a 1,850-token request
Per request Per day
Loading prices…

A month is 30 days. Standard text prices; cached input at each provider's cached price.

Monthly cost by model

How LLM API pricing works

Every provider here bills by the token, a chunk of text that is often a whole short word and sometimes a piece of a long one. Prices are quoted per million tokens, and each request is billed in three parts:

Cost per request = fresh input × input price+ cached input × cached price+ output × output price

Batch processing is the other big lever. OpenAI, Anthropic and Google all take 50% off when you submit requests as a batch and accept results within about a day. DeepSeek publishes no batch price but charges half during its off-peak hours; the table shows its peak price to stay on the safe side.

A worked example

The calculator opens on the chatbot preset: 1,500 input tokens per reply, half of them a cached system prompt, 350 output tokens, and 1,000 replies a day. On Claude Sonnet 5.5, at $2 input, $0.10 cached and $10 output per million tokens:

750 × $2 + 750 × $0.10 + 350 × $10 = $5,075 per million requests= about half a cent a reply, $5 a day, $152 a month

Two things stand out. Output is under a fifth of the tokens but about 70% of the bill. And caching earns its keep: without it, the same traffic costs $195 a month. On GPT-6 Luna or Claude Haiku 5.5 the identical workload is under $8 a month, which is why picking the right model size matters more than any other setting.

How to estimate tokens

The usual rule of thumb for English is that a token is about three quarters of a word, so 100 tokens is roughly 75 words, or about four characters per token. Google's documentation gives the same four-character figure. It drifts in predictable ways:

Paste a real prompt into the box above to see this for your own text. The OpenAI figure is counted in your browser with the o200k_base tokenizer; the others are labeled approx. because they come from each provider's published ratio.

6 ways to cut your API bill

  1. Cache the repeated part. Put the fixed system prompt, tool definitions and shared documents at the start of every request so the provider can cache them. Cached tokens cost a tenth or less of fresh ones.
  2. Batch anything that can wait. Nightly classification, report drafts and evaluations rarely need an answer in seconds. Batch halves the price at three of the four providers.
  3. Route by difficulty. Send every request to a small model first and escalate only the hard ones. The cheapest and most expensive models in the table differ by about 80 times for the same tokens.
  4. Shorten the system prompt. Every token in it is paid on every request. Cutting 1,000 tokens from a prompt sent a million times a month removes a billion input tokens.
  5. Limit the output. Set a maximum output length, ask for the format you need instead of an essay, and turn reasoning effort down on simple tasks. Output is the most expensive token you buy.
  6. Retrieve instead of stuffing. Long context windows make it tempting to send whole manuals with each question. Sending only the five most relevant passages usually answers as well for a fraction of the input.

API or a chat subscription?

Consumer plans such as ChatGPT Plus and Claude Pro are flat monthly fees for a person using the provider's own apps, with features like file uploads, memory and voice built in. The API is pay-per-token access for software you build: your product, scripts and automations call the model directly, and you pay only for what runs.

QuestionChat subscriptionAPI
Who uses itYou, in the provider's appYour software and its users
How you payFlat monthly fee with usage limitsPer token, no fixed fee
Best forDaily personal work: writing, research, coding helpProducts, automations and anything that runs without you
Watch out forLimits at busy times; not meant to power a productCosts grow with traffic, so estimate before launch

Plenty of teams use both: subscriptions for the people, the API for the product. Plan prices change often, so check them on the providers' own pages.

What the presets assume

Questions

Why do output tokens cost more than input tokens?

Reading your prompt happens in one parallel pass, but the model writes its answer one token at a time, and each new token needs another pass through the model. That extra compute is why every provider here charges several times more for output than for input.

What are cached input tokens?

When the start of your prompt repeats across requests, such as a long system prompt or tool definitions, the provider can reuse its earlier work and bill those tokens at a much lower cached-input price. Some providers also charge a small premium the first time a prefix is written to the cache; this calculator assumes the cached share is already warm.

Is the token count exact?

The OpenAI count uses the o200k_base tokenizer in your browser, which is exact for GPT-4o through GPT-5 models and close for newer ones. The other providers do not publish browser tokenizers, so their counts are estimates based on each provider's documented characters-per-token ratio and are labeled approx.

Do reasoning or thinking tokens count?

Yes. Models that think before answering bill those hidden reasoning tokens as output tokens, even though you never see them. For a reasoning model, set output tokens per request to the visible answer plus a realistic thinking budget.

How current are these prices?

Every price was read from the provider's official pricing page on the date shown above the table, and each provider name links to that page. Announced price changes are built in and switch over on their effective date. Prices still change without notice, so check the source before you commit a budget.

Does the estimate include free tiers, taxes or volume discounts?

No. It uses standard pay-as-you-go text prices only. Free tiers, enterprise contracts, regional surcharges, taxes, and charges for images, audio, search or other tools are not included.