We Value Your Privacy

We use cookies to enhance your browsing experience and analyze site traffic. All calculations happen locally in your browser - we never see or store your data. Learn more in our Privacy Policy

/
/
CalculateYogi
  1. Home
  2. Technology
  3. Prompt Cost Calculator
Technology

Prompt Cost Calculator

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.

Common prompt shapes

Model

Prompt shape

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.

Did this calculator solve your problem today?

Contributor

Reviewed by

Last updated: August 23, 2026
SupportI build these free tools with love, late nights, and way too much coffee. If this calculator helped you, a small donation would mean the world to me and help keep this site running. Thank you for your kindness!

Related Calculators

You might also find these calculators useful

Token Count & Word Converter

Convert words, pages or code to tokens — exact for OpenAI models

LLM API Cost Calculator

Monthly LLM API bill with caching and batch discounts

Context Window Calculator

See whether your prompt fits an LLM context window

AI Inference Cost Calculator

Compare self-hosted GPU vs API inference costs

What One API Call Actually 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.

How Per-Token Pricing Works

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

How to Use This Calculator

1

2

3

4

5

Common Use Cases

Costing a feature before it ships

An engineer prices one call of a planned AI feature to see whether the unit economics survive contact with real traffic

Choosing between models

A team runs its actual prompt shape through every model and picks from the price spread rather than from the marketing

Pricing a one-off batch

An analyst prices a run of a few thousand classifications as a fixed piece of work, with no monthly commitment implied

Checking a long-context call

A developer confirms whether a whole-repository prompt clears the context window, and what the long-prompt tier adds when it does

Why Price a Prompt Before You Ship It

Output is where the money goes

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.

The same prompt varies by orders of magnitude

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.

Long prompts change the rate, not just the total

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.

A context window is a hard limit, not a soft one

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.

Frequently Asked Questions

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.

CalculateYogi

The most comprehensive calculator web app. Free, fast, and accurate calculators for everyone.

Calculator Categories

  • Math
  • Finance
  • Health
  • Conversion
  • Date & Time
  • Statistics
  • Science
  • Engineering
  • Business
  • Everyday
  • Construction
  • Education
  • Technology
  • Food & Cooking
  • Sports
  • Climate & Environment
  • Agriculture & Ecology
  • Social Media
  • Other

Company

  • About
  • Contact
  • Contributors

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy

© 2026 CalculateYogi. All rights reserved.

Sitemap

Made with by the AppsYogi team