devtools.codes

Token & Cost Calculator

RUNS LOCALLY

Estimate what a text workload may cost across the OpenAI, Claude and Gemini APIs. Enter input tokens, output tokens and monthly requests, or use the optional rough text estimate as a starting point. Every result shows the arithmetic, pricing scope, official source and review date.

Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information.

How to use the Token & Cost Calculator

  1. Choose an API provider and model, then check the displayed pricing scope and verification date.
  2. Enter expected input and output tokens per request, or apply the clearly labelled rough text estimate.
  3. Set the monthly request volume, including retries and repeated agent steps where they are part of the workload.
  4. Read the per-request and monthly breakdown, then copy or download the pricing basis with the estimate.

A worked example, and what it shows

The example prices a workload of twelve thousand monthly requests, each with roughly 1,850 input tokens and 420 output tokens.

At the verified Claude Sonnet 5 standard rates, that example estimates $94.80 per month. The separate input and output lines show why fewer output tokens can still contribute more cost when their per-million rate is higher.

Press Example in the workspace above to load it.

Common questions about the Token & Cost Calculator

Are these prices current?

Each price carries the date it was last reviewed, shown next to the model. Providers change pricing without notice, and the provider pricing page is always authoritative. Treat the figures here as a planning estimate rather than a quotation, and check the date before relying on a number.

Will my real bill be the same as this estimate?

Not necessarily. Free tiers, batch processing, prompt caching and negotiated discounts can make a real bill lower. Long-context pricing, regional uplifts, tool calls, media, retries and taxes can make it higher. The calculator is a transparent planning baseline for standard text API usage, not a quotation or invoice forecast.

Will the token count match my provider bill exactly?

No exact match is promised. Manually entered counts are used exactly, while pasted English text uses a rough four-characters-per-token planning estimate. Actual counts depend on model, encoding and language, and providers may also bill reasoning, system instructions, tools or media. Use the provider dashboard for final usage.

Why are input and output priced separately?

Providers publish separate input and output rates, and output is often more expensive per million tokens. A single blended number would hide which part drives the estimate. Keeping the lines separate also makes the method auditable: multiply each token count by its own rate, divide by one million, then add the two costs.

Does my input leave the browser?

No. Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information. Nothing you paste is logged, stored or sent to an analytics event, and there is no account to attach it to.

Guides that use this tool