Skip to content
FreeAIDevTools

LLM Cost Calculator

Prices verified

How do you calculate LLM API cost? LLM API cost is input tokens times the input price plus output tokens times the output price, with prices quoted per million tokens. A call with 1,200 input and 500 output tokens on Claude Sonnet 5.5 ($2/$10 per million) costs $0.0074. The calculator below does this for 63 models at your daily volume, with caching and batch toggles, using prices last checked in November 2026.

Pricing:
Filter:Sort:
#Model$/MonthProviderInput $/1MOutput $/1M$/Request$/Day
1GPT-5 Nanoretires 11 Dec 2026$0.75OpenAI$0.05$0.40$0.000250$0.03
2Llama 3.3 70B$0.78Meta$0.10$0.32$0.000260$0.03
3GPT-6 Luna$1.05OpenAI$0.10$0.50$0.000350$0.03
4Claude Haiku 5.5$1.05Anthropic$0.10$0.50$0.000350$0.03
5GPT-4o Miniretires 14 Jan 2027$1.35OpenAI$0.15$0.60$0.000450$0.05
6Mistral Small 4$1.35Mistral$0.15$0.60$0.000450$0.05
7GPT-5.6 Luna$2.40OpenAI$0.20$1.20$0.000800$0.08
8GPT-5.4 Nanoretires 1 Apr 2027$2.48OpenAI$0.20$1.25$0.000825$0.08
9Llama 4 Maverick$2.55Meta$0.35$1.00$0.000850$0.08
10DeepSeek V4.1 Flash$2.70DeepSeek$0.30$1.20$0.000900$0.09
11Gemini 3.1 Flash Literetires 7 May 2027$3.00Google$0.25$1.50$0.001000$0.10
12GPT-4.1 Miniretires 14 Jan 2027$3.60OpenAI$0.40$1.60$0.001200$0.12
13GPT-5 Miniretires 11 Dec 2026$3.75OpenAI$0.25$2.00$0.001250$0.13
14Mistral Large 3retires 30 Apr 2027$3.75Mistral$0.50$1.50$0.001250$0.13
15Gemini 3.5 Flash Lite$4.65Google$0.30$2.50$0.001550$0.16
16Gemini 2.5 Flashretires 1 Dec 2026$4.65Google$0.30$2.50$0.001550$0.16
17Mistral Large 4$5.25Mistral$0.70$2.10$0.001750$0.18
18Gemini 3 Flash$6.00Google$0.50$3.00$0.002000$0.20
19Grok 4.20$7.50xAI$1.25$2.50$0.002500$0.25
20Grok 4.3$7.50xAI$1.25$2.50$0.002500$0.25
21Gemini 3.8 Flashpromo to 31 Dec$7.88Google$0.75$3.75$0.002625$0.26
22Gemini 3.6 Flashpromo to 31 Dec$7.88Google$0.75$3.75$0.002625$0.26
23GPT-5.4 Mini$9.00OpenAI$0.75$4.50$0.003000$0.30
24DeepSeek V4 Pro$9.90DeepSeek$1.32$3.96$0.003300$0.33
25GPT-6.1 Terra$10.50OpenAI$1.00$5.00$0.003500$0.35
26Claude Haiku 4.5$10.50Anthropic$1.00$5.00$0.003500$0.35
27Grok 4.7$15.00xAI$2.00$6.00$0.005000$0.50
28Grok 4.6$15.00xAI$2.00$6.00$0.005000$0.50
29Grok 4.5$15.00xAI$2.00$6.00$0.005000$0.50
30o3retires 11 Dec 2026$18.00OpenAI$2.00$8.00$0.006000$0.60
31GPT-4.1retires 14 Jan 2027$18.00OpenAI$2.00$8.00$0.006000$0.60
32GPT-5.1retires 1 Apr 2027$18.75OpenAI$1.25$10.00$0.006250$0.63
33GPT-5retires 11 Dec 2026$18.75OpenAI$1.25$10.00$0.006250$0.63
34Gemini 2.5 Proretires 1 Dec 2026$18.75Google$1.25$10.00$0.006250$0.63
35GPT-6.1 Sol$21.00OpenAI$2.00$10.00$0.007000$0.70
36GPT-6 Sol$21.00OpenAI$2.00$10.00$0.007000$0.70
37Claude Sonnet 5.5$21.00Anthropic$2.00$10.00$0.007000$0.70
38Claude Sonnet 5$21.00Anthropic$2.00$10.00$0.007000$0.70
39Gemini 4 Carbonpromo to 30 Nov$21.00Google$2.00$10.00$0.007000$0.70
40Gemini 4 Argonpromo to 30 Nov$21.00Google$2.00$10.00$0.007000$0.70
41GPT-4oretires 14 Jan 2027$22.50OpenAI$2.50$10.00$0.007500$0.75
42GPT-5.6 Terra$24.00OpenAI$2.00$12.00$0.008000$0.80
43Gemini 3.1 Pro$24.00Google$2.00$12.00$0.008000$0.80
44GPT-5.2$26.25OpenAI$1.75$14.00$0.008750$0.88
45GPT-5.4$30.00OpenAI$2.50$15.00$0.010000$1.00
46Claude Sonnet 4.6$31.50Anthropic$3.00$15.00$0.010500$1.05
47Claude Sonnet 4.5retires 30 Nov 2026$31.50Anthropic$3.00$15.00$0.010500$1.05
48GPT-5.6 Solpromo to 30 Nov$42.00OpenAI$4.00$20.00$0.014000$1.40
49Claude Opus 5.5$42.00Anthropic$4.00$20.00$0.014000$1.40
50Claude Opus 5$52.50Anthropic$5.00$25.00$0.017500$1.75
51Claude Opus 4.8$52.50Anthropic$5.00$25.00$0.017500$1.75
52Claude Opus 4.7$52.50Anthropic$5.00$25.00$0.017500$1.75
53Claude Opus 4.6$52.50Anthropic$5.00$25.00$0.017500$1.75
54Claude Opus 4.5$52.50Anthropic$5.00$25.00$0.017500$1.75
55GPT-5.5$60.00OpenAI$5.00$30.00$0.020000$2.00
56Claude Fable 5.2$84.00Anthropic$8.00$40.00$0.028000$2.80
57GPT-6 Astra$105.00OpenAI$10.00$50.00$0.035000$3.50
58Claude Fable 5.1$105.00Anthropic$10.00$50.00$0.035000$3.50
59Claude Fable 5$105.00Anthropic$10.00$50.00$0.035000$3.50
60o3-proretires 11 Dec 2026$180.00OpenAI$20.00$80.00$0.060000$6.00
61GPT-5.2 Pro$315.00OpenAI$21.00$168.00$0.105000$10.50
62GPT-5.5 Pro$360.00OpenAI$30.00$180.00$0.120000$12.00
63GPT-5.4 Pro$360.00OpenAI$30.00$180.00$0.120000$12.00

Prices per 1M tokens (USD). Data verified November 2026. Toggles above apply caching (your hit rate of input tokens at the model's cached input price, the rest at its cache-write price, which is the normal input price except on Anthropic and OpenAI GPT-5.6 and later; Gemini's explicit caching also bills storage by the hour, which is not included) and/or batch API (50% off non-cached input and output, applied to OpenAI, Anthropic, Google and Mistral models, whose batch pricing we have verified; this calculator does not stack batch on cache-hit pricing, though Anthropic and OpenAI do). Promo prices: GPT-5.6 Sol until 30 Nov 2026, then a price OpenAI has not published; Gemini 4 Carbon until 30 Nov 2026, then $4 / $20; Gemini 4 Argon until 30 Nov 2026, then $4 / $20; Gemini 3.8 Flash until 31 Dec 2026, then $1.50 / $7.50; Gemini 3.6 Flash until 31 Dec 2026, then $1.50 / $7.50. Prices shown are standard rates; some models charge more for very long prompts (for example OpenAI GPT-5.5 and later above 272K input tokens, xAI above 200K, Claude Haiku 5.5 above 100K).

The Inference Report · Every Tuesday

Know when AI prices change.

One short email every Tuesday: new models, price moves and free tiers that were cut or added. Five minutes, no fluff.

No spam. Unsubscribe anytime.

Put this on your site

What does an LLM cost?

Every major LLM API bills per million tokens, with one price for input (the prompt you send) and a higher one for output (the text you get back). Across the 63 models we track, output costs 2 to 8.3 times as much as input, and 5 times at the median. That ratio matters more than most teams expect, because people think in prompt length and forget that the reply is where most of the bill comes from. Every model's input, cached and batch rates are in our LLM price list.

Here is the arithmetic for one call to GPT-6.1 Sol ($2 input, $10 output per million tokens) with 1,000 input tokens and 500 output tokens. Input is 1,000 / 1,000,000 x $2 = $0.002. Output is 500 / 1,000,000 x $10 = $0.005. The call costs $0.007, and the output is 71 percent of it despite being half as many tokens.

Per-call numbers look tiny until you multiply by traffic. At 50,000 calls a day that same call costs $350 a day and $10,500 a month. On GPT-6.1 Terra ($1/$5) the call costs $0.0035, and on GPT-6 Luna ($0.10/$0.50) it costs $0.00035, 20 times cheaper. Picking the right tier for the job is the biggest cost lever you have, bigger than caching or batching.

How much will an LLM API cost per month?

Multiply the cost of one request by the requests you send in a month. At the calculator's default workload of 1,000 input and 500 output tokens per request, 100 requests a day for 30 days, GPT-6.1 Sol costs $21 a month, Claude Sonnet 5.5 $21 and Gemini 3.1 Pro $24 at November 2026 prices.

The formula is (input tokens x input price + output tokens x output price) / 1,000,000, times requests per day, times 30. For GPT-6.1 Sol that is (1,000 x $2 + 500 x $10) / 1,000,000 = $0.007 per request, and $0.007 x 100 x 30 = $21 a month. Here is the same workload at higher traffic:

ModelPrice per 1M (in / out)100 requests a day1,000 requests a day10,000 requests a day
GPT-6.1 Sol$2 / $10$21$210$2,100
Claude Sonnet 5.5$2 / $10$21$210$2,100
Gemini 3.1 Pro$2 / $12$24$240$2,400

The bill grows in a straight line with traffic, so each column is ten times the one before it. The mix of tokens matters more: output costs 5 to 6 times as much as input on these three models, so token for token a longer reply moves the bill more than a longer prompt. The caching and batch toggles above can cut it further. Put in your own token counts and traffic to see every model we track in one sorted table.

How API pricing works

Three prices move the bill: input, output and cached input. Cached input is the one most teams find only after the first invoice. When the start of a prompt matches a recent request, the provider can serve it from cache and bill it at a fraction of the normal input price: 10 percent on most current models, 5 percent on Claude Opus 5.5, 5 percent on GPT-6.1 Sol, and 2.5 percent on Claude Fable 5.1. OpenAI and Gemini cache automatically; on Anthropic you turn it on with a cache_control field in the request. Cache writes can cost a little more than normal input, and each provider has a minimum prefix length before caching starts. The caching section below covers both.

Take a customer-facing chatbot: 10,000 messages a day, 1,600 input tokens per call (a 1,200-token system prompt plus recent conversation), 400 output tokens per reply, 30 days a month. That is 480M input tokens and 120M output tokens a month. On GPT-6.1 Sol the uncached bill is 480 x $2 + 120 x $10 = $2,160 a month.

GPT-6 Luna runs the whole workload for $108 a month, about 20 times less than uncached GPT-6.1 Sol. We don't move every workload to a budget model, but for classification, extraction, summaries and first drafts we start cheap and only pay for a flagship where the extra quality shows up in the output.

How much does prompt caching save?

Caching discounts input only, so the saving depends on your cache hit rate. For the chatbot above, caching its 1,200-token system prompt gives a 75 percent hit rate. On GPT-6.1 Sol input drops from $2 to $0.70 per million tokens, cache writes included, and the monthly bill falls 29 percent at November 2026 prices.

The calculator does the same sum: hit rate x cached price + misses x cache-write price. On GPT-6.1 Sol that is 0.75 x $0.10 + 0.25 x $2.50 = $0.70, so the bill goes from $2,160 to $1,536 a month. A miss costs more than normal input here: OpenAI bills writes to its default 30-minute cache at 1.25 times input on GPT-5.6 and later (see OpenAI's prompt caching guide), and Anthropic charges 1.25 times input for its default 5-minute cache (see Anthropic's pricing page). We count every miss as a write, which is what automatic caching does. If you cache only a fixed prefix with an explicit breakpoint, the rest of the prompt bills at normal input and your write cost is lower.

Writes are also why a low hit rate can cost more than no caching at all. On GPT-6.1 Sol, caching only pays off above a 21 percent hit rate. Google, xAI, DeepSeek and Mistral list no cache-write price: a miss costs normal input, so any hit is a saving, and the same goes for OpenAI models before GPT-5.6. Gemini's explicit caching, which Gemini 4 models don't support, adds an hourly storage fee instead. No cache-write price is listed for Llama 4 Maverick, so the calculator prices its misses at normal input and marks the row. Caching also needs a long enough prefix: 1,200 tokens clears the 1,024-token minimum on OpenAI's GPT-5.6 and later.

Here is the same chatbot, system prompt cached, across a few current models:

ModelPrice per 1M (in / cached / out)Monthly, no cacheMonthly, 75% cache hitsSaving
GPT-6.1 Sol$2 / $0.10 / $10$2,160$1,53629%
Claude Sonnet 5.5$2 / $0.10 / $10$2,160$1,53629%
GPT-6.1 Terra$1 / $0.05 / $5$1,080$76829%
DeepSeek V4.1 Flash$0.30 / $0.006 / $1.20$288$18237%
Claude Haiku 5.5$0.10 / $0.01 / $0.50$108$7927%
GPT-6 Luna$0.10 / $0.01 / $0.50$108$7927%

Cache writes are included at each provider's rate. DeepSeek's prices in the table are peak-hour list prices; off-peak is half. Claude Haiku 5.5's price applies to prompts up to 100K tokens. Turn on Caching in the calculator and enter your own hit rate to see it for every model.

Common pitfalls

Most bad cost forecasts don't come from bad arithmetic. They come from a missed lever: caching left off, a forecast built on input tokens alone, or an estimate nobody compared with the real invoice.

  • Ignoring the output multiplier. At the calculator's default of 1,000 input and 500 output tokens, output is 50 to 81 percent of the bill across the models we track. Teams plan around prompt length because that is what they write and edit, and miss that a wordy response template is driving the bill. Cap max_tokens, ask for JSON instead of prose, and put length limits in the system prompt.
  • Forgetting batch discounts. OpenAI, Anthropic, Google and Mistral all offer a batch API at 50 percent off, with results within 24 hours and often much sooner. On GPT-6.1 Sol that turns $2/$10 into $1/$5. Evaluations, backfills, bulk summarization and anything else nobody is waiting on belongs there.
  • Leaving caching off. Any product with a stable system prompt or fixed tool definitions above the provider's minimum length should cache it. On Claude Sonnet 5.5, cached input is $0.10 per million instead of $2.
  • Building on a launch promo. Providers often launch models at a temporary price that reverts to list on a set date. Check whether the price you are budgeting on has an end date.
  • Guessing token counts. Characters divided by four is fine on a napkin, but it is off by 10 to 25 percent on code, markdown and non-English text. Run real inputs through the token counter before you sign off on a forecast.

When to use this tool

We built the calculator for three decisions that keep coming up. The first is pricing a feature: if each user makes about 200 calls a month at 1,200 input and 500 output tokens on Claude Sonnet 5.5 ($2/$10), that is about $1.48 per user per month, which tells you quickly whether a $10 plan works. The second is comparing the same model across billing routes, such as a cloud marketplace versus the provider's own API, at your real volume. The third is margin planning for usage-based pricing, where the question is what gross margin is left for your heaviest users.

Sortable monthly costs across 60+ models, filters for flagship, budget, premium and reasoning models, and the caching and batch toggles turn those questions into numbers in a minute or two. We re-check prices against each provider's pricing page every month; last check: November 2026. To compare models on more than price, use the AI model comparison table, and you can embed this calculator on your own site for free.

Frequently asked

Can I use this as an OpenAI, Claude or Gemini cost calculator?

Yes. It prices every OpenAI, Claude and Gemini model we track side by side in one table (26 OpenAI, 15 Claude and 10 Gemini models at our November 2026 check), along with models from xAI, DeepSeek, Mistral and Meta. Enter your tokens per request and requests per day once, and every model's monthly cost appears, sortable by total or input price. For one provider's full price list, see OpenAI API pricing, Claude API pricing or Gemini API pricing.

Are there free AI APIs?

Yes, with limits. Google's Gemini API has a free tier on several Flash models, but free-tier prompts can be used to improve Google products and the free tier can't serve users in the EEA, UK or Switzerland. Groq allows 1,000 requests a day on open models such as gpt-oss-120b, and OpenRouter allows 50 a day across its free models. On the paid side, DeepSeek halves its list prices outside peak hours.

How do I include batch API discounts?

Turn on the Batch 50% toggle above the table. It halves input and output prices, which matches the batch APIs at OpenAI, Anthropic, Google and Mistral: you submit requests asynchronously and get results within 24 hours, often much sooner. On GPT-6.1 Sol that turns $2/$10 into $1/$5 per million tokens, so use it for evaluations, backfills and bulk summarization that nobody is waiting on.

Should I use prompt caching?

Yes, whenever requests share a long, stable prefix such as a system prompt or tool definitions. Cache hits cost 10 percent of the input price on most current models and less on some: Claude Opus 5.5 reads cached input at $0.20 instead of $4, and Claude Fable 5.1 at $0.25 instead of $10. Cache writes can cost more (1.25 times input on Anthropic's 5-minute cache and on OpenAI's GPT-5.6 and later), and a prefix has to clear a minimum length before it is cached at all, so caching pays off once a prefix is reused a few times. See what caching saved on a real workload.

How accurate is this calculator?

The math is exact: tokens divided by a million, times the published price, for input and output separately. We re-check prices against each provider's pricing page every month; last check: November 2026. With caching on, the cache hit rate you enter is the share of input tokens billed at the cached price. The rest bill as cache writes where the provider charges for them (Anthropic's default 5-minute cache at 1.25 times input, OpenAI's GPT-5.6 and later at 1.25 times) and at the normal input price elsewhere. Models with no cached price stay at full price. The batch toggle is not applied on top of cache-hit prices, even though Anthropic and OpenAI let the two discounts stack. Batch is applied only to OpenAI, Anthropic, Google and Mistral models, whose 50 percent batch pricing we have verified; xAI's batch discount is 20 percent, so the toggle leaves Grok at standard prices. Measure your token counts in the Token Counter rather than guessing them, since they are the inputs everything else depends on.

Sources: OpenAI's pricing page · Anthropic's pricing page · Google's Gemini API pricing page · xAI's pricing page · DeepSeek's pricing page · Mistral's API pricing page · OpenRouter's Llama listings. How we check our data