USD · text tokens · rate snapshot: September 26, 2026

AI API Token Cost Calculator

Estimate a request, multi-step workflow, and monthly budget. Adjust provider rates to match your current bill before using a forecast.

1. Model and workload

Presets are illustrative, not provider token counts. One workflow can trigger multiple paid model calls.

2. Editable rates (USD per 1 million tokens)

Cache assumes one initial write per workflow, then a hit rate on subsequent model calls. If the reusable prefix is too short or changes, actual savings can be lower. Google explicit cache storage fees are excluded.

Batch is for eligible asynchronous work. The scenario discounts eligible token charges. Gemini cached reads retain their listed rate; cache storage fees are excluded. Verify endpoint eligibility.

Estimated costs

Per model call—
Per workflow—
Monthly estimate—

— input/cache · — output (monthly)

Standard monthly baseline (no cache/batch)—
Scenario savings vs baseline—
Annual projection at same workload—
Workflows until monthly budget reached—

Planning estimate only. Text-token charges omit images, audio, tool/search calls, taxes, minimums, platform markups, retries, and provider-specific context tiers. OpenAI pricing · Claude pricing · Gemini pricing.

Last rate review: September 26, 2026

A chatbot that costs a fraction of a cent per answer can still become an expensive product once it handles thousands of requests, retrieves long documents, and runs several model calls for every user action. The useful question is not simply, “What is this model’s price per million tokens?” It is, “What will my complete workflow cost at my expected volume?”

Use the AI API Token Cost Calculator above to estimate cost per model call, per user workflow, per month, and against a monthly budget. The built-in OpenAI, Anthropic, and Google rates are an editable snapshot, not live prices. Check the provider’s current rate and your own billed usage before making a financial commitment.

How to use this LLM token pricing calculator

First select a model or enter custom rates. The tool includes GPT-4.1 mini, GPT-5, Claude Sonnet 4.5, and Gemini 2.5 Flash as examples of paid, direct-provider, text-token pricing. The input, output, cached-read, and cache-write rates remain editable. That matters because model prices change, and a reseller or cloud platform may charge differently from the model provider.

Next enter input tokens per model call and output tokens per model call. Input includes instructions, system messages, conversation history, retrieved documents, and tool results sent back to a model. Output includes generated text and, for some reasoning models, billed reasoning tokens. Use usage data from your provider dashboard or API response if you have it. A word-to-token conversion is only a rough planning shortcut: language, code, punctuation, formatting, and tokenizer can change the count.

Then specify calls per workflow. A simple Q&A feature may use one model call. A document assistant might rewrite the user question, search, generate an answer, and critique it. Those are separate calls even if the customer sees one final response. Multiply by workflows per day and billing days per month to estimate volume. If the steps have very different token sizes or models, run separate scenarios and add their costs rather than using one average.

The workload examples—RAG support, code review, long-form writing, and a multi-agent pipeline—fill in illustrative token counts and call counts. They are starting points to edit, not claims about what your application consumes. Finally, enter a monthly budget to see whether the current scenario fits and how many similar workflows that budget can support.

The formula behind an AI API cost estimate

For a workload without caching or batch processing:

Monthly calls = workflows per day × billing days × model calls per workflow

Monthly cost = monthly calls × [(input tokens per call × input price per 1M) + (output tokens per call × output price per 1M)] ÷ 1,000,000

Suppose a GPT-4.1 mini workload uses 2,000 input tokens and 500 output tokens per call, 100 workflows daily, one call per workflow, and 30 billing days. At $0.40 per million input tokens and $1.60 per million output tokens, the input charge per call is $0.0008 and the output charge is $0.0008. The estimated cost is $0.0016 per call or $4.80 for 3,000 calls. This excludes other API features, retries, and taxes. Rates are from OpenAI’s published model page as reviewed above; check again before publication or purchase.

Now imagine that every customer action uses five similar model calls. At the same volume, the baseline becomes about $24 per month. This is why a multi-agent AI API monthly budget should be based on all model invocations, not just visible user messages. A retriever that sends lengthy documents into several stages can also make the average input considerably larger than the example.

Current pricing examples for OpenAI, Claude, and Gemini

The following table is a limited snapshot of paid, direct API, text-token rates in USD per one million tokens, reviewed September 26, 2026. It is not an exhaustive model catalog. The calculator lets you overwrite every rate.

Sources: GPT-4.1 mini model pricing, GPT-5 model pricing, Claude API pricing, and Gemini Developer API pricing. These pages can be updated. Google lists an additional context-cache storage rate for Gemini; the calculator excludes it. Claude’s one-hour cache write costs more than its five-minute write, so edit that rate when applicable.

Do not conclude that the cheapest token rate always produces the cheapest usable answer. Models can differ in output length, tool use, reasoning tokens, retry rate, latency, quality, and required prompt length. Measure the same representative task across candidates and compare the cost of a successful result.

Prompt caching: reads, writes, and the break-even point

Prompt caching can reduce repeated input charges when the provider recognizes reusable content. Typical candidates are stable system instructions, a long reference document, or a common prompt prefix. A cache hit is not the same as declaring that 80% of your users have the same question. The repeated part of the input must qualify under the provider’s rules and actually be reused.

This calculator separates reusable input share from cache hit rate. For example, 60% reusable input and an 80% hit rate means the reusable portion of later calls is read from cache 80% of the time under the scenario. The rest remains at the standard input rate. The model also charges an initial write of the reusable prefix once per workflow. That assumption is deliberately visible; actual cache lifetimes and cross-workflow reuse vary by provider and application.

Cache writes matter. Anthropic lists a five-minute write at 1.25 times its standard input rate, a one-hour write at 2 times, and a standard hit at one-tenth of the base input rate for Claude Sonnet 4.5. If a prefix is written once and never read again, caching can increase the bill. If it is read repeatedly before expiration, savings can outweigh the write. OpenAI and Google have different mechanisms and billing categories, so avoid applying a generic “90% discount” to all tokens. The calculator may display negative savings when the modeled cache write costs more than the reads save; that is useful information, not a bug.

For Gemini, explicit context caching also carries token-storage charges over time. Those storage fees are excluded from this calculator. For a large document cached for hours, add the official storage price separately. Confirm minimum token requirements, cache duration, and actual usage counters in the provider’s documentation before treating the forecast as a purchasing estimate.

Batch API versus real-time requests

Batch processing may lower token prices when work can wait. Google publishes half-price input and output rates for eligible Gemini 2.5 Flash batch requests; its cached-read rate and storage rate are listed separately. Anthropic and OpenAI also provide batch options with model and endpoint conditions. Check whether your chosen model, features, and workflow are eligible rather than assuming every request receives a flat discount.

The calculator’s batch setting asks for the share of calls eligible for a 50% token-charge scenario. If only 40% of calls can run asynchronously, it does not discount the other 60%. Gemini cached reads retain their listed cached-read rate in the model. This is a planning simplification; vendor invoices may apply pricing to token categories with further details. Verify the applicable rate table, cache interaction, and processing timeline before switching production traffic.

Customer-facing chat, fraud checks, and interactive editing may need immediate responses. A nightly summarization job or offline document classification can often tolerate a queue. Split those workloads instead of forcing all calls into one pricing mode. The biggest operational question is whether the delay fits the user experience and whether failure and retry handling will introduce additional work.

What a 1,000-word article actually costs

A rough English-language planning conversion might put 1,000 words near 1,300 tokens, but no single ratio is accurate across tokenizers and content. The final article can also require several passes: research notes, an outline, a draft, editing, and a quality check. Every pass may send instructions and earlier text back as input and generate new output. A “1,000-word article” is therefore not necessarily a 1,300-token API job.

Start with a small representative batch and record the provider’s actual input and output usage per stage. Add the results, including failed attempts and retries, then enter an average call shape or estimate each stage separately. If an API returns a usage breakdown for cached reads, use it to replace the calculator’s assumed hit rate. A sampled workload is more defensible than guessing prompt tokens from visible word count alone.

The same principle applies to RAG. Retrieved chunks, citations, and conversation history can dominate the input side. Restricting retrieval to useful material may save tokens and improve relevance. But shrinking a prompt too far can reduce answer quality and create retries, so measure both spend and successful task completion.

Four ways to keep an AI API budget under control

1. Route by task complexity. Try a lower-cost model for routine classification or formatting and reserve a more capable one for difficult cases. Measure quality on representative tasks before deploying the routing rule. A cheap model that frequently needs a second attempt can cost more than expected.

2. Make repeated context cacheable. Keep stable instructions and reusable documents in a form supported by the provider, and monitor real cache-hit metrics. Account for writes, expiration, and storage. Cache savings are earned by actual reuse; the toggle itself does not change the API bill.

3. Move delay-tolerant jobs to eligible batch processing. This can help large offline workloads. Separate them from requests that need an immediate reply. Evaluate the provider’s current eligibility and billing categories, then measure actual completed jobs, not just submitted jobs.

4. Set a budget guardrail. Compare projected monthly spend with an internal limit, monitor daily volume and average tokens, and alert on unusual changes. The calculator’s “workflows until budget reached” is a planning ratio. It is not a vendor-enforced cap or an alert service. Use actual provider billing limits and your own observability to prevent surprise charges.

If you also buy subscriptions to writing, design, and automation tools, those fixed fees belong in a wider software budget. GigTaxGuidePro’s AI Tool Usage Cost Calculator addresses tool usage, ROI, and waste; this page focuses on variable API token spend.

Limits of this calculator

The tool estimates text-token charges with editable per-million rates. It does not call a provider tokenizer or fetch live prices. Presets are hypothetical. It does not include image, audio, video, search or tool calls, embeddings, fine-tuning, tax, cloud-platform markups, retries, free-tier credits, unusual context tiers, or Gemini cache storage. Reasoning and thinking tokens should be included in the billed output token count when applicable. The same average call shape is applied to each step of a workflow, so model mixes should be estimated separately and summed.

An estimate is useful for comparing scenarios, deciding what to measure, and setting a preliminary budget. Your provider usage logs and invoice remain the source of truth. Recheck prices and re-run representative workloads as models and features change.

Frequently asked questions: AI API Token Cost Calculator

How much does one million AI tokens cost?

There is no single price. Providers charge different rates for input, output, cached reads, and sometimes cache writes or storage. The four examples above range from cents to multiple dollars per million depending on the model and category. Specify the model and token type before quoting a figure.

Are output tokens always more expensive than input tokens?

They are more expensive in the models shown in this table, but the ratio is not universal across every model and billing tier. Use the model’s published rate and your measured input/output mix. A long answer or reasoning-heavy workload can shift the cost toward output.

Does a bigger context window automatically cost more?

A larger available window does not itself mean every request uses the maximum. You pay for tokens actually processed, subject to the provider’s pricing conditions. Some models have long-context rate tiers, and sending the same growing conversation repeatedly can increase billed input. Check your model’s current rules.

Can I combine prompt caching and batch discounts?

Some providers allow combinations, but the categories and rates differ. For instance, Gemini 2.5 Flash’s published batch table retains a separate cached-read price. Confirm the exact model and endpoint; do not multiply every rate by two generic discount percentages.

Is this an OpenAI API cost calculator only?

No. The examples include OpenAI, Claude, and Gemini, and the custom-rate option can model another text API. Rates are editable because pricing changes and some providers bill additional features separately.

How should I estimate a multi-agent pipeline?

Count every billed model invocation triggered by one user workflow. Use the calls-per-workflow input when the steps are similar. If one stage uses a different model or much longer context, calculate each stage separately and add the monthly estimates. Include retries from real usage data once available.

Scroll to Top