LLM API Cost Calculator
The LLM API cost calculator estimates monthly spend for ten current models from OpenAI, Anthropic, and Google. It multiplies average input and output tokens per request by monthly request volume, divides each total by one million, and applies each provider's published per-million-token rates: monthly cost equals input millions times the input rate plus output millions times the output rate. All prices are standard pay-as-you-go rates in US dollars, verified October 2026.
Prices last verified October 20, 2026. Figures are estimates in US dollars; confirm with each provider before committing.
Enter your average input and output tokens per request and your monthly request volume, and the table compares what that traffic costs per month on ten current models from OpenAI, Anthropic, and Google. Each row splits the total into input cost and output cost, and the cheapest row is highlighted unless two models tie, as GPT-6 Luna and Claude Haiku 5.5 do at every volume with identical rates. The two figures below the table show your monthly token volume in millions, the unit every provider's price list is quoted in. The math runs entirely in your browser and nothing you type is sent anywhere.
How token pricing works
Every major LLM API bills the same way: one rate per million tokens the model reads, a separate and always higher rate per million tokens it generates. A token is the model's own unit of text, produced by a subword tokenizer, usually a byte-pair-encoding one, and comes out to roughly four characters of English, so a thousand tokens is about 750 words. The calculator converts your per-request averages into monthly volume and applies both rates for each model:
monthly = (tokensin × requests ÷ 1,000,000) × ratein + (tokensout × requests ÷ 1,000,000) × rateout
With the defaults, 1,200 input tokens and 400 output tokens across 100,000 requests, you accumulate 120 million input and 40 million output tokens a month. On Claude Opus 5.5 at $4 and $20 per million that is 120 × 4 + 40 × 20 = $1,280.00. The identical traffic on GPT-6 Luna is 120 × 0.10 + 40 × 0.50 = $32.00. A 40x spread for the same workload is why model choice is usually the largest single lever on an LLM product's unit economics, ahead of prompt trimming and well ahead of infrastructure.
Where per-token billing came from
The token was a unit of text long before it was a unit of price. Byte-pair encoding started as a data-compression method that Philip Gage described in 1994, and it returned to language work when Rico Sennrich, Barry Haddow, and Alexandra Birch adapted it for neural machine translation, in a paper published at ACL 2016, as a way to split rare words into reusable subword pieces. GPT-2 and GPT-3 used a byte-level version of that scheme, which is why the token became the natural thing to meter: the compute a request needs scales with how many tokens the model processes, not with wall-clock time or the number of calls.
OpenAI turned that unit into a bill in 2020. The GPT-3 API opened as a private beta in June 2020, was free during an initial trial period, and moved to paid plans on 1 October 2020, built as tiered monthly subscriptions with a token allowance rather than the pure meter that came later: 100,000 tokens free, $100 a month for two million, $400 a month for ten million, and a custom tier above that. Four base models were offered, named Ada, Babbage, Curie, and Davinci in ascending order of size, from 350 million parameters to 175 billion, with Davinci the most expensive. Earlier commercial text APIs had metered by the character, as Google Translate did, so charging by the token was a small but consequential shift toward billing in the model's own currency.
The rate structure this calculator inherits took shape in 2023. On 1 March 2023 OpenAI released gpt-3.5-turbo at $0.002 per thousand tokens, which it called ten times cheaper than its earlier GPT-3.5 models. Two weeks later, on 14 March 2023, two things landed the same day: OpenAI announced GPT-4 at $30 per million input tokens and $60 per million output, and Anthropic introduced Claude alongside the faster Claude Instant through its own API. GPT-4 is where the split every row of the table now uses became standard, an input rate and a distinctly higher output rate rather than one blended number. Google announced its PaLM API the same day, and that lineage runs forward into Gemini.
Prices have fallen steeply since. GPT-4 worked out to about $36 per million tokens at launch on a typical read-heavy mix; GPT-4o followed in May 2024 at $5 input and $15 output and was cut to $2.50 and $10 that August. The models in the table below are newer and the names have moved on, but the shape, two rates per model quoted per million tokens, is the one fixed in 2023.
Current API prices
The table below reads from the same data file the calculator uses, so the two cannot drift apart. Rates are standard pay-as-you-go prices in US dollars per million tokens, taken from OpenAI's, Anthropic's, and Google's published pricing pages and verified October 2026. The note column lists long-prompt surcharges and when temporary prices end.
| Model | Provider | Input per 1M | Output per 1M | Note |
|---|---|---|---|---|
| GPT-6 Astra | OpenAI | $10 | $50 | Prompts over 272K input tokens bill the whole request at 2x input and 1.5x output. |
| GPT-6.1 Sol | OpenAI | $2 | $10 | Prompts over 272K input tokens bill the whole request at 2x input and 1.5x output. |
| GPT-6 Luna | OpenAI | $0.1 | $0.5 | Prompts over 272K input tokens bill the whole request at 2x input and 1.5x output. |
| Claude Fable 5.1 | Anthropic | $10 | $50 | Same rate across the full 1M-token context window. |
| Claude Opus 5.5 | Anthropic | $4 | $20 | Same rate across the full 1M-token context window. |
| Claude Sonnet 5.5 | Anthropic | $2 | $10 | Same rate across the full 1M-token context window. |
| Claude Haiku 5.5 | Anthropic | $0.1 | $0.5 | Rate for prompts up to 100,000 tokens; longer prompts bill at $0.50 input and $2.50 output. |
| Gemini 4 Argon | $2 | $10 | Introductory rate through 30 November 2026; $4 input and $20 output from 1 December 2026. | |
| Gemini 3.8 Flash | $0.75 | $3.75 | Reduced rate through 31 December 2026; $1.50 input and $7.50 output from 1 January 2027. | |
| Gemini 3.5 Flash-Lite | $0.3 | $2.5 | Same rate for text, image, video and audio input. |
Two notes on reading it. Two Google rates are temporary: Gemini 4 Argon rises from $2/$10 to $4/$20 on 1 December 2026, and Gemini 3.8 Flash doubles to $1.50/$7.50 on 1 January 2027. And the spread within each provider is deliberate tiering: on output, OpenAI's GPT-6 line spans 100x from Luna to Astra, Anthropic's 100x from Haiku to Fable, and Google's 4x from Flash-Lite to Argon, 8x once Argon's introductory price ends.
How the bill scales
The same formula behaves very differently at three sizes. A hobby chatbot serving 5,000 requests a month at 800 input and 300 output tokens accumulates 4 million input and 1.5 million output tokens; on GPT-6 Luna that is 4 × 0.10 + 1.5 × 0.50 = $1.15, and even Claude Opus 5.5 reaches only 4 × 4 + 1.5 × 20 = $46.00, so the sensible move is to pick the smartest model and ignore cost. A startup at the defaults, 100,000 requests at 1,200 and 400 tokens, pays $1,280.00 on Opus 5.5, 120 × 2 + 40 × 10 = $640.00 on Claude Sonnet 5.5, and $32.00 on GPT-6 Luna or Claude Haiku 5.5; this is the scale where routing the easy majority of requests to a cheap model starts to pay. A scale-up at 2 million requests with 2,000 input and 600 output tokens moves 4 billion input and 1.2 billion output tokens a month, where Sonnet 5.5 costs 4,000 × 2 + 1,200 × 10 = $20,000.00 and Claude Haiku 5.5 costs 400 + 600 = $1,000.00, and the annual gap between those two choices runs into six figures.
Input and output are different products
Every model in the table charges at least 5x more for output than input, because generation is sequential while reading is parallel: the model emits one output token per forward pass but ingests the whole prompt in one. That asymmetry means your workload's shape matters as much as its size. At the defaults, input is 75 percent of your tokens but only 37.5 percent of your Opus 5.5 bill: $480.00 of input against $800.00 of output. A retrieval-augmented application inverts the ratio further, stuffing several thousand tokens of fetched context into each request to get a two-sentence answer back, so its bill tracks the input rate almost entirely; code generation and long-form writing do the opposite. Before comparing providers, check which rate your own traffic keys on, because a model with cheap input and expensive output can beat a nominally cheaper rival on retrieval work and lose badly on generation.
What the estimate leaves out
This is a list-price ceiling, not a forecast of your invoice. Prompt caching is the biggest omission: all three providers discount input tokens that repeat across requests, with Anthropic billing cache reads at a tenth or less of the normal input rate, so an application with a long shared system prompt can cut input cost by half or more. Batch processing is the second: a 50 percent discount for asynchronous jobs with results inside 24 hours is the common shape across OpenAI, Anthropic, and Google. Both are excluded because cache hit rates and batch eligibility vary too much between workloads to assume a number honestly. Long context cuts the other way: a GPT-6 prompt over 272,000 input tokens bills the whole request at 2x input and 1.5x output, and Claude Haiku 5.5 rates rise fivefold past 100,000 prompt tokens, so a very-long-prompt workload can land above the table, as will the Google rows once their temporary prices end. Also outside the model are free tiers, negotiated enterprise rates, fine-tuned model surcharges, and rate limits that may push traffic onto a second model regardless of price. If your workload is cache-friendly or latency-insensitive and your prompts stay inside each provider's standard context tier, read the table as an upper bound and expect to land below it. Running an open-weight model on your own GPUs avoids per-token billing altogether, and the LLM VRAM calculator sizes the hardware it needs.
Prices change without notice and figures here are estimates, not quotes; this site is not affiliated with any provider named above. See the site disclaimer.
Frequently asked questions
How much does the Claude API cost in 2026?
Per Anthropic's published rates, Claude Fable 5.1 is $10 per million input tokens and $50 per million output, Claude Opus 5.5 is $4/$20, and Claude Sonnet 5.5 is $2/$10, each at the same rate across its full 1M-token context window. Claude Haiku 5.5 is $0.10/$0.50 for prompts up to 100,000 tokens and $0.50/$2.50 for longer prompts.
What does GPT-4o cost, and what replaces it?
GPT-4o is still listed at $2.50 per million input tokens and $10 per million output tokens, but OpenAI has scheduled its gpt-4o snapshots to shut down on 14 January 2027 and names GPT-6 Luna as the replacement. Luna costs $0.10 input and $0.50 output, so moving a GPT-4o workload to it cuts the input rate by 96 percent and the output rate by 95 percent.
What did Claude 3.5 Sonnet cost?
Claude 3.5 Sonnet was priced at $3 per million input tokens and $15 per million output for its entire run, until Anthropic retired it in October 2025. Anthropic names Claude Sonnet 5.5 as its replacement, at $2 input and $10 output, a third less on both rates, so old cost models built on 3.5 Sonnet numbers now overstate the bill by half.
What was Gemini 1.5 Pro's API pricing?
Gemini 1.5 Pro cost $1.25 per million input tokens and $5 per million output for prompts up to 128k tokens, with both rates doubling on longer prompts. Google's current flagship, Gemini 4 Argon, is $2 input and $10 output on an introductory price through 30 November 2026 and $4 and $20 from 1 December, so a short-prompt workload costs more than it did on 1.5 Pro either way.
Why do output tokens cost so much more than input tokens?
Generation is sequential: the model produces one token per forward pass, while input tokens are processed in parallel in a single pass. Nine of the ten models in this calculator charge exactly 5x as much for output, from GPT-6 Luna at $0.10 in and $0.50 out to Claude Fable 5.1 at $10 in and $50 out, and Gemini 3.5 Flash-Lite goes further at about 8.3x, $0.30 in and $2.50 out. Workloads that read a lot and write a little are cheap per token; workloads that write a lot are not.
How many tokens does a typical API request use?
A token is roughly four characters of English, so 1,000 tokens is about 750 words. The defaults here, 1,200 input and 400 output tokens, model a chat request with a moderate system prompt and a few paragraphs of answer. RAG requests often run 3,000 to 8,000 input tokens because retrieved documents ride along, while classification calls can be under 200 in each direction.
Sources
- Pricing (OpenAI API docs), OpenAI
- Pricing (Claude API docs), Anthropic
- Gemini Developer API pricing, Google AI for Developers
- Neural Machine Translation of Rare Words with Subword Units, Association for Computational Linguistics, 2016
- Introducing Claude, Anthropic, 2023
- Deprecations (OpenAI API docs), OpenAI
- Model deprecations (Claude API docs), Anthropic