Skip to content
LLM Pricing Calc
Pricing last verified

LLM Pricing Calculator for API & AI Agent Costs

Calculate LLM API cost across 35 models from OpenAI, Anthropic Claude, Google Gemini, DeepSeek and xAI, including prompt caching, Batch API discounts, multi-turn agent loops and hidden reasoning tokens.

Workload

Quick presets

1,000 tokens ≈ 750 English words.

Pro / Agent mode

Caching, batch, multi-turn loops, reasoning tokens

Cost comparison

Cheapest / month

$10.65

Claude Haiku 5.5

Most expensive / month

$425.88

Claude Opus 5.5

Tokens / request

1.5K in

400 out (cheapest model)

Estimated cost per model
Remove
Claude Haiku 5.5CheapestAnthropic · $0.10 / $0.50$0.00035$0.35$10.65$127.75
GPT-6 LunaOpenAI · $0.10 / $0.50$0.00035$0.35$10.65$127.75
DeepSeek V4 ProDeepSeek · $1.32 / $3.96$0.00356$3.56$108.42$1,301
Grok 4.7xAI · $2.00 / $6.00$0.0054$5.40$164.27$1,971
Claude Sonnet 5.5Anthropic · $2.00 / $10.00$0.007$7.00$212.94$2,555
GPT-6.2 SolOpenAI · $2.00 / $10.00$0.007$7.00$212.94$2,555
Gemini 4 CarbonGoogle · $2.00 / $10.00$0.007$7.00$212.94$2,555
Claude Opus 5.5Anthropic · $4.00 / $20.00$0.014$14.00$425.88$5,110

Monthly = daily × 30.42. Prices are list prices for the standard context tier. Long-context surcharges, regional pricing and taxes are not included.Official pricing: Anthropic ↗ · OpenAI ↗ · Google ↗ · DeepSeek ↗ · xAI ↗

More AI cost tools

Guide

How LLM token pricing works

Every major LLM API bills by the token, a chunk of text of about four characters or three-quarters of an English word. Prices are quoted per million tokens, and input tokens (your system prompt, conversation history, retrieved documents and tool results) are billed separately from output tokens (the text the model generates). Output is almost always the expensive side: on most current models it costs four to five times more per token than input, because generating tokens one at a time uses far more GPU time than reading a prompt in parallel.

That gives a simple formula for any single request: input tokens × input price ÷ 1M + output tokens × output price ÷ 1M. A chatbot request with 2,000 input tokens and 500 output tokens on Claude Sonnet 5.5 ($2.00 input / $10.00 output per 1M) costs about $0.009. At 10,000 requests a day that is roughly $2,738 a month. The calculator above does exactly this for every model at once, so you can see how the same workload prices out across providers.

Comparing OpenAI, Claude and Gemini API pricing

Headline prices are a starting point, not the answer. Two models with the same per-token price can produce very different bills if one writes longer answers, needs a longer prompt to behave, or spends more hidden reasoning tokens. Mid-tier models like Claude Sonnet 5.5, GPT-6.2 Sol, and Gemini 4 Carbon are priced almost identically today, so a fair LLM cost comparison runs your own token counts through each one. For a quick scan of every input, cached and output rate, use the LLM API price table.

Why multi-turn AI agents cost more than chatbots

LLM APIs are stateless. To continue a conversation, your code re-sends the entire history on every call, and an agent adds tool definitions, tool calls and tool outputs to that history on every step. Input tokens therefore grow with each turn, and total input across a session grows roughly with the square of the number of turns.

Take a coding or research agent that starts with 12,000 tokens of context, adds 2,500 tokens of tool output and 500 tokens of its own output each turn, and runs for 25 turns. A naive estimate says 25 × 12,000 = 0.3M input tokens. The real figure is about 1.2M, 4× higher, because turn 25 re-reads everything the first 24 turns produced. Without caching, that single session costs around $2.52 on Claude Sonnet 5.5. An AI agent cost calculator has to model this context growth, which is what Pro / Agent mode above does. Voice agents follow the same pattern on every spoken turn; the AI voice agent cost calculator models it alongside speech-to-text, text-to-speech and telephony.

How prompt caching and Batch API discounts cut your bill

Prompt caching

Because agents re-send the same prefix over and over, providers let you cache it. Cached input tokens on Claude Sonnet 5.5 cost $0.10 per 1M instead of $2.00, a 95% discount. Anthropic charges a premium to write the cache ($2.50 per 1M); OpenAI and Google cache automatically for prompts above a minimum length. With an 85% cache hit rate, the agent session above drops from $2.52 to about $0.677, a 73% saving. To get high hit rates, keep everything stable (system prompt, tool schemas, reference documents) at the start of the prompt and append new content at the end. A timestamp or user ID near the top of the prompt breaks the cache on every request.

Batch API

If you don't need an answer in real time, the Batch API from OpenAI, Anthropic and Google takes 50% off both input and output tokens in exchange for results within 24 hours. Evals, document classification, data extraction, embeddings backfills and nightly summaries are all good fits. Batch and caching discounts can stack, which is why offline pipelines are often the cheapest LLM workloads to run.

How hidden reasoning tokens are billed

Reasoning models think before they answer. Those thinking tokens are generated like any other output and billed at the output rate, but most APIs never show them to you. A visible 500-token answer that needed 1,000 tokens of reasoning bills as 1,500 output tokens: $0.015 instead of $0.005 on Claude Sonnet 5.5. Reasoning usage varies with task difficulty and with effort settings, so measure it from the usage field of real responses, then set the reasoning multiplier in the calculator to match. Reasoning tokens are not carried into the next turn's context, so they raise output cost without inflating the input side of an agent loop.

Practical tips to reduce monthly LLM API spend

  1. Route by difficulty. Send simple classification, extraction and routing calls to a budget model and reserve flagship models for the hard cases. Many teams cut spend by 60–80% this way.
  2. Cap output length. Output tokens are the expensive side. Set max_tokens, ask for concise formats such as JSON, and avoid making the model repeat its input.
  3. Design prompts for caching. Put stable content first, variable content last, and check the cached-token count in API responses to confirm hits.
  4. Trim agent context. Summarize or drop old tool outputs instead of carrying full file contents and logs through every turn.
  5. Batch anything that can wait. Half price for the same model is the easiest saving available.
  6. Tune reasoning effort. Use low or medium effort, or a non-reasoning model, where deep reasoning doesn't improve results.
  7. Revisit self-hosting at scale. At billions of tokens a month, an open-weight model on a dedicated GPU can be cheaper. Use the API vs self-hosting break-even calculator to find your crossover point, and the LLM VRAM calculator to size the hardware.

Every number in this calculator lives in the page URL, so once you have an estimate you can copy the link and share it with your team or finance lead.

How the math works

For a single request, cost is simply tokens × price. Real workloads are messier, so Pro mode adds four things most calculators leave out:

  • Context growth. On turn k of an agent loop the model re-reads input + k × (context added + output) tokens.
  • Prompt caching. Cache hits bill at the provider's cached rate. Misses bill at the cache-write rate where one exists (Anthropic: 1.25× input).
  • Batch API. 50% off everything, only for providers that offer it.
  • Reasoning tokens. Hidden thinking billed as output, on reasoning models only. It isn't carried forward in context.

Agent session formula

input_tokens  = T·I + (G + O)·T(T−1)/2
output_tokens = T·O·R
cost = (1−h)·input·P_miss + h·input·P_cached
     + output·P_out        (× 0.5 if batch)

T turns · I initial context · G context added per turn · O output per turn · R reasoning multiplier · h cache hit rate

LLM pricing FAQ

How much is 1 million (1M) tokens in an LLM?

One million tokens is about 750,000 English words, and it is the unit every provider quotes prices in. Today 1M tokens costs from $0.10 input / $0.50 output on Claude Haiku 5.5 to $8.00 input / $40.00 output on GPT-6.2 Astra. Mid-tier models such as Claude Sonnet 5.5 sit at $2.00 input / $10.00 output.

How is LLM API cost calculated?

Providers bill input (prompt) tokens and output (completion) tokens separately, each priced per 1 million tokens. Cost per request = input tokens × input price ÷ 1,000,000 + output tokens × output price ÷ 1,000,000. For example, 2,000 input and 500 output tokens on Claude Sonnet 5.5 costs $0.009, so 10,000 requests a day comes to about $2,738 a month.

How do I calculate the price of a token?

Divide the per-million price by 1,000,000. Claude Sonnet 5.5 charges $2.00 per 1M input tokens, so one input token costs $0.000002 and one output token costs $0.00001. Multiply that per-token price by your token count, or let the calculator above do it for every model at once.

How to calculate LLM tokens from words or characters?

For English text, 1 token is about 4 characters or 0.75 words, so tokens ≈ words × 1.33 or characters ÷ 4. A 1,500-word article is roughly 2,000 tokens. Code, non-English languages and numbers usually need more tokens per word, so use the provider's tokenizer or the usage field in API responses for exact counts.

How long is an LLM token?

A token averages about 4 characters of English text, roughly three-quarters of a word. Common words are a single token, while long or rare words are split into several pieces. Spaces and punctuation count too, and each model family uses its own tokenizer, so the same text can produce slightly different counts on different models.

What is the cost of 1,000 AI tokens?

1,000 input tokens cost $0.0001 on Claude Haiku 5.5, $0.002 on Claude Sonnet 5.5 and $0.008 on GPT-6.2 Astra. As output, the same 1,000 tokens cost $0.0005, $0.01 and $0.04 respectively. That is about 750 words, which is why per-request costs are usually fractions of a cent.

How much does 4,000 tokens cost?

4,000 input tokens cost $0.0004 on Claude Haiku 5.5, $0.008 on Claude Sonnet 5.5 and $0.032 on GPT-6.2 Astra. As output, the same 4,000 tokens cost $0.002, $0.04 and $0.16 respectively. 4,000 tokens is about 3,000 words, a typical chatbot prompt with some conversation history.

How much does 100,000 (100K) tokens cost?

100,000 input tokens cost $0.01 on Claude Haiku 5.5, $0.20 on Claude Sonnet 5.5 and $0.80 on GPT-6.2 Astra. As output, the same 100,000 tokens cost $0.05, $1.00 and $4.00 respectively. 100K tokens is about 75,000 words, roughly the length of a full novel.

How much does 300,000 tokens cost?

300,000 input tokens cost $0.03 on Claude Haiku 5.5, $0.60 on Claude Sonnet 5.5 and $2.40 on GPT-6.2 Astra. As output, the same 300,000 tokens cost $0.15, $3.00 and $12.00 respectively. 300K tokens is about 225,000 words, around three novels or a large codebase.

How much does 500,000 tokens cost?

500,000 input tokens cost $0.05 on Claude Haiku 5.5, $1.00 on Claude Sonnet 5.5 and $4.00 on GPT-6.2 Astra. As output, the same 500,000 tokens cost $0.25, $5.00 and $20.00 respectively. 500K tokens is about 375,000 words, a common volume for one long multi-turn agent session.

How many words are 20,000 tokens?

20,000 tokens is about 15,000 English words, or roughly 30 single-spaced pages. Reading that much as input costs $0.002 on Claude Haiku 5.5 and $0.04 on Claude Sonnet 5.5. Code and non-English text produce fewer words per token.

How much text is 1,000,000 tokens?

1,000,000 tokens is about 750,000 words, roughly 1,500 single-spaced pages or ten average-length novels. Many current models, including Claude Sonnet 5.5 and GPT-6.2 Astra, accept around 1M tokens of context in a single request. Sending that much as input costs $2.00 on Claude Sonnet 5.5.

How are OpenAI and ChatGPT API tokens priced?

ChatGPT subscriptions are flat monthly fees, but the OpenAI API bills per token, with separate input and output rates per 1M tokens. Current rates are GPT-6.2 Astra $8.00 input / $40.00 output; GPT-6.2 Sol $2.00 input / $10.00 output; GPT-6 Luna $0.10 input / $0.50 output. Cached input on GPT-6.2 Sol drops to $0.10 per 1M, and the Batch API takes 50% off both sides.

What is the current price of an LLM token across major providers?

As of Nov 21, 2026, per-1M-token list prices for well-known models are: Anthropic $0.10–$8.00 input and $0.50–$40.00 output; OpenAI $0.10–$8.00 input and $0.50–$40.00 output; Google $0.75–$3.00 input and $3.75–$15.00 output; DeepSeek $0.30–$1.32 input and $1.20–$3.96 output; xAI $2.00 input and $6.00 output. The cheapest widely used closed models on a 3:1 input-to-output mix are Claude Haiku 5.5, GPT-6 Luna, DeepSeek V4.1 Flash. Hosted open-weight models such as Llama and Qwen can be cheaper still.

Why are output tokens more expensive than input tokens?

Input tokens are processed in parallel in one pass, but output tokens are generated one at a time, each needing a full pass through the model, so they use far more GPU time. That is why output typically costs about 5× more than input; on Claude Sonnet 5.5 it is $10.00 vs $2.00 per 1M. Capping response length is one of the most effective ways to cut a bill.

How much does prompt caching save on LLM API costs?

Cached input tokens on Claude Sonnet 5.5 cost $0.10 per 1M instead of $2.00, a 95% discount, though Anthropic charges $2.50 per 1M to write the cache. In a 25-turn agent session with an 85% cache hit rate, cost drops from $2.52 to $0.677, a 73% saving. Keep stable content such as system prompts and tool schemas at the start of the prompt to maximize hits.

How are hidden reasoning or thinking tokens billed?

Reasoning models generate thinking tokens before the visible answer and bill them at the output rate, even though most APIs do not return them. A 500-token answer that needed 1,000 tokens of reasoning bills as 1,500 output tokens: $0.015 instead of $0.005 on Claude Sonnet 5.5. Set the reasoning multiplier in the calculator to match what the usage field of real responses shows.

Why do multi-turn AI agents cost more than basic chatbots?

LLM APIs are stateless, so an agent re-sends its whole conversation, tool definitions and tool results on every turn. A 25-turn session that starts with 12K tokens of context and grows by 3K per turn reads about 1.2M input tokens, not 0.3M. Without caching that costs about $2.52 on Claude Sonnet 5.5; turn on Pro / Agent mode above to model it.

What is the Batch API discount?

OpenAI, Anthropic and Google offer an asynchronous Batch API that returns results within 24 hours at 50% off both input and output tokens. It suits evals, classification, embeddings backfills and nightly reports. The calculator's batch toggle applies the discount only to models whose provider offers it.

How accurate are these LLM prices?

Prices come from each provider's official pricing page and were last verified on Nov 21, 2026. Every input is saved in the page URL, so you can share an exact estimate with your team. Always confirm on the provider's site before committing to a budget, because prices change often.