Price one LLM API call from your input and output tokens, then compare the same prompt across every current OpenAI, Anthropic, Google and xAI model.
Input is everything you send — system prompt, history, retrieved context. Output is only the reply.
Rates are the providers' own published list prices, verified on August 22, 2026. Volume agreements, prompt caching and batch pricing are not applied here. Confirm current pricing with your provider before committing to a budget.
You might also find these calculators useful
Convert words, pages or code to tokens — exact for OpenAI models
Monthly LLM API bill with caching and batch discounts
See whether your prompt fits an LLM context window
Compare self-hosted GPU vs API inference costs
Every LLM provider bills per token, and charges more for the tokens it writes than for the tokens it reads. This calculator prices a single call from your input and output token counts, then runs the same prompt through every current model so you can see what the identical work costs elsewhere.
Providers publish two rates per model, both quoted per million tokens: one for input (everything you send — system prompt, conversation history, retrieved context) and one for output (only the reply). Output is the expensive half. Across the current frontier models it runs three to five times the input rate, because generating a token requires a full forward pass while input tokens are processed in parallel.
Cost Calculation Formula
An engineer prices one call of a planned AI feature to see whether the unit economics survive contact with real traffic
A team runs its actual prompt shape through every model and picks from the price spread rather than from the marketing
An analyst prices a run of a few thousand classifications as a fixed piece of work, with no monthly commitment implied
A developer confirms whether a whole-repository prompt clears the context window, and what the long-prompt tier adds when it does
A reply of 300 tokens costs more than a prompt of 400 on every current frontier model, because output is billed at three to five times the input rate. Trimming a verbose system prompt saves less than capping max_tokens does.
Run one prompt through the comparison table and the spread between the cheapest and the most expensive model is routinely a factor of fifty or more. That is a decision worth making deliberately rather than by default.
OpenAI's GPT-5.x line re-prices a request whose input exceeds 272,000 tokens at double the input rate and one and a half times the output rate — and keeps the higher rate for the rest of the session. xAI doubles both rates above 200,000. The surcharge applies to the whole request, not only the tokens over the line.
Input plus output has to fit the published window. A prompt that overflows is not expensive, it is rejected — so the comparison marks those models rather than quoting a price you could never pay.
Output tokens are generated one at a time, each requiring a full forward pass through the model. Input tokens are processed in parallel in a single pass. The cost difference is real compute, which is why every provider prices the two separately — currently at three to five times the input rate for output on frontier models.
No. These are list prices for an uncached call. Cache read discounts are also not the uniform ninety percent commonly quoted: verified against provider documentation they range from about a thirtieth of the input rate on DeepSeek to a quarter of it on Grok 4.6, and most providers charge a premium to write the cache in the first place. The LLM API Cost Calculator models that properly, including the break-even point below which caching costs more than it saves.
Not applied here either. Only three of the five providers in this catalogue publish a batch discount at all, and where it exists it halves both rates in exchange for a delayed response. If a delay is acceptable for your workload, model it in the LLM API Cost Calculator rather than assuming the discount applies.
Tokenisation is model-specific, so there is no universal words-to-tokens ratio. As a working estimate, English prose runs roughly three-quarters of a token per word and code runs denser. The Token Count Calculator converts words, pages or code to tokens using each model's own tokenizer family.
No. It is a plain count — the number of identical calls you want priced as one piece of work. This calculator deliberately does not infer a time period from it. For a per-day rate that becomes a monthly bill, use the LLM API Cost Calculator, which asks for requests per day and applies a 30.44-day month.
No. This calculator prices inference on a base model. Fine-tuning is billed separately — a training charge per million training tokens, and in most cases a higher inference rate afterwards for the resulting model. Those are different rate cards and are not in this comparison.