ChatGPTGeminiClaudeGrok40,000+users on the Chrome Web Store4.7/ 5

AI API Cost Calculator for GPT, Claude, Gemini, and Grok

API calls are billed per million tokens, at one rate for what you send and a higher rate for what the model writes back. Enter a workload below to see the cost per call, per month and per year for any model with a published price, ranked cheapest first.

Calculator free forever | Context gauge free inside ChatGPT, Gemini, Claude and Grok | Premium $9.99/mo or $99 once

Start from a typical workload

Not sure how many tokens your text is? One token is about three quarters of a word; paste it into the token counter.

$35.00per month on GPT-6 Astra, 1,000 calls

  • $0.0350Per call
  • $420.00Per year
  • $0.0100Input per call
  • $0.0250Output per call

Share of cost from output71%

GPT-6 Astra bills $10.00 per 1M input and $50.00 per 1M output tokens.

Cheapest for this shape: GPT-5 nano at $0.2500 a month, 99% less. See every model

List prices only: no cached-input, batch or long-context adjustments. The math runs in your browser; nothing you type is uploaded.

The formula

How API pricing actually adds up

Cost per call = input tokens / 1,000,000 x input rate + output tokens / 1,000,000 x output rate. Multiply by calls per month, then by twelve. Every figure on this page is that arithmetic on published list prices.

Input is everything the model reads: the system prompt, the conversation so far, retrieved documents and the question. Output is only what it writes back. Because output is the expensive side, two jobs with the same total tokens can differ several times in cost depending on which way the tokens flow.

The picker only lists models whose provider publishes a numeric per-million rate. Where a list price is not on this page, the model is left out rather than estimated, and the provenance line under the table states when each rate was last verified.

Why it matters

Four things the numbers show:

  • Output costs more than input: every listed provider charges 2 to 6 times more per output token, so a reply-heavy job is priced by the output rate.
  • The cheapest model changes with the shape: a model with a low input rate wins on document summaries, one with a low output rate wins on long generations.
  • Calls multiply small numbers into real money: a fraction of a cent per call is a budget line at 100,000 calls a month.
  • List prices move: rates on this page carry a verification date, and the calculator only uses models whose price is published.

The readout above shows the output share for your pick; the table below shows which model that favours.

Step by step

How to estimate an AI API bill

Four steps, no account, and nothing leaves your browser.

  • Enter the tokens per call

    Input is everything you send, including system prompt and retrieved context; output is what the model writes back. Pick a preset for a typical shape or type your own numbers.

  • Set the calls per month

    How often the job runs. Monthly and yearly figures are that count times the per-call cost.

  • Choose the model

    The headline shows cost per call, per month and per year for the model you pick, split into input and output.

  • Read the ranked table

    Every model with a published rate, cheapest first for exactly this workload, with the saving against your pick. Nothing is uploaded; the math runs in your browser.

Every priced model

Cost by model for this workload

Ranked cheapest first for 1,000 input and 500 output tokens per call, 1,000 calls a month. Your pick is highlighted; the saving column compares each model with it.

ModelProviderPrice per 1M (in / out)Per callPer monthPer yearvs your pick
GPT-5 nanoOpenAI$0.05 / $0.40$0.00025$0.2500$3.00-99%
GPT-5.6 LunaOpenAI$0.20 / $1.20$0.00080$0.8000$9.60-98%
GPT-5.4 nanoOpenAI$0.20 / $1.25$0.00082$0.8250$9.90-98%
Gemini 3.1 Flash-LiteGoogle$0.25 / $1.50$0.00100$1.00$12.00-97%
GPT-5 miniOpenAI$0.25 / $2.00$0.00125$1.25$15.00-96%
Gemini 3 FlashGoogle$0.50 / $3.00$0.00200$2.00$24.00-94%
Grok Build 0.1xAI$1.00 / $2.00$0.00200$2.00$24.00-94%
Grok 4.3xAI$1.25 / $2.50$0.00250$2.50$30.00-93%
Grok 4.20xAI$1.25 / $2.50$0.00250$2.50$30.00-93%
GPT-5.4 miniOpenAI$0.75 / $4.50$0.00300$3.00$36.00-91%
Claude Haiku 4.5Anthropic$1.00 / $5.00$0.00350$3.50$42.00-90%
Grok 4.5xAI$2.00 / $6.00$0.00500$5.00$60.00-86%
GPT-4.1OpenAI$2.00 / $8.00$0.00600$6.00$72.00-83%
GPT-5OpenAI$1.25 / $10.00$0.00625$6.25$75.00-82%
Claude Sonnet 5Anthropic$2.00 / $10.00$0.00700$7.00$84.00-80%
GPT-5.6 TerraOpenAI$2.00 / $12.00$0.00800$8.00$96.00-77%
Gemini 3.1 ProGoogle$2.00 / $12.00$0.00800$8.00$96.00-77%
GPT-5.4OpenAI$2.50 / $15.00$0.0100$10.00$120.00-71%
GPT-5.6 SolOpenAI$4.00 / $20.00$0.0140$14.00$168.00-60%
Claude Opus 5Anthropic$5.00 / $25.00$0.0175$17.50$210.00-50%
GPT-5.5OpenAI$5.00 / $30.00$0.0200$20.00$240.00-43%
GPT-6 AstraYour pickOpenAI$10.00 / $50.00$0.0350$35.00$420.00Selected
Claude Fable 5.1Anthropic$10.00 / $50.00$0.0350$35.00$420.000%
GPT-5.6 CyberOpenAI$12.50 / $75.00$0.0500$50.00$600.00+43%
GPT-5.5 ProOpenAI$30.00 / $180.00$0.1200$120.00$1,440.00+243%
GPT-5.4 ProOpenAI$30.00 / $180.00$0.1200$120.00$1,440.00+243%

Figures from official provider pricing pages: OpenAI verified September 9, 2026 from developers.openai.com, Google as of March 2026, xAI Grok verified July 2026 from docs.x.ai, and Anthropic Claude verified September 2026 from platform.claude.com. GPT-6 Astra, released September 4, 2026, is OpenAI's current flagship; GPT-5.6 Sol, Terra and Luna, GPT-5.5, GPT-5.4 and their Pro, mini and nano tiers remain listed, and GPT-5, GPT-5 mini, GPT-5 nano and GPT-4.1 stay on the price list although OpenAI now points new work to newer models. OpenAI bills prompts above 272K input tokens at 2x input and 1.5x output on its 1.05M-context models; the table shows the standard rate. Claude Fable 5.1 (released September 1, 2026), Opus 5, Sonnet 5 and Haiku 4.5 are current; Fable 5, Opus 4.8 and Sonnet 4.6 are now legacy. Claude Sonnet 5's $2 / $10 per 1M tokens launched as introductory pricing through August 31, 2026 and is now the standard price: Anthropic cancelled the scheduled rise to $3 / $15. GPT-5.6 Cyber was verified September 2026 from OpenAI's model page; it is an approval-gated API model (Daybreak program), so its row carries an access note. Always confirm current rates at openai.com/pricing, platform.claude.com, ai.google.dev/pricing, and docs.x.ai/pricing.

Need context windows and output limits too? Compare the models side by side.

In the chat itself

Spend fewer tokens where you actually write them

This page prices a workload. AI Toolbox helps inside ChatGPT, Gemini, Claude and Grok, where the tokens get used.

Before you pay for it

See how many tokens a conversation has already used

This page prices a workload you describe. The Context Meter measures the conversation you are in: how full the window is, roughly how many messages are left, and a handoff that summarizes the thread into a fresh chat before the oldest turns drop out, which is also when the per-message cost of a long API thread peaks. The gauge is free on ChatGPT, Gemini, Claude and Grok.

Plan: Free: the gauge on all four platforms. Premium: hand the context to another platform.

Context Meter panel reading 479k of 500k tokens with a context window is nearly full warning, about 9 messages left, and a Continue in a fresh chat handoff

Fewer tokens per call

Reuse the prompt instead of retyping the preamble

The largest avoidable input cost is the same instructions pasted into every call. AI Toolbox keeps a prompt library inside ChatGPT, Gemini, Claude and Grok: save a prompt once, insert it by typing two slashes, and chain steps with variables so each call carries only what it needs. The free plan holds two saved prompts and five from the catalog.

Plan: Free: 2 saved prompts, 5 catalog prompts. Premium: unlimited prompts and chains.

AI Toolbox prompt library inside ChatGPT with saved prompts inserted by typing two slashes and a catalog of ready-made prompts

Use cases

Who prices tokens before spending them

  • Developers

    • Price a feature before shipping it
    • Compare providers for one endpoint
    • Find the output-heavy calls that dominate spend
    • Budget a batch job by calls per month
  • Product and finance

    • Turn a usage forecast into a monthly line
    • Check a vendor quote against list prices
    • Model a cheaper tier for the same workload
    • Set a per-user cost ceiling
  • Researchers

    • Estimate a corpus run before starting it
    • Compare summarization cost across models
    • Size a RAG pipeline per query
    • Cost an evaluation sweep
  • Agencies and consultants

    • Quote a client on real token math
    • Show the saving of a smaller model
    • Separate input from output in the estimate
    • Re-run the numbers when prices change
  • Anyone comparing subscriptions

    • Compare API pay-as-you-go with a flat plan
    • See what a month of chat replies costs raw
    • Check whether a heavy workflow beats a subscription
    • Understand why long threads get expensive
  • Cut the tokens at the source

    Install AI Toolbox for a free context gauge on all four platforms and a prompt library that stops you re-pasting the same preamble.

    Add to Chrome, free

Pricing

This calculator is free. So is a lot of the extension.

The context gauge and two saved prompts are on the free plan. Premium adds unlimited prompts and chains, folders, full-text search and export. Not an AI subscription: you keep using your own accounts and pay the providers directly.

Free

$0forever

  • This calculator, no account
  • Context window gauge on all four platforms
  • 2 saved prompts inserted with two slashes
  • 5 search results per query
Add to Chrome

Premium

$9.99/month

  • Unlimited prompts and prompt chains
  • Cross-platform context handoff
  • Unlimited folders and search
  • Bulk export in every format
Get Premium

All Access LifetimeBest value

$199one-time

  • ChatGPT, Gemini, Claude and Grok included
  • Every future AI platform we add
  • All Premium features unlocked
  • Save $197 vs single Lifetimes
Get All Access

Teams$15/seat/month

All Premium features across the four modules ยท Admin dashboard ยท Team analytics ยท $12/seat/mo billed annually ยท 14-day free trial

See Teams
  • GDPR compliant
  • Secure checkout by Polar
  • 14-day money-back on a first purchase
  • Your numbers never leave the browser

Refunds follow the refund policy; renewals are not refundable. Premium unlocks for the email you enter at checkout, so use the same address you sign in to ChatGPT with.

FAQ

API cost questions people actually ask

How is AI API cost calculated?

Per token, billed separately for input (your prompt, system instructions and any context) and output (the model's reply). Cost per call = input tokens / 1,000,000 x input rate + output tokens / 1,000,000 x output rate. This calculator multiplies that by your calls per month for monthly and yearly figures, using each provider's published per-million-token list price.

Which model is cheapest for my workload?

It depends on your input-to-output ratio. Output tokens cost 2 to 6 times more than input tokens on every listed provider, so a job that writes long replies is priced by the output rate while a summarization job is priced by the input rate. Enter your real token counts and the table ranks every model with a published price, cheapest first, for that exact shape.

Does the calculator include the long-context surcharge?

No. Every OpenAI model now carries a published list price, including GPT-6 Astra, the GPT-5.6 trio, GPT-5.5, GPT-5.4 and their Pro, mini and nano tiers, so all of them are priced here at the standard rate. OpenAI bills requests above 272K input tokens at 2x input and 1.5x output on its 1.05M-context models; if your calls are that long, double the input rate and multiply output by 1.5 before comparing.

How do I convert words to tokens?

One token is about three quarters of an English word on most models, so 1,000 words is roughly 1,333 tokens on OpenAI, Google, xAI and Claude Haiku 4.5. Claude Opus 5, Sonnet 5 and Fable 5.1 use Anthropic's newer tokenizer and take about 1,800 tokens for the same 1,000 words, which matters when you price a workload against them. For a count of a specific text, paste it into the free token counter; its estimate lands within roughly 10 to 15 percent on English prose.

Does the estimate include cached input, batch discounts or long-context surcharges?

No. It uses the standard list price per million tokens. Most providers discount cached or repeated input, some discount batch jobs, and some charge more for prompts above a context threshold. Treat the figures as a list-price ceiling and confirm the current rate card before committing a budget.

Does cost include the ChatGPT, Claude or Gemini subscription?

No. This tool estimates pay-as-you-go API cost, which is separate from a ChatGPT Plus, Claude Pro or Google AI Pro subscription. AI Toolbox is a browser extension that runs on top of the account you already have; it is not an AI subscription and does not sell model access.

Are the prices current?

Each figure carries the date it was verified against the provider's own pricing page; the provenance line under the table states them. Rate changes are noted there too: Claude Sonnet 5's $2 / $10 launch pricing is now its standard price, because Anthropic cancelled the increase it had scheduled for September 1, 2026. Always confirm on openai.com/pricing, platform.claude.com, ai.google.dev/pricing and docs.x.ai/pricing before you commit a budget.

Is this calculator free, and is anything uploaded?

Yes, with no account or sign-up, and nothing leaves your browser: the numbers you type stay on the page. The AI Toolbox extension is also free to install; the context gauge and two saved prompts are on the free plan, and Premium is $9.99/month or $99 once per module.

40,000+ users ยท 4.7/5 on the Chrome Web Store

Know the bill before the thread gets long

Install AI Toolbox for a free context gauge on ChatGPT, Gemini, Claude and Grok, and a prompt library that keeps every call short.