LLM API Cost Calculator: Claude, GPT & Gemini

Supplied Rates · Verification Pending
Your workload

Estimate Your Monthly Cost

Enter the average shape of one API request. The comparison updates automatically as you change the numbers.

Token-cost estimate only. It does not include web search, images, audio, video, priority processing, taxes, negotiated discounts or free tiers.

Live comparison

Your Estimate

Calculating your default example…

How This Estimate Is Calculated

The calculator prices reusable input, fresh input and output separately. When caching is enabled, reusable tokens are split between cache hits and misses. Monthly cost then multiplies the estimated per-request cost by requests per day and days per month. Explicit Gemini cache storage fees are added where applicable. Long-context rates are applied automatically when the supplied prompt crosses the threshold stored for that model.

Start here

What Is LLM API Cost?

LLM API cost is the amount you pay a provider such as OpenAI, Anthropic or Google each time your software sends information to an AI model and receives a response.

Unlike a normal software subscription with one predictable monthly fee, API billing usually depends on usage. The more requests your application makes, the more text you send, and the more text the model generates, the more you are likely to pay.

Most text-model pricing is expressed as a price per one million tokens. Tokens are small pieces of text that models process rather than whole words. Your prompt consumes input tokens, while the model’s response consumes output tokens.

The basic idea API cost = input cost + output cost + optional caching/storage charges

That simple formula becomes more complicated once prompt caching, long-context pricing, Batch APIs and different model tiers are involved. That is why the calculator above asks for the shape of your actual workload instead of comparing only the headline price of each model.

The four big variables

What Actually Determines Your AI API Bill?

Four factors usually have the largest effect on your monthly cost. Changing just one of them can completely change which model looks affordable.

Request volume

A call that costs fractions of a cent can become expensive when it runs hundreds of thousands of times each month.

Input tokens

Long system prompts, retrieved documents and conversation history all increase the amount of text billed as input.

Output tokens

Generated text is often priced more highly than input, making unnecessarily long responses a major cost driver.

Model choice

Lightweight models can cost dramatically less than flagship models, but capability and reliability can differ too.

Can a short prompt still become expensive?

Yes. A small input can still produce a costly request if the model generates a long answer, performs substantial billed reasoning, or the request is repeated at very high volume. Looking only at prompt length can therefore underestimate real spend.

Is the cheapest model automatically the best choice?

No. A cheaper model that produces more errors, requires retries or creates extra manual review can cost the business more overall. Token price should narrow your shortlist, not make the final decision for you.

A useful distinction

Reusable Prompt Tokens vs. New Input Tokens

Not every part of an API request changes every time.

Reusable input

  • System instructions
  • Tool definitions
  • Reference documents
  • Repeated application context
  • Large prompts reused across many calls

Fresh input

  • The user’s latest message
  • New database results
  • Current search results
  • New documents being analyzed
  • Anything that changes with each request
Example A support assistant might resend a 4,000-token system prompt and knowledge block with every request, while the customer’s new question is only 500 tokens. Separating those two parts matters because the 4,000 repeated tokens may be eligible for discounted caching.
Reducing repeated cost

How Does Prompt Caching Affect LLM API Cost?

Prompt caching can reduce the cost of repeatedly sending the same large block of text to a model.

Imagine that your application sends identical instructions, tool definitions and reference material with almost every request. Without caching, that repeated context may be processed and billed at the normal input rate each time.

With caching, supported providers can charge a lower rate when that repeated portion is successfully reused. The exact billing rules differ between providers, which is why the calculator does not apply one universal caching discount.

Caching tends to matter most when the reusable portion of your prompt is large and the same context is requested frequently.
Why hit rate matters

What Does Cache Hit Rate Mean?

Cache hit rate estimates how often your reusable prompt actually benefits from cached pricing.

If you enter a 90% cache hit rate, the calculator assumes roughly nine out of every ten eligible requests successfully reuse the cached portion. The remaining requests are treated as cache misses and billed according to the provider’s relevant miss or normal-input pricing.

A high theoretical cache discount is therefore much less useful if your application rarely achieves a cache hit.

Cheaper when speed is not critical

When Should You Use Batch API Pricing?

Batch APIs are designed for workloads that can be processed asynchronously rather than returning an answer immediately.

Good Batch workloads

  • Document classification
  • Large-scale summarization
  • Data enrichment jobs
  • Evaluation datasets
  • Offline content processing

Usually not ideal for Batch

  • Live customer chat
  • Interactive assistants
  • Real-time coding help
  • User-facing search
  • Anything requiring an immediate answer

Turning on Batch API in the calculator lets you compare the lower asynchronous processing rates supported by each provider.

An easy cost to underestimate

Why Do Output Tokens Matter So Much?

Developers often spend most of their time optimizing prompts, but generated output can be an even bigger part of the bill.

If your application routinely asks for long reports, code, detailed reasoning or multi-section responses, output tokens can accumulate quickly. Reasoning models can also consume billed output or reasoning tokens that are not always obvious from the visible length of the final answer.

One of the easiest ways to reduce unnecessary API spend is to ask for only as much output as the application actually needs.
Price vs. capability

Why Can Similar AI Models Have Very Different Costs?

AI providers usually offer several model tiers because different workloads need different levels of capability.

A lightweight model may be ideal for extraction, categorization, short answers or repetitive structured tasks. More capable models may justify a higher price for complex reasoning, difficult coding, long-context analysis or work where a wrong answer is expensive.

That means the cheapest model in your calculator result should be treated as the lowest-cost candidate, not automatically the winning model.

A simple budgeting example

How Do You Estimate Monthly LLM API Cost?

Suppose your application makes 1,000 requests per day for 30 days.

Each request contains 4,000 reusable prompt tokens, 500 new input tokens and generates 600 output tokens.

30,000

Total requests during the month.

4,000

Reusable tokens in each request.

500

Fresh input tokens per request.

600

Generated output tokens per request.

The calculator applies each model’s input, output, caching, Batch and applicable long-context rules to that same workload, then ranks the resulting monthly estimates.

That makes it much more useful than comparing provider price tables manually, because the same application can produce very different monthly bills depending on the model and pricing features you use.

One limitation to remember

Why Won’t Token Counts Be Identical Across Claude, GPT and Gemini?

Each model family can tokenize the same text differently.

Code, punctuation, languages, formatting and ordinary prose may therefore produce slightly different token counts depending on the provider and tokenizer.

For early planning, using one representative token estimate is usually enough to compare cost ranges. For production budgeting, use actual API usage data or the relevant provider’s tokenizer against your real prompts.

Know what the estimate excludes

What Costs Are Not Included?

The calculator focuses on normal text-model token costs. Your actual AI bill may contain additional charges depending on the provider and product features you use.

Not included

  • Web search or browsing tools
  • Image generation
  • Audio or speech processing
  • Video processing
  • Priority or accelerated inference

Also check separately

  • Regional processing premiums
  • Taxes
  • Negotiated enterprise rates
  • Rate-limit tiers
  • Provider free tiers and credits
Cost is only step one

Which LLM Should You Choose?

Use cost to narrow the field, then test your finalists using the exact task your application needs to perform.

A useful evaluation might run the same 50 to 100 representative prompts through two or three candidate models and compare accuracy, consistency, latency, instruction following and failure rate.

A model that costs twice as much per token may still be the better business choice if it produces far fewer errors. The opposite is also true: there is little reason to pay flagship-model prices for a task a lightweight model already handles reliably.

Use this calculator for the budgeting decision. Use real prompt testing for the model decision.
Methodology

How DDG Calculates the Estimate

The calculator separates reusable input tokens, fresh input tokens and generated output tokens, then applies the selected model’s relevant published rates.

When prompt caching is enabled, reusable tokens are divided between expected cache hits and misses using the hit rate you provide. When supported, Batch pricing and applicable long-context rates are applied automatically. Explicit cache-storage charges are included where relevant.

The results are estimates rather than invoice predictions. Actual cost can differ because of tokenizer differences, hidden reasoning usage, retries, application behavior, cache performance and future pricing changes.

Pricing should always be checked against the providers’ current documentation before committing substantial spend: Anthropic, OpenAI and Google.

Pricing last reviewed: October 19, 2026.

Run the Numbers Before You Pick the Model

Start with the calculator above, shortlist the models that fit your budget, then test those candidates against real prompts from your application.

Back to the calculator ↑