Skip to content

LLM Token Cost Calculator for API Pricing

Estimate text-token spend across GPT, Claude, Gemini, DeepSeek and Mistral with caching, Batch, retries and long-context rates.

DeveloperUpdated November 2, 2026

Your Inputs

Local estimate
Representative workload

Use tokens per API call. Completed tasks and calls per task are separate.

Using direct input: 1,600 tokens per API call

o200k_base runs locally as a planning estimate. Message wrappers, tools, files, images and other providers’ tokenizers can produce different billing counts. Pasted text replaces the direct input value.

01,000,000
0300,000
Volume and model
010,000,000
0.120
0%100%
ModeliStatic source-linked text-token prices, not a live billing feed.

Processing

Standard list rate; long-context adjustment applied per call. Base prompt tier applied.

Caching, reasoning, custom rates and other charges
0%100%
01,000,000
Cache-write Duration / Rate
0300,000
$
Estimated Monthly Totallive

$489.72

GPT-6.1 Terra · Published API rate · Standard · $0.004081 per completed task

Compositiontoken + entered charges
Uncached input: $203.52Visible output: $286.20
per month$489.72
  • Uncached input$203.5242%
  • Visible output$286.2058%
Breakdown
Token and Storage Charges / Month$489.72
Other Entered Charges / Month$0.00
Total Cost per Completed Task$0.004081
Token Cost per API Call$0.003850
Billable API Calls / Month127,200
Input Tokens / Month203,520,000
Billed Output Tokens / Month57,240,000
Annual Total$5,877
Cheapest Feasible RowClaude Haiku 5.5 · $48.97
Assessment
010010PRICE EFFICIENCY — HIGHER TOKEN COST

Ratio to the cheapest feasible row in this table. Cost only—not model quality, latency, availability or task success.

GPT-6.1 Terra: $489.72 per month; within modeled limits

Per 1K completed tasks

$4.08

Includes entered monthly charges

Cache-read savings

$0.00

Before cache writes and storage

Completed tasks per dollar

245.04

Uses the total monthly estimate

All models at your workload

Selected model uses its chosen rate card; other rows use their default published card. USD per million text tokens.

Cheapest feasible: Claude Haiku 5.5

Model / sourceRate cardIn / cache / outModeLimit checkMonthly
Claude Haiku 5.5Anthropic · FastPublished global API rateGlobal routing; US-only inference and Fast mode excluded$0.1
$0.01
$0.5
StandardWithin modeled limits$48.97
GPT-6 LunaOpenAI · FastPublished API rateStandard list rate; long-context adjustment applied per call$0.1
$0.01
$0.5
StandardWithin modeled limits$48.97
Mistral Small 4Mistral AI · Open-weightPublished standard rateUSD direct API rate; regional and Priority tiers excluded$0.15
$0.015
$0.6
StandardWithin modeled limits$64.87
DeepSeek V4.1 FlashDeepSeek · Open-weightPeak rateWeekdays 01:00–04:00 and 06:00–10:00 UTC, excluding Chinese public holidays$0.3
$0.006
$1.2
StandardWithin modeled limits$129.74
Gemini 3.5 Flash-LiteGoogle · FastPublished paid-tier rateText input; audio, grounding and other tools excluded$0.3
$0.03
$2.5
StandardWithin modeled limits$204.16
Mistral Large 4Mistral AI · Open-weightPublished standard rateUSD direct API rate; regional and Priority tiers excluded$0.7
$0.07
$2.1
StandardWithin modeled limits$262.67
Gemini 3.8 FlashGoogle · FastIntroductory rateValid through December 31, 2026$0.75
$0.075
$3.75
StandardWithin modeled limits$367.29
GPT-6.1 TerraOpenAI · BalancedPublished API rateStandard list rate; long-context adjustment applied per call$1
$0.05
$5
StandardWithin modeled limits$489.72
DeepSeek V4 ProDeepSeek · Open-weightPeak rateWeekdays 01:00–04:00 and 06:00–10:00 UTC, excluding Chinese public holidays$1.32
$0.044
$3.96
StandardWithin modeled limits$495.32
Claude Sonnet 5.5Anthropic · BalancedPublished global API rateGlobal routing; US-only inference and Fast mode excluded$2
$0.1
$10
StandardWithin modeled limits$979.44
Gemini 4 ArgonGoogle · FrontierIntroductory rateValid through November 30, 2026; synchronous max output shown$2
$0.1
$10
StandardWithin modeled limits$979.44
GPT-6.1 SolOpenAI · FrontierPublished API rateStandard list rate; long-context adjustment applied per call$2
$0.1
$10
StandardWithin modeled limits$979.44
Claude Opus 5.5Anthropic · FrontierPublished global API rateGlobal routing; US-only inference and Fast mode excluded$4
$0.2
$20
StandardWithin modeled limits$1,958.88
GPT-6 AstraOpenAI · FrontierPublished API rateStandard list rate; long-context adjustment applied per call$10
$1
$50
StandardWithin modeled limits$4,897.20

Verdict: Higher token cost

Rank 8 of 14 by monthly price. Claude Haiku 5.5 is $440.75 lower per month ($5,289 per year) at its displayed rate card. Evaluate output quality and task success before switching.

Rate basis and exclusions

Static source-linked snapshot, not a live billing feed. Long-context tiers apply to the whole call. Daily figures use a 30-day average. Media, audio, embeddings, tools, retrieval, search, quality, latency, taxes and account-specific adjustments are excluded unless entered in Other monthly charges. Open OpenAI pricing

Saved cost scenarios

No saved scenarios yet

Save up to three configurations from the results panel and Swiftly will line them up side by side, flagging the best value automatically.

What this calculator does

Turn a representative API workload into a monthly planning estimate. Count plain text locally, separate completed tasks from API calls, and compare source-linked input, cached-read, output, Batch and long-context rates without treating price as a measure of model quality.

Figures this model assumes

Sources & method →
  • 01Billable calls = completed tasks × calls per task × (1 + retry allowance)
  • 02Default Terra workload: 127,200 billable calls and $489.72 monthly token cost
  • 03OpenAI long-context threshold: above 272K prompt tokens; whole-call rates apply
  • 04Claude Haiku 5.5 higher-rate threshold: above 100K prompt tokens
  • 05Gemini later-rate cards start December 1, 2026 or January 1, 2027 by model
  • 06Catalog: 14 source-linked models across five providers, plus custom rates

The complete guide

LLM Token Cost & API Pricing Guide

Updated November 2, 2026

01Start with the shape of one API call

An LLM token cost calculator needs more than a monthly request count. Record the input tokens, visible output tokens and billed reasoning tokens for a representative call. Input includes instructions, conversation history and retrieved text. Cached reads and explicit cache writes belong in separate inputs because they can have different prices.

The calculator multiplies each token category by its own USD-per-million rate. Visible and reasoning output are added together for the output charge and for the modeled output-limit check. They remain separate in the breakdown so a visible answer estimate is not confused with hidden reasoning usage.

Use measured usage from representative provider responses when possible. A local plain-text token count does not include message wrappers, tool schemas, files, images or every provider-specific tokenizer rule.

  • Input: uncached input plus cached reads; explicit cache writes are entered separately.
  • Output: visible answer tokens plus billed reasoning tokens.
  • Volume: completed tasks, API calls per task and a retry allowance are distinct quantities.
  • Other charges: retrieval, tools, taxes or known account charges can be added as a monthly amount.

02Why completed tasks and API calls need different formulas

A user task may involve a router, several model calls, a validator and a retry. Counting only the final call understates the workload. Swiftly calculates billable API calls as completed tasks × calls per completed task × (1 + retry allowance). The retry allowance increases calls; it does not increase the number of completed tasks.

Token cost per API call excludes monthly storage and other entered charges. Total cost per completed task divides the full monthly estimate by completed tasks, so it includes those monthly amounts. Keeping these metrics separate prevents a deceptively low per-call figure from being presented as the unit cost of a finished feature interaction.

Example: 120,000 completed tasks, one call per task and a 6% retry allowance produce 127,200 billable calls. At GPT-6.1 Terra Standard base rates, 1,600 input and 450 visible output tokens per call produce an estimated $489.72 monthly token total before storage or other charges.

03Cached reads, cache writes and storage are not one discount

The cached-read share applies only to the entered input tokens. Uncached input remains at the standard input rate. Explicit cache-write tokens use the selected duration rate where a provider publishes one, and storage uses its own per-million-token-hour price where applicable. If a separate cached or write rate is not published for an entry, the engine uses the standard input rate and displays a warning rather than assuming the category is free.

The storage control represents one shared cached prefix held for the entered number of hours in a month. Its estimate is cached tokens ÷ 1,000,000 × storage rate × hours. Multiple independent caches can have a different token-hour total; add their measured storage charge under Other monthly charges instead of stretching the shared-prefix assumption.

  • OpenAI cache writes have separate 30-minute and 12-hour multipliers in the sourced rate card.
  • Claude cache writes have separate five-minute and one-hour multipliers; Batch and cache multipliers stack where published.
  • Gemini cached-input and storage prices vary by model and, for some models, by the selected dated rate card.
  • Cache-read savings in the result panel are shown before write and storage costs, never as net savings.

04Long-context pricing can reprice the whole call

A long-context threshold is not always a surcharge on only the tokens above the line. In the sourced OpenAI cards, crossing 272,000 prompt tokens applies the higher input, cached-input and output rates to the whole request. Claude Haiku 5.5 similarly moves to its higher published card above 100,000 prompt tokens. Prompt tokens include entered input and cache-write tokens before monthly volume is applied.

At GPT-6.1 Terra Standard rates, 272,000 input tokens with no output or caching cost $0.272. At 272,001 input tokens, the whole-call long-context card produces $0.544002. That sharp change is the published tier rule, not a rounding error. The calculator labels the active tier so a large estimate can be traced back to its cause.

Context and output checks are feasibility checks, not prices. If a workload exceeds a modeled limit, the arithmetic remains visible for diagnosis but is explicitly marked as not a feasible single API request.

05Batch, peak and dated rates require an explicit choice

Batch or asynchronous pricing is applied only when the selected rate card publishes it. The sourced OpenAI, Claude, Gemini and Mistral cards include Batch prices; the reviewed DeepSeek token-pricing page does not publish a Batch discount, so requesting Batch for DeepSeek leaves Standard pricing applied and shows a warning. Even where Batch is available, eligibility, completion windows and operational limits still need provider confirmation.

DeepSeek peak and off-peak cards are user-selected. The source defines weekday peak windows in UTC and treats weekends and Chinese public holidays as off-peak; the calculator does not infer a rate from a device clock. Gemini introductory and later list rates are also separate cards. Gemini 4 Argon shows its published rate through November 30, 2026 and the later card starting December 1; Gemini 3.8 Flash shows the introductory card through December 31 and the later card starting January 1, 2027.

  • Use a later dated card when budgeting for that later period; do not describe it as a charge already in effect.
  • Do not assume Batch always halves every category: the published Gemini 3.5 Flash-Lite cached Batch price is a specific exception.
  • Provider account credits, free tiers, committed-use discounts and negotiated rates are outside the static public-price snapshot.

06Compare price without turning it into a quality score

The comparison table holds the workload constant across the catalog. The selected model keeps its chosen rate card; other rows use their default published card, and every row displays the card actually used. The cheapest-feasible label excludes rows that exceed a modeled context or output limit. Price efficiency is the cheapest feasible monthly total divided by the selected row’s total, expressed on a 0–100 scale.

That score says nothing about accuracy, reasoning ability, latency, availability, safety, context utilization or task success. A cheaper model that fails more often can cost more after retries and human review. Evaluate candidate models on the same representative task set, then combine measured quality with the token-cost estimate before routing production traffic.

A model switch is an experiment, not a guaranteed saving. Track successful completed tasks, evaluation scores, latency and actual provider usage alongside the forecast.

07Where the estimate stops

This is a text-token planning model, not an invoice and not a live price feed. It excludes image and audio tokenization, embeddings, web search, retrieval, tool calls, provisioned capacity, support plans and account-specific adjustments unless a known monthly amount is entered separately. The custom model option accepts user-supplied text rates, but those values are labeled unverified and are not checked against a provider.

For self-hosted or hosted open-weight endpoints, custom token prices can describe a vendor meter, but GPU rental, idle capacity, engineering, observability and reliability work require a separate total-cost analysis. Confirm current provider documentation before committing a budget, reconcile the forecast with actual usage responses, and include the billing categories your application really uses.

  • No ranking, quality or latency recommendation is inferred from the cheapest row.
  • No device clock switches a promotional, peak or future price automatically.
  • No pasted prompt is exported; reports include token counts and assumptions, not the raw text.
  • Daily cost is a 30-day average, while annual cost is the monthly estimate multiplied by 12.

Frequently asked

LLM Token Cost Calculator FAQ

12 answers

For each token category, divide tokens per API call by one million and multiply by its rate. Add those category costs, multiply by completed tasks × calls per task × (1 + retry allowance), then add monthly cache storage and other known charges. The calculator shows each component and the full monthly total.

There is no reliable universal word-to-token ratio across prose, code, languages and tokenizers. Paste representative plain text for a local o200k_base count, or enter measured provider usage. Message formatting, tools, files and other tokenizers can change the billing count.

No. A completed task can require multiple calls and retries. Token cost per API call describes one call; total cost per completed task uses the full monthly estimate divided by completed tasks, including entered storage and other monthly charges.

Prompt caching reuses eligible repeated context under provider-specific rules. A cached read can have a different input price, while cache writes and storage can be separate charges. Eligibility and actual cache hits must be confirmed from provider usage; entering a cached-share percentage does not prove that a cache will hit.

No. Use the specific published Batch card. Some sourced cards halve token rates, Gemini 3.5 Flash-Lite publishes a distinct cached Batch rate, and the reviewed DeepSeek token-pricing page has no Batch discount. Unsupported Batch requests remain on Standard pricing with a warning.

Enter billed reasoning tokens separately from visible output. The calculator adds them at the model’s output rate and includes them in the output-limit check. Do not enter reasoning tokens again in visible output, or they will be counted twice.

For the sourced OpenAI and Claude Haiku tiers, the higher card applies to the whole call once prompt tokens exceed the threshold. It is not limited to the excess tokens. The active tier and any context-limit problem are labeled in the result.

There is no single cheapest choice for every workload and rate window. The table ranks the entered token mix, caching, retries, processing mode and other charges. Only rows within modeled limits can be cheapest feasible, and the result still says nothing about quality or task success.

The catalog contains source-linked text-price cards for selected models from OpenAI, Anthropic, Google, DeepSeek and Mistral. Consumer subscriptions such as ChatGPT or Claude plans are not API token charges. For another model or hosted endpoint, enter custom rates and label them as your own planning assumption.

The local counter handles pasted plain text only. It does not derive provider billing tokens for images, PDF page rendering, audio, tools or message wrappers. Use a representative provider response for those categories and enter the measured token totals directly.

No. They are a static, source-linked planning snapshot with explicit rate-card validity wording and links to official provider documentation. Dated later rates and DeepSeek time windows are selected manually. Verify the provider page and your account terms before budgeting.

Measure unnecessary context, visible and reasoning output, calls per successful task, retries and cache behavior. Test smaller models or Batch where suitable, but judge savings on successful completed tasks and an evaluation set. No universal percentage saving or quality-preserving switch is assumed.

Related searches

Keep calculating

All 24 tools
Works EverywhereResponsive on any device
100% PrivateMath never leaves your browser
Always FreeNo sign-up, no paywall

Swiftly calculations are educational estimates generated from published 2026 tax brackets, Federal Reserve rate data and state-level averages. They are not an offer of credit, tax advice or a guarantee of terms. Confirm results with a licensed lender, CPA or advisor before making financial decisions.