Skip to main content
SaaSCity.io
DirectoriesLive LaunchesBlogWrite for UsAdvertise
Submit
HomeFree toolsLLM API pricing calculator

Free calculator

Claude API pricing vs OpenAI, Gemini, DeepSeek and Grok in one calculator

Current API prices per million tokens from Anthropic, OpenAI, Google, xAI, DeepSeek and Mistral, read from each provider’s own pricing page, and what your workload costs a month with caching and batch.

Updated October 27, 2026

Your workload

System prompt, context and the user’s message.

Include reasoning tokens: they bill as output.

Share of input tokens read from the prompt cache.

%

Share of requests sent through a Batch API.

%

Runs in your browser. Nothing you type is sent or stored.

Cheapest model for this workload

$76.50

GPT-5 nano (OpenAI): $2.55 a day, $0.255 per 1,000 requests.

Cheapest five

  1. 1GPT-5 nano · OpenAI$76.50
  2. 2Gemini 2.5 Flash-Lite · Google$93.00
  3. 3Claude Haiku 5.5 · Anthropic$108
  4. 4GPT-6 Luna · OpenAI$108
  5. 5Mistral Small 4 · Mistral$180
Requests a month
300K
Models that fit
33 of 33
Input tokens a month
600M
Output tokens a month
150M
GPT-5 nano is the cheapest of 33 models that fit this workload, at $76.50 a month. The most expensive that fits costs $10,800.

Every model, priced for your workload

Prices in USD per 1M tokens, Standard tier, checked on each provider’s pricing page on October 27, 2026. A month is 30 days. Cache-write surcharges are not included.

Cached input
GPT-5 nanoOpenAI · gpt-5-nano$0.05$0.40$0.005400K$76.50
Gemini 2.5 Flash-LiteGoogle · gemini-2.5-flash-lite$0.10$0.40$0.011M$93.00
Claude Haiku 5.5Anthropic · claude-haiku-5-5$0.10$0.50$0.011M$108
GPT-6 LunaOpenAI · gpt-6-luna$0.10$0.50$0.011.05M$108
Mistral Small 4Mistral · mistral-small-2603$0.15$0.60—256K$180
DeepSeek V4.1 FlashDeepSeek · deepseek-flash$0.30$1.20$0.0061M$272Off-peak: $136
Gemini 3.1 Flash-LiteGoogle · gemini-3.1-flash-lite$0.25$1.50$0.0251M$308
GPT-5 miniOpenAI · gpt-5-mini$0.25$2.00$0.025400K$383
Gemini 2.5 FlashGoogle · gemini-2.5-flash$0.30$2.50$0.031M$474
Gemini 3.5 Flash-LiteGoogle · gemini-3.5-flash-lite$0.30$2.50$0.031M$474
Mistral Large 3Mistral · mistral-large-2512$0.50$1.50—256K$525
Grok Build 0.1xAI · grok-build-0.1$1.00$2.00$0.20256K$660
Gemini 3.8 FlashGoogle · gemini-3.8-flashFrom Jan 1, 2027: $1.50 in, $7.50 out$0.75$3.75$0.0751M$810
Grok 4.3xAI · grok-4.3$1.25$2.50$0.201M$810
GPT-5.4 miniOpenAI · gpt-5.4-mini$0.75$4.50$0.075400K$923
DeepSeek V4 ProDeepSeek · deepseek-v4-pro$1.32$3.96$0.0441M$1,003Off-peak: $502
GPT-6.1 TerraOpenAI · gpt-6.1-terra$1.00$5.00$0.051.05M$1,065
Mistral Large 4PreviewMistral · mistral-large-4$1.36$4.18$0.141M$1,077
Claude Haiku 4.5LegacyAnthropic · claude-haiku-4-5-20251001$1.00$5.00$0.10200K$1,080
Grok 4.7xAI · grok-4.7$2.00$6.00$0.50500K$1,650
Gemini 2.5 ProGoogle · gemini-2.5-pro$1.25$10.00$0.1251M$1,912
Mistral Medium 3.5Mistral · mistral-medium-3-5$1.50$7.50—256K$2,025
Claude Sonnet 5.5Anthropic · claude-sonnet-5-5$2.00$10.00$0.101M$2,130
Gemini 4 ArgonGoogle · gemini-4-argonFrom Dec 1, 2026: $4.00 in, $20.00 out$2.00$10.00$0.101M$2,130
GPT-6.1 SolOpenAI · gpt-6.1-sol$2.00$10.00$0.101.05M$2,130
Claude Sonnet 5LegacyAnthropic · claude-sonnet-5$2.00$10.00$0.201M$2,160
Gemini 3.1 Pro PreviewPreviewGoogle · gemini-3.1-pro-preview$2.00$12.00$0.201M$2,460
Claude Sonnet 4.6LegacyAnthropic · claude-sonnet-4-6$3.00$15.00$0.301M$3,240
Claude Opus 5.5Anthropic · claude-opus-5-5$4.00$20.00$0.201M$4,260
Claude Opus 5LegacyAnthropic · claude-opus-5$5.00$25.00$0.501M$5,400
GPT-5.5OpenAI · gpt-5.5$5.00$30.00$0.501.05M$6,150
Claude Fable 5.1Anthropic · claude-fable-5-1$10.00$50.00$0.251M$10,575
GPT-6 AstraOpenAI · gpt-6-astra$10.00$50.00$1.001.05M$10,800

Quick answer

How is LLM API pricing calculated?

LLM APIs charge per million tokens, with separate prices for input and output. Cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000. Cached input costs 2% to 25% of the input price on the models here, and batch requests 20% to 50% less. Example: 10,000 requests a day of 2,000 input and 500 output tokens on Claude Sonnet 5.5 ($2/$10), half the input cached, costs $71 a day, $2,130 a month.

How to use the LLM API pricing calculator

  1. Describe one request

    Enter requests per day and the input and output tokens of a typical request. The token counter gives exact numbers for your prompt.

  2. Add caching and batch

    Set how much of the input repeats from the cache and how many requests can wait for a Batch API.

  3. Compare models

    Read the cheapest model, then sort the full table, filter by provider or require a minimum context window.

  4. Check your margin

    Switch to AI SaaS margin, enter plan prices and tokens per user, and see what each plan keeps after AI cost.

How the calculator works

Each request costs its input tokens at the input price plus its output tokens at the output price, per million tokens. The cache hit rate moves that share of the input to the cache-read price; models without a listed cache price ignore it. The batch share moves that share of requests to Batch API prices, where the model has them. Daily cost × 30 gives the month.

Some models charge more for long prompts: Claude Haiku 5.5 above 100,000 input tokens, OpenAI’s GPT-6 and GPT-5.5 models above 272,000, Gemini 3.1 Pro and 2.5 Pro above 200,000, and Grok from 200,000. When your input per request crosses that line, the whole request is priced at the higher rate, as the providers bill it.

Not included: cache-write surcharges (Anthropic charges 1.25× input for a 5-minute cache write, OpenAI the same for GPT-5.6 and later), Gemini’s hourly cache storage, regional or data-residency uplifts, and tool fees such as web search. DeepSeek is priced at peak rates, with the off-peak cost shown under it.

Formula
Cost per request = (uncached input × input price + cached input × cache price + output × output price) ÷ 1,000,000 Monthly cost = cost per request × requests per day × 30 Batch requests: the same formula at batch prices Gross margin = (plan price − AI cost per user) ÷ plan price

Worked example

  1. Workload: 10,000 requests a day, each 2,000 input and 500 output tokens, half the input from cache.
  2. Input on Claude Sonnet 5.5: 1,000 × $2 + 1,000 × $0.10 per 1M = $0.0021 per request.
  3. Output: 500 × $10 per 1M = $0.005 per request.
  4. Per request $0.0071; per day × 10,000 = $71; per month × 30 = $2,130.
  5. The same workload on Claude Haiku 5.5 costs $108 a month, on GPT-5 nano $76.50.

LLM API prices compared

API prices per 1M tokens, verified 27 October 2026

ModelInputOutputCached inputBatch in / outContextSource
Claude Fable 5.1$10.00$50.00$0.25$5.00 / $25.001MAnthropic pricing page
Claude Opus 5.5$4.00$20.00$0.20$2.00 / $10.001MAnthropic pricing page
Claude Sonnet 5.5$2.00$10.00$0.10$1.00 / $5.001MAnthropic pricing page
Claude Haiku 5.5$0.10$0.50$0.01$0.05 / $0.251MAnthropic pricing page
Claude Opus 5 (legacy)$5.00$25.00$0.50$2.50 / $12.501MAnthropic pricing page
Claude Sonnet 5 (legacy)$2.00$10.00$0.20$1.00 / $5.001MAnthropic pricing page
Claude Sonnet 4.6 (legacy)$3.00$15.00$0.30$1.50 / $7.501MAnthropic pricing page
Claude Haiku 4.5 (legacy)$1.00$5.00$0.10$0.50 / $2.50200KAnthropic pricing page
GPT-6 Astra$10.00$50.00$1.00$5.00 / $25.001.05MOpenAI pricing page
GPT-6.1 Sol$2.00$10.00$0.10$1.00 / $5.001.05MOpenAI pricing page
GPT-6.1 Terra$1.00$5.00$0.05$0.50 / $2.501.05MOpenAI pricing page
GPT-6 Luna$0.10$0.50$0.01$0.05 / $0.251.05MOpenAI pricing page
GPT-5.5$5.00$30.00$0.50$2.50 / $15.001.05MOpenAI pricing page
GPT-5.4 mini$0.75$4.50$0.075$0.375 / $2.25400KOpenAI pricing page
GPT-5 mini$0.25$2.00$0.025$0.125 / $1.00400KOpenAI pricing page
GPT-5 nano$0.05$0.40$0.005$0.025 / $0.20400KOpenAI pricing page
Gemini 4 Argon$2.00$10.00$0.10$1.00 / $5.001MGoogle pricing page
Gemini 3.8 Flash$0.75$3.75$0.075$0.375 / $1.8751MGoogle pricing page
Gemini 3.5 Flash-Lite$0.30$2.50$0.03$0.15 / $1.251MGoogle pricing page
Gemini 3.1 Flash-Lite$0.25$1.50$0.025$0.125 / $0.751MGoogle pricing page
Gemini 3.1 Pro Preview (preview)$2.00$12.00$0.20$1.00 / $6.001MGoogle pricing page
Gemini 2.5 Pro$1.25$10.00$0.125$0.625 / $5.001MGoogle pricing page
Gemini 2.5 Flash$0.30$2.50$0.03$0.15 / $1.251MGoogle pricing page
Gemini 2.5 Flash-Lite$0.10$0.40$0.01$0.05 / $0.201MGoogle pricing page
Grok 4.7$2.00$6.00$0.50$1.60 / $4.80500KxAI pricing page
Grok 4.3$1.25$2.50$0.20$1.00 / $2.001MxAI pricing page
Grok Build 0.1$1.00$2.00$0.20No batch API256KxAI pricing page
DeepSeek V4.1 Flash$0.30$1.20$0.006No batch API1MDeepSeek pricing page
DeepSeek V4 Pro$1.32$3.96$0.044No batch API1MDeepSeek pricing page
Mistral Large 4 (preview)$1.36$4.18$0.14$0.68 / $2.091MMistral pricing page
Mistral Medium 3.5$1.50$7.50—$0.75 / $3.75256KMistral pricing page
Mistral Large 3$0.50$1.50—$0.25 / $0.75256KMistral pricing page
Mistral Small 4$0.15$0.60—$0.075 / $0.30256KMistral pricing page

Standard tier, text tokens, prompts under each model’s long-context threshold. DeepSeek shows peak prices; off-peak is half. Batch prices for xAI are 20% off as xAI states; Anthropic batch cache reads and Mistral batch prices follow the providers’ stated discounts. Every row comes from the provider’s official pricing page, checked 27 October 2026 and linked under Sources.

Claude API pricing

Anthropic API pricing per million tokens: Claude Fable 5.1 costs $10 input and $50 output, Claude Opus 5.5 $4 and $20, Claude Sonnet 5.5 $2 and $10, and Claude Haiku 5.5 $0.10 and $0.50 for prompts up to 100,000 tokens, rising to $0.50 and $2.50 above that. Older models stay available: Opus 5 at $5 and $25, Sonnet 5 at $2 and $10, Sonnet 4.6 at $3 and $15, Haiku 4.5 at $1 and $5. Cache reads cost 10% of input, 5% on Opus 5.5 and Sonnet 5.5 and 2.5% on Fable 5.1; writing the cache costs 1.25× input for 5 minutes or 2× for an hour. The Batch API halves every price. Claude 4.6 and later models get the full 1M-token context at standard rates (Haiku 5.5 aside), and US-only inference adds 10%. Claude Opus 4.7 and later use a tokenizer that Anthropic says produces about 30% more tokens for the same text, so compare costs on real prompts.

OpenAI API pricing

OpenAI’s current flagships: GPT-6 Astra at $10 input and $50 output per million tokens, GPT-6.1 Sol at $2 and $10, GPT-6.1 Terra at $1 and $5, and GPT-6 Luna at $0.10 and $0.50. GPT-5.5 ($5 and $30), GPT-5.4 mini, GPT-5 mini and GPT-5 nano ($0.05 and $0.40) are still sold. Prompts above 272,000 input tokens pay double input and 1.5× output for the whole request on the GPT-6 models and GPT-5.5. Cached input costs 10% of input (5% on GPT-6.1 Sol and Terra); on GPT-5.6 and later a 30-minute cache write costs 1.25× input and a 12-hour write 2.5×. Batch and Flex cost half, Fast mode doubles the GPT-6 prices, and data-residency endpoints add 10% for models released since 5 March 2026. Searches for ChatGPT API pricing mean the same thing: developers pay for the GPT models per token through the OpenAI API.

Gemini API pricing

Gemini 4 Argon costs $2 input and $10 output per million tokens until 30 November 2026 and $4 and $20 from 1 December 2026, with implicit caching only. Gemini 3.8 Flash costs $0.75 and $3.75 until 31 December 2026, then $1.50 and $7.50. Gemini 3.5 Flash-Lite ($0.30 and $2.50), 3.1 Flash-Lite ($0.25 and $1.50) and 2.5 Flash-Lite ($0.10 and $0.40) are the low-cost tiers. Gemini 3.1 Pro Preview and 2.5 Pro double their input price for prompts over 200,000 tokens. Output prices include thinking tokens. Explicit context caching adds a storage charge per million tokens per hour ($0.50 to $1.00 on the Flash models, $4.50 on Pro). The Batch API halves most prices, and Priority costs about 1.8× Standard.

DeepSeek API pricing

DeepSeek sells two models through its API: deepseek-flash (DeepSeek V4.1 Flash) at $0.30 input and $1.20 output per million tokens, and deepseek-v4-pro at $1.32 and $3.96. Those are peak prices. Off-peak prices are half: peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, and every other hour, weekends and Chinese public holidays are off-peak. Context caching is on by default for every account, and a cache hit costs $0.006 per million tokens on Flash at peak, 2% of the input price. Both models take 1M tokens of context. DeepSeek lists no Batch API; its Search and Fetch APIs cost $0.75 per 1,000 requests.

Grok API pricing

xAI’s Grok 4.7 costs $2 input, $0.50 cached input and $6 output per million tokens with a 500,000-token context. Grok 4.3 costs $1.25, $0.20 and $2.50 with 1M tokens of context, the same rates as the Grok 4.20 models. Grok Build 0.1, the coding model, costs $1 and $2 and has no Batch API. On every Grok model a prompt that reaches 200,000 tokens doubles the price of all tokens in the request. Caching is automatic, the Batch API takes 20% off on the Grok 4 models, and Priority processing costs double.

Mistral API pricing

Mistral Large 4, in public preview, costs $1.36 input and $4.18 output per million tokens with $0.14 cached input and a 1M-token context. Mistral Medium 3.5 costs $1.50 and $7.50, Mistral Large 3 $0.50 and $1.50, and Mistral Small 4 $0.15 and $0.60, each with 256K tokens of context. Batch processing takes 50% off.

Prompt caching: what it saves

Prompt caching stores the start of a prompt that repeats, such as a system prompt, tool definitions or a long document, and bills it at a cache-read price on later requests. On the models above a cache read costs between 2% (DeepSeek) and 25% (Grok 4.7) of the input price. Anthropic and OpenAI’s newest models also charge 1.25× input to write the cache, so caching pays off once a prefix is reused at least once. DeepSeek and xAI cache automatically; Gemini 4 Argon supports implicit caching only. Put the stable part of the prompt first and the changing part last, or the cache never matches.

LLM API pricing questions

How much does the Claude API cost?
Per million tokens: Claude Opus 5.5 costs $4 input and $20 output, Sonnet 5.5 $2 and $10, Haiku 5.5 $0.10 and $0.50 for prompts up to 100,000 tokens, and Fable 5.1 $10 and $50. Batch requests cost half; cache reads cost 2.5% to 10% of input.
How much does the OpenAI API cost per token?
GPT-6 Astra costs $10 per million input tokens and $50 per million output, GPT-6.1 Sol $2 and $10, GPT-6.1 Terra $1 and $5, and GPT-6 Luna $0.10 and $0.50. One input token on Astra costs $0.00001.
What is the cheapest LLM API?
Per token, GPT-5 nano ($0.05 input, $0.40 output per million) is the cheapest model listed here, followed by Gemini 2.5 Flash-Lite ($0.10 and $0.40). The cheapest for you depends on your input-output mix and cache hits, which is what the calculator ranks.
What is prompt caching?
Prompt caching stores a repeated prompt prefix, such as a system prompt or a document, so later requests read it at a discount: 2% to 25% of the input price on the models here. Anthropic and OpenAI’s newest models charge extra to write the cache.
How does OpenRouter pricing work?
OpenRouter resells many providers’ models through one API. It says it passes the providers’ prices through with no markup on inference and charges a fee when you buy credits, so per-token prices should match the provider prices in this table.
Do reasoning or thinking tokens cost extra?
They bill as output tokens. OpenAI, Anthropic and Google all count reasoning tokens as output even when you never see the text, so a model that thinks longer costs more per answer. Add them to your output tokens per request.
How much does the Batch API save?
Batch requests run asynchronously instead of in real time, at a discount: 50% at Anthropic, OpenAI, Google and Mistral, 20% on xAI’s Grok 4 models. DeepSeek lists no Batch API but halves its prices off-peak.
Is Claude cheaper than GPT?
Tier by tier, Claude Sonnet 5.5 and GPT-6.1 Sol both cost $2 and $10 per million tokens, Claude Opus 5.5 ($4/$20) costs less than GPT-6 Astra ($10/$50), and Claude Haiku 5.5 matches GPT-6 Luna for short prompts. Tokenizers differ, so compare on your real prompts.

Related

  • Margin calculator
  • Claude Code pricing: what it costs
  • Claude Haiku 5.5 and AI SaaS margins
  • DeepSeek V4.1 Flash and open weights
  • Mistral Large 4 economics

Cite this tool

Free to link and quote. Use this reference:

SaaSCity, "LLM API Pricing Calculator", October 27, 2026. https://saascity.io/free-tools/llm-api-pricing-calculator

Sources

  • Anthropic, Claude API pricing (checked 27 Oct 2026)
  • Anthropic, Models overview (context windows, tokenizer)
  • OpenAI, API pricing (checked 27 Oct 2026)
  • OpenAI, Prompt caching
  • OpenAI, Models (context windows)
  • Google, Gemini Developer API pricing (checked 27 Oct 2026)
  • Google, Gemini models (context windows)
  • xAI, Grok API pricing and batch discounts (checked 27 Oct 2026)
  • DeepSeek, Models & Pricing (checked 27 Oct 2026)
  • DeepSeek, Context caching
  • Mistral, API pricing (checked 27 Oct 2026)
  • Mistral, Batch processing
  • OpenRouter, FAQ: pricing and fees

More free tools

  • Burn rate & runway calculatorMonths of cash left, the date it runs out, when to raise, and whether you are default alive.
  • LTV calculatorCustomer lifetime value, CAC, the LTV to CAC ratio and the months it takes to earn back a customer.
  • Stripe fee calculatorWhat Stripe, Paddle, Lemon Squeezy and Polar take from each sale, side by side.
  • Domain Rating checkerAny site’s Ahrefs DR in one click, live, with no account.
  • DR badge generatorAn embeddable badge that shows your live Domain Rating.
  • Launch card generatorA shareable card image for your launch post on X and LinkedIn.
  • ARR & MRR calculatorMRR to ARR, ARPU, annual plans and the ARR bridge, with months to $1M ARR.
  • Churn rate calculatorCustomer and revenue churn, monthly to annual done right, and the signups you need to stand still.
All free tools

List your AI product

If your product runs on one of these models, list it on SaaSCity: a hand-reviewed listing, a launch week and a permanent page on a DR 70 domain.

Submit your product
SaaSCity.io

Directories are boring. We built a city instead. First isometric SaaS directory on the planet.

Platform
Submit SaaSLive LaunchesPricingBlogWrite for UsMCP for AgentsAdvertiseAboutghosty
Directories
Best SaaS DirectoriesBest AI DirectoriesDirectory ReviewsBest Indie Hacker CommunitiesBest Subreddits for FoundersHow to Get SaaS BacklinksSEO GlossaryHow to Submit to DirectoriesDirectory Submission ServiceDirectory Submission Services Compared
SaaSCity Alternatives
All ComparisonsSaaSCity vs Nick LaunchesSaaSCity vs BetterLaunchSaaSCity vs PeerPushProduct Hunt AlternativesSaaSHub Alternatives
Legal
Terms of ServicePrivacy PolicyRefund PolicyCookie PolicyCopyright & DMCASecurityContact
Free Tools
ARR calculatorSaaS valuationChurn calculatorMargin calculatorTAM SAM SOMLLM API pricingDR checkerRobots.txt generatorPNG to ICOAll 14 tools →

© 2026 SaaSCity.io

llms.txt