← All tools
AI ENGINEERING COST TOOL

LLM API cost calculator

Split a request into uncached input, cached input, and output tokens, then test real traffic and budget assumptions before shipping.

TOKEN COST MODELBring current provider rates instead of trusting a stale preset
EXAMPLE WORKLOADS
Result currency

Prices, exchange rates, and token counts are user-entered assumptions. The tool never reads API keys, sends provider requests, or uploads values.

ESTIMATED MONTHLY COST$108.75

15,000 requests · $0.00725 / request · $0.00 fixed

PER 1K REQUESTS$7.25
CACHE SAVINGS$11.25
BUDGET USED21.8%
COST PER REQUESTSeparate input, cached input, and output
Uncached input$0.00341.4%
Cached input$0.000253.4%
Output$0.00455.2%
BUDGET CAPACITY68,965 requests

Approximate requests the monthly budget can support at the current variable and fixed cost. Overage, tools, images, audio, search, storage, and tax are separate.

VOLUME SENSITIVITYHalf, current, and double request volume
50%$54.387,500 req/mo
100%$108.7515,000 req/mo
200%$217.5030,000 req/mo

Formula and calculation boundary

Variable request cost = uncached input tokens ÷ 1,000,000 × input rate + cached input tokens ÷ 1,000,000 × cached rate + output tokens ÷ 1,000,000 × output rate. Monthly total adds request volume and fixed costs. Every price is user supplied because provider pricing changes.

Worked example

The default 2,000 input tokens, 500 output tokens, 25% cached input, and rates of $2, $0.50, and $8 per million tokens produce $0.00725 per request. At 500 requests per day for 30 days, variable cost is $108.75 per month before fixed, tool, storage, tax, or overage charges.

Check before acting

  • Copy current rates for the exact model, service tier, region, context length, and cache mode from the provider's official page.
  • Use measured p50 and p95 token usage from production-like traces instead of one hand-written prompt.
  • Reconcile the forecast against provider usage and billing data, then budget for retries, failures, tools, multimodal input, and traffic spikes.

Questions people ask

Does the calculator count text into tokens?

No. Tokenization varies by model and modality. Use the provider tokenizer, count endpoint, or response usage fields, then enter the measured counts here.

Why are input and output priced separately?

Providers commonly publish distinct input, cached-input, and output rates. Output or reasoning tokens can be materially more expensive, so one blended rate can hide the main driver.

Is a cache-share percentage guaranteed to save this amount?

No. Actual eligibility and hit rate depend on provider rules and stable prompt prefixes. The result is a sensitivity scenario to verify against usage records.

Does the total equal the final invoice?

Not necessarily. Tools, search, images, audio, storage, batch tiers, long context, taxes, credits, and contract terms may be billed separately.

Build a measured LLM cost budget before launch ↗

Why the calculator has no model price presets

Model names, tiers, long-context rules, batch discounts, caching, tool charges, and regional terms change. A built-in price table can become misleading quickly, so this tool asks you to enter current official rates and calibrate the estimate against billing or usage data after launch.

Full method: How to estimate LLM API cost before shipping.

Official verification links