LocalExcelTool
Get started

AI Cost Calculator

Compare LLM API costs per request and per month across OpenAI, Claude, Qwen and DeepSeek.

What is AI Cost Calculator

An AI API cost calculator turns token prices into money. It multiplies input and output token counts by each model's price per million tokens, applies the cached-input discount where a vendor publishes one, and scales the result to a monthly bill. Because two models doing the same job can differ in cost by more than 100x, running the numbers before you pick a model is the cheapest optimisation available.

Applies only to models with a published cached-input price. Others are billed at full input rate.

AOpenAI

GPT-6.2 Astra

$0.0254/ request

Per 1,000 requests
$25.36
Monthly at 100,000 requests
$2,536
Input / output split
21% / 79%
Saved by caching
$0.0106

Standard processing, under 272K context

BOpenAI

GPT-6.2 Sol

$0.00634/ request

Per 1,000 requests
$6.34
Monthly at 100,000 requests
$634.00
Input / output split
21% / 79%
Saved by caching
$0.00266

Standard processing, under 272K context

GPT-6.2 Sol saves $1,902 per month versus GPT-6.2 Astra.

Estimates use published list prices and ignore free tiers, batch discounts (usually 50% off) and volume deals. Your invoice will differ.

API price list, per 1M tokens

List prices published by each vendor, in USD per 1 million tokens. Cached input is the price charged for input tokens that hit the prompt cache.

OpenAI

ModelInputCached inputOutputContext
GPT-6 Lunagpt-6-lunaStandard processing, under 272K contextvendor pricing page$0.10$0.010$0.50—
GPT-6.1 Terragpt-6-1-terraStandard processing, under 272K contextvendor pricing page$1.00$0.050$5.00—
GPT-6.2 Solgpt-6-2-solStandard processing, under 272K contextvendor pricing page$2.00$0.10$10.00—
GPT-6.2 Astragpt-6-2-astraStandard processing, under 272K contextvendor pricing page$8.00$0.40$40.00—

Anthropic

ModelInputCached inputOutputContext
Claude Haiku 5.5claude-haiku-5-5Prompts over 100K tokens bill 5x: $0.50 in / $2.50 outvendor pricing page$0.10$0.010$0.501M
Claude Sonnet 5.5claude-sonnet-5-5vendor pricing page$2.00$0.10$10.001M
Claude Opus 5.5claude-opus-5-5Fast mode costs 2xvendor pricing page$4.00$0.20$20.001M
Claude Fable 5.2claude-fable-5-2vendor pricing page$8.00$0.20$40.001M

Google

ModelInputCached inputOutputContext
Gemini 3.5 Flash-Litegemini-3-5-flash-liteSame rate for text, image, video and audio inputvendor pricing page$0.30$0.030$2.501M
Gemini 3.8 Flashgemini-3-8-flash$0.75 / $3.75 through Dec 31, 2026; $1.50 / $7.50 from Jan 1, 2027vendor pricing page$0.75$0.075$3.751M
Gemini 4 Carbongemini-4-carbon$2.00 / $10.00 through Nov 30, 2026; $4.00 / $20.00 from Dec 1, 2026vendor pricing page$2.00$0.10$10.001M
Gemini 4 Neongemini-4-neonImplicit caching onlyvendor pricing page$3.00$0.15$15.001M

xAI

ModelInputCached inputOutputContext
Grok 4.3grok-4-3Prompts ≥200k bill $2.50 / $0.40 / $5.00; US endpoint +10%vendor pricing page$1.25$0.20$2.501M
Grok 4.7grok-4-7Prompts ≥200k bill $4.00 / $1.00 / $12.00; US endpoint +10%vendor pricing page$2.00$0.50$6.00500K

Alibaba Cloud

ModelInputCached inputOutputContext
Qwen3.8-Flashqwen3-8-flashInternational deployment; Global deployment $0.113 / $0.382vendor pricing page$0.15$0.016$0.471M
Qwen4-Maxqwen4-maxInternational deployment; Global deployment $1.413 / $4.24vendor pricing page$1.50—$4.501M

DeepSeek

ModelInputCached inputOutputContext
DeepSeek Flashdeepseek-flashPeak rates; off-peak 50% off. API model id is exactly `deepseek-flash` (V4.1-Flash-1017; legacy `deepseek-v4-flash` serves the same model at Flash price). Supports vision — the cheap choice for BOTH chat and vision routesvendor pricing page$0.30$0.006$1.201M
DeepSeek V4 Prodeepseek-v4-proPeak rates; off-peak is 50% off. Max output 384Kvendor pricing page$1.32$0.044$3.961M

Scheduled price changes

  • 2026-12-01 · Gemini 4 Carbon — Input rises to $4.00, output to $20.00 per 1M tokens
  • 2027-01-01 · Gemini 3.8 Flash — Input rises to $1.50, output to $7.50 per 1M tokens

Announced by the vendor, not yet in effect. The table above shows prices charged today.

Prices last verified against vendor pages on 2026-11-26. Vendors change prices without notice — check the linked page before you commit to a budget. 18 models from 6 vendors are listed.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Why input and output are priced separately

Prompt processing is a single forward pass that can be batched and cached; generating output is sequential, one token at a time, and cannot be parallelised within a response. That asymmetry is why output typically costs three to five times as much per token as input across every major provider.

So a cost estimate needs both numbers and the expected ratio between them. A classification task might be 1,900 input tokens and 20 output tokens; a long-form generation is the reverse. Averaging to a single per-token price produces estimates that are wrong by an order of magnitude on both ends.

The table is a snapshot, and prices move

The figures come from published list prices at a point in time. Providers change them, add tiers, introduce batch discounts (commonly 50% for asynchronous work) and cache-read discounts (commonly 90% off repeated prefixes). Any estimate built on list price is an upper bound for a workload that can use those features.

The other hidden line is the gateway or platform markup if requests are proxied. A reseller charging a percentage on top means the effective price is not the provider's list price, and the calculator's total is only the first layer of the bill.

Turning a price into a business number

Cost per request matters only against revenue per request. A workflow costing $0.02 per run is fine at $2 of value and fatal at $0.01 — which is why this page reports cost alongside a per-unit view rather than a monthly total alone.

For a subscription product, the number to watch is the worst-case monthly cost of the heaviest allowed usage, not the average. Averages hide the accounts that lose money, and those accounts are usually the ones that stay.

How to use

  1. 1.Pick two models to compare
  2. 2.Enter input and output tokens per request plus monthly volume
  3. 3.Read the per-request, per-1,000 and monthly cost, and the difference

How this compares

There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.

AspectThis toolUpload-based converters
Where the file is processedIn your browser, on this pageOn the vendor's servers, after an upload
Account requiredNoUsually — free tiers ask you to sign in before lifting a limit
Size you can process for freeNo size cap, no run limitA few files per hour, or a ~5–10 MB cap before a paywall
PriceFree. Pro is $9/month, and only buys larger files and AI featuresUsually a subscription — roughly $7–15/month as of November 2026
Works offlineYes, once the page has loadedNo
Time before work starts on a 20 MB fileImmediate — there is nothing to uploadDominated by the upload — about 16 s on a 10 Mbps uplink
What it cannot preserveChecks run against what the URL returns now, not against a stored snapshotThe same — the conversion is the same maths

Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.

Frequently asked questions

How is the cost calculated?

Input tokens times the input price plus output tokens times the output price, divided by one million for a single request, then multiplied by your monthly request count. If you set a cache-hit share, the discount applies only to models with a published cached-input price.

Why is output more expensive than input?

Generated tokens are produced one at a time, which costs more compute than reading a prompt. Most vendors price output at 3–5x the input rate.

What is cached input pricing?

When you resend the same system prompt or reference document, the repeated prefix can be billed at a much lower rate — typically 10–20% of the normal input price.

Are these prices current?

The table shows the date the vendor pages were last checked. Vendors change prices without notice, so confirm on the linked official page before you commit to a budget.

What this kind of conversion cannot keep

Developer tools here check what breaks silently: a missing canonical, a description over the length search engines display, a sitemap that returns 200 but lists dead URLs. Each result links to the exact line or URL, because a warning you cannot act on is noise.

More in Developer