Global finance calculators · transparent formulas

Work / AI unit economics

LLM API Cost Calculator

Translate users, requests, prompt tokens, response tokens, and retry overhead into a monthly API estimate across source-dated OpenAI, Anthropic, and Google model prices.

  1. 01Build both cases
  2. 02Match assumptions
  3. 03Compare the trade-off

Workload

Define one workload before comparing model prices

Use measured tokens from representative requests where possible. The overhead control adds retries and repeated inference; it does not estimate fixed engineering or hosting cost.

Traffic

How often the product reaches a model provider.

Request shape

Use representative provider-reported token counts, not words or characters.

Standard on-demand text-token prices reviewed 2026-07-20; next review due 2026-08-20 by TaprobaneFi Research Desk. OpenAI’s published long-context tier is applied to the full request above 272K input tokens, and every row enforces its listed input and output limits. Cache, batch, tools, grounding, geography, taxes, and negotiated pricing are excluded.

Results

Monthly token economics

Every row uses the same traffic and token assumptions. A lower list-price estimate does not establish equivalent quality or suitability.

Lowest modeled list cost

$165

Gemini 3.1 Flash-Lite

Visible requests / month

200,000

Billed request equivalents

220,000

Includes the overhead assumption

Input / output MTok

264 / 66

Same workload, different list-price result

Shorter bars mean a lower modeled token bill. This does not compare model quality, latency, tools, cache eligibility, or contract pricing.

Gemini 3.1 Flash-Lite

$165

GPT-5.6 Luna

$660

Gemini 3.5 Flash

$990

Claude Sonnet 5 — through Aug 31, 2026

$1,188

GPT-5.6 Terra

$1,650

Claude Sonnet 5 — from Sep 1, 2026

$1,782

GPT-5.6 Sol

$3,300

Input / MTok
$5
Output / MTok
$30
Per 1K requests
$16.5

OpenAI prices the full request at $10 input and $45 output per MTok when input exceeds 272K tokens.

Limit: 1,050,000 input · 128,000 output tokens.

Input / MTok
$2.5
Output / MTok
$15
Per 1K requests
$8.25

OpenAI prices the full request at $5 input and $22.50 output per MTok when input exceeds 272K tokens.

Limit: 1,050,000 input · 128,000 output tokens.

Input / MTok
$1
Output / MTok
$6
Per 1K requests
$3.3

OpenAI prices the full request at $2 input and $9 output per MTok when input exceeds 272K tokens.

Limit: 1,050,000 input · 128,000 output tokens.

Input / MTok
$3
Output / MTok
$15
Per 1K requests
$8.91

Published standard price after the introductory period; cache, batch, and geography are excluded.

Limit: 1,000,000 input · 128,000 output tokens.

Input / MTok
$1.5
Output / MTok
$9
Per 1K requests
$4.95

Output price includes thinking tokens. Cache, batch, grounding, and tool charges are excluded.

Limit: 1,048,576 input · 65,536 output tokens.

Input / MTok
$0.25
Output / MTok
$1.5
Per 1K requests
$0.83

Text/image/video input price; audio, cache, batch, grounding, and tools use separate prices.

Limit: 1,048,576 input · 65,536 output tokens.

Continue the calculation

Useful next checks commonly used alongside LLM API Cost.

All calculators

The full guide

LLM API cost planning: turn token usage into an auditable monthly budget

By TaprobaneFi Research Desk · Reviewed and updated July 20, 2026 · Global educational edition

An LLM API budget is a usage model, not simply a model-price lookup. The bill depends on how many requests reach the provider, how much input context each request carries, how much output the model produces, and which price applies to each token category. Retries, tool calls, long-context tiers, cached prompts, batch processing, and non-text features can all move the final invoice away from a quick tokens-times-price estimate.

This calculator is designed for transparent scenarios using source-dated standard token-price presets linked to each provider's documentation. A lower modeled list-price row is not a claim that a model is cheaper in production or better for the workload, and the tool does not estimate application quality. Its job is to make the arithmetic inspectable so a team can connect product traffic, measured token usage, and an explicit pricing snapshot.

Start with measured input and output tokens

Input and output tokens are normally priced separately. Input includes the instructions, conversation history, retrieved documents, tool descriptions, and other context sent with a request. Output is what the model generates. A request count on its own is therefore not a useful cost unit: two endpoints can receive the same number of calls while one repeatedly sends a long document and the other sends a short classification prompt.

Use provider usage fields or production telemetry to calculate a representative input-token and output-token distribution. An average is useful for a first budget, but a percentile view is safer for products with occasional large contexts. Record whether the observed token count already includes retries, follow-up tool calls, and hidden orchestration steps. Counting only the user's first request can materially understate an agentic workflow.

The core monthly-cost calculation

For each priced token category, monthly cost equals monthly tokens divided by the provider's pricing unit, multiplied by the quoted price. If pricing is stated per one million tokens, 100 million input tokens at 2 currency units per million costs 200 currency units. Perform the input and output calculations separately, then add any other metered services that the calculator does not model.

Keep units consistent. A field labeled tokens per request must not receive characters, words, or bytes. Likewise, a price per million tokens must not be entered as a price per thousand. When comparing providers, use the same workload sample and the tokenizer or reported usage from each provider; the same text need not produce an identical token count everywhere.

Worked interpretation: a product with 100,000 monthly calls

Suppose an application handles 100,000 calls in a month, averaging 1,000 input tokens and 400 output tokens. That is 100 million input tokens and 40 million output tokens. With illustrative prices of USD 2 per million input tokens and USD 8 per million output tokens, the modeled cost is USD 200 for input plus USD 320 for output, or USD 520 in total.

The useful conclusion is not that the application will always cost 520. It is that output represents 320 of the modeled total even though output volume is lower. A team considering shorter responses can now estimate the budget effect without pretending that shortening output is free from quality trade-offs. If 5% of calls are retried and those retries are absent from the traffic input, a separate retry scenario should be added rather than hidden in a rounding buffer.

Illustrative token-cost bridge
ComponentMonthly volumeIllustrative rateModeled cost
Input100 million tokens2 per million200
Output40 million tokens8 per million320
Combined140 million tokensSeparate rates520

Caching, batch, context tiers, and tools need separate treatment

Official provider pages may publish different prices for cached input, cache creation, batch execution, priority processing, or longer contexts. Those categories are not interchangeable. A cache discount applies only when the provider records a qualifying cache hit; a repeated prompt in application logs is not proof that every token received the cached rate. Batch pricing may also come with different latency or processing conditions.

Tool-enabled requests can create charges outside the visible text-token line. Examples include web search, file retrieval, image or audio processing, code execution, storage, and repeated model calls made by an orchestration loop. Build a bill of materials around the workflow. Use this calculator for the token categories it exposes, then add provider-specific metered features as separately sourced lines rather than forcing them into a token price.

Compare architectures without confusing price and value

A defensible comparison replays the same representative workload, measures usage, and checks whether each setup meets the application's accuracy, latency, safety, and reliability requirements. The lowest modeled token bill is not automatically the lowest total cost if it requires more retries, longer prompts, additional validation, or a larger operational burden. Conversely, an expensive price per token can still be economical for a low-volume step that removes substantial manual work.

Scenario inputs worth preserving with the result

  • Provider, exact model identifier, service tier, region if relevant, and pricing-page review date.
  • Measured request volume plus input and output token distributions.
  • Cache-hit assumption, retry rate, tool-call frequency, and rejected-request treatment.
  • Currency, taxes or credits excluded, and any negotiated pricing omitted from public documentation.
  • Quality and latency acceptance criteria tested separately from the cost calculation.

Assumptions and limitations

The calculator produces a deterministic estimate from entered traffic and token assumptions plus the visible source-dated rate presets. It does not query provider billing APIs, predict tokenization, model tiered contract discounts, convert currencies, apply tax, value service credits, or determine whether a workload qualifies for cache or batch pricing. It also cannot estimate the business cost of latency, an incorrect answer, abuse, or a production outage.

Treat the result as a budget bridge between product telemetry and an official rate card. Reconcile it against actual provider invoices after launch. If the difference is material, investigate uncounted endpoints, retries, long-context requests, non-text tools, and rate-category assumptions before merely increasing the forecast.

Freshness and update discipline

Provider models, tiers, and prices can change. This guide and the visible standard-price presets were fact-checked on 20 July 2026, but that date is not a price guarantee. Open the linked official pricing page immediately before a purchasing or architecture decision, confirm the effective model and price categories, and save the review date with the scenario.

Refresh usage assumptions after prompt changes, model migrations, retrieval changes, or meaningful traffic shifts. A monthly review is appropriate during launch; a stable service can move to a longer cadence while still reconciling estimates with invoices. A copied price without its model, unit, and review date is not an auditable input.

This guide is educational. Calculator outputs depend entirely on the assumptions entered and do not predict investment returns, inflation, fees, taxes, or market conditions. Rules and product terms differ by country; verify any decision with current primary sources and an appropriately qualified professional. Nothing here is financial, tax, legal, or investment advice.

Interpret the number

Token price is only useful after the workload is defined

Input and output tokens have different prices, so a support bot with short answers can have very different unit economics from an agent that produces long reports even at the same request count.

Retries, fallbacks, moderation calls, tool calls, and hidden system context can make billed traffic exceed visible user messages. The overhead control keeps that gap explicit without pretending to know your architecture.

List prices change and special processing modes use different schedules. Every preset is source-linked and dated; validate it against the provider’s current price page before procurement or budgeting.

Compare the surrounding cloud infrastructure cost

Before you act

Common questions

Does the calculator include cached-token discounts?

No. It uses standard uncached text-token prices so the comparison remains reproducible. Cache writes, cache hits, batch modes, tools, grounding and geography can change the actual bill.

What should I include in request overhead?

Include expected retries, fallbacks, evaluation calls and other repeated inference that scales with the visible workload. Fixed development and hosting costs belong outside this percentage.

Are all model outputs tokenized the same way?

No. Tokenizers and reasoning-token accounting differ. Use measured input and output token counts from a representative workload when possible, not a word-count conversion.

Is the cheapest row the best model choice?

Not necessarily. Quality, latency, reliability, context limits, safety, data handling and engineering effort can be more important than list-price cost.