LLM Cost Calculator

Estimate token-based API cost for a single request or a repeated workload. This page is an estimate tool, not a billing export or invoice reconciliation view.

Estimate model usage cost
Choose a provider and model, then enter the token counts you expect per request. Switch to repeated mode when you want a daily or monthly workload estimate.

Calculation mode

This calculator focuses on OpenAI, Anthropic, and Google, with broader model coverage inside each supported provider.

Model pricing is driven by a local pricing table verified against the official source links shown below.

Use billable prompt tokens before any cache savings are applied.

Use the completion or response tokens you expect back from the model.

Count only the input tokens billed at the cached-input rate. Cached tokens should not exceed total input tokens.

Used only in repeated mode. Enter how many requests you expect per day or per month.

Workload horizon

Results are approximate. Provider billing rules, tokenizer differences, retries, and add-on features can change your final bill.

Pricing is currently sourced from @pydantic/genai-prices plus our model mapping layer. Official provider pricing pages remain the source of truth.

Accuracy notice

This calculator is a best-effort estimate, not an exact billing system. Prices can be incomplete or drift because model providers do not publish perfectly machine-readable pricing data for every billing rule and pricing tier.

If you are making a finance, procurement, or production rollout decision, verify the selected model against the provider's official pricing page before relying on the estimate.

Estimated cost breakdown
The result card shows per-request cost, the selected workload total, and how input, output, and cached-input pricing contribute to the estimate.

Choose a model and token counts to see the estimate

The calculator will estimate per-request cost first, then scale it to a daily or monthly workload if you enable repeated mode.

AI Cost Planning

How this LLM cost calculator works

The first release stays simple on purpose: you bring the token counts, the page applies the selected model's local pricing table, and the result scales to a daily or monthly workload when needed.

Choose a provider and model
Pick one of the supported models from OpenAI, Anthropic, or Google.
Enter token counts
Fill in input, output, and optional cached-input tokens for one request.
Scale the estimate
Switch to repeated mode when you want the same request estimate projected across a daily or monthly workload.

Notes and boundaries

This page estimates token-based API cost from a third-party aggregated pricing dataset plus our current model mapping. It does not attempt to reconcile exact provider invoices, billing exports, tool-use charges, or retries.

Cached-input pricing is provider-specific. In this calculator, cached tokens are treated as a discounted portion of input tokens rather than extra tokens on top of the prompt.

Some providers apply special long-context, batch, grounded-search, or regional-processing pricing. The assumptions panel shows what is modeled in the current estimate, but official provider pages still win when there is any mismatch.

LLM cost calculator FAQ

How is LLM cost calculated?
The calculator multiplies the selected model's per-million-token rates by your input, output, and cached-input token counts, then scales the result by request volume when repeated mode is enabled.
What is the difference between input and output tokens?
Input tokens are the prompt tokens you send to the model. Output tokens are the tokens the model returns in its response.
What are cached tokens?
Cached tokens are prompt tokens billed at a discounted cached-input rate when the provider supports prompt caching or an equivalent cache mechanism.
Why might this estimate differ from my actual bill?
Real bills can differ because of tokenizer differences, retries, tool calls, grounding, long-context tiers, regional processing, provider-side pricing changes, and differences between aggregated pricing data and the provider's final billing logic.
Which providers and models are included?
The page currently focuses on OpenAI, Anthropic, and Google, and aims to cover a broader set of their priced text and reasoning models while still excluding categories like image, audio, embedding, and other non-comparable SKUs.

Related AI planning tools

These tools sit next to LLM cost math in the planned AI cluster and help users move from pricing to comparison and token planning.

Next
AI Model Pricing Comparison
Compare model pricing and specs side by side when the task moves from one estimate to cross-model research.
Coming soon
Next
Context Budget Planner
Plan how much context room and token budget a recurring workload needs before you run it in production.
Coming soon
Next
PDF Token Estimator
Estimate how many tokens a document may consume before it reaches an API workflow.
Coming soon