● Runs locally in your browser

AI API Cost Calculator

Estimate per-request, monthly, and annual AI API spend from token volume. Compare leading LLMs with the same workload assumptions.

30-day requests3,000
Lowest 30-day estimate—
Standard rates: text token pricing.Excluded: caching, batch, tools and taxes.Pricing data verified —
Comparison

LLM cost by model

Change any input above and the estimates recalculate instantly in your browser.

ModelInputOutputPer request30 days1 year

Informational estimate only. Provider pricing can include caching, batch processing, tool calls, regional pricing, and other rules not represented here.

Formula

How the calculator works.

Input cost = input tokens ÷ 1,000,000 × published input rate. Output cost uses the same formula with the published output rate.

Monthly and annual estimates simply scale the per-request result by request volume.

Model a real workloadUse an average request rather than a single unusually large prompt.
Separate input from outputOutput tokens are often priced materially higher than input tokens.
Check fit tooUse the Context Window Checker before assuming a very large request is valid.
What a token isThe unit behind every estimate — ~4 characters, 0.75 words: What Is an AI Token?
Sending scraped HTML?Measure what cleaning it saves: HTML Token Savings.
1M tokens in words750,000 words, 1,500 pages — and why only 5 of 8 models accept it in one request: How Many Words Is 1M Tokens?
Trim the promptFind repeated instructions, markup and filler: Prompt Weight Analyzer
Stop paying twiceChat re-sends its history every turn — 96.6% of input tokens on a 20-turn conversation: Conversation Cost Growth Calculator.
The full cost playbookSeven levers ranked by return, from re-sent history to a 22.7x model spread: How to Reduce LLM API Costs.
Input vs outputWhy the reply costs 5.0x–8.3x more per token than the prompt, and the break-even ratio: Input vs Output Tokens.
A 200-page PDF133,333 tokens, and the one model where it nearly does not fit: Can a 200-Page PDF Fit in an LLM?.
How pricing worksPer-1M rates, two counters and the formula behind every number on this site: How LLM Token Pricing Works.
Flat plan vs meteredWhere a monthly subscription stops being cheaper — break-even requests per day on all 8 models: API vs Subscription Break-even.
Retrieval-shaped costsChunk size, top-k and overlap priced per query, and what one more retrieved chunk costs: RAG Context Cost Calculator.
Agent loopsWhy an 8-step agent sends 66,400 input tokens, 75.9% of it re-read history: Agent Loop Cost Calculator.
Price directionIs token pricing going up or down? The eight-model basket index reads 87.1 against its 2026-08-09 baseline — down 12.9%, with both cuts scheduled to lapse: LLM Pricing Index.
A fourth providerDeepSeek prices input three ways — a cache-hit rate, a cache-miss rate and a peak/off-peak clock — at $0.30/$1.20 per 1M tokens on flash at peak, exactly half off-peak, with a 384,000-token output cap: DeepSeek API Pricing.
FAQ

LLM API cost questions

How is monthly API cost calculated?

The per-request token estimate is multiplied by your requests per day and 30 days.

Are caching and batch discounts included?

No. V2 compares standard text-token rates so the baseline stays simple and comparable.

Why can output dominate cost?

Many providers price generated tokens higher than input tokens, so long answers can become the main cost driver.