Cost calculator

LLM API Cost Calculator

Enter your traffic and prompt shape once; every one of 14 models is priced side by side with prompt caching, batch discounts, and long-context tiers from official rate cards.

Estimated cost

Calculating…

Results update as you change the inputs.

    Methodology and assumptions

    Monthly requests = requests per day × active days. For each request the input splits into an uncached part, a cacheable prefix served from cache (billed at the cached-input rate), and cache misses on that prefix (billed at the vendor's cache-write rate: 1.25× input for Anthropic 5-minute writes, OpenAI's listed cache-write price, and the normal input rate for Gemini and DeepSeek, which list no write premium). Output is billed at the output rate, which for reasoning models includes thinking tokens.

    Batch traffic uses each vendor's listed batch input and output prices (50% of standard for every model listed here); cached and cache-write tokens in batch are kept at standard rates, so batch savings are conservative. Prompts above a model's long-context threshold (272K input tokens for OpenAI, 200K for Gemini Pro) are billed at long-context rates for the whole request. Anthropic lists 1M context at standard pricing. DeepSeek uses its peak-hour rates; off-peak is half. Gemini 3.8 Flash is shown at Google's promotional rate, which the page says ends on 2026-12-31. Context-cache storage, tools, web search, data residency uplifts, fast/priority tiers, taxes, and negotiated discounts are excluded.

    Tokenizers differ: the same text produces different token counts per vendor (Anthropic states Claude 4.7 and later produce about 30% more tokens than earlier Claude models). Measure token counts per model on your own prompts before treating the ranking as final, and rank on cost per successful task, not list price alone. Formula version 2026-10-01; components are rounded to the nearest nanodollar.

    Official sources:

    Pricing last verified:

    Frequently Asked Questions

    What does the LLM API Cost Calculator calculate?

    Enter your traffic and prompt shape once; every one of 14 models is priced side by side with prompt caching, batch discounts, and long-context tiers from official rate cards.

    How accurate is the LLM API Cost Calculator?

    It is a planning estimate based on the inputs, formula, assumptions, and sources shown on this page. Actual prices, invoices, taxes, discounts, and outcomes can differ.

    Which pricing source does the LLM API Cost Calculator use?

    The calculator links to Vendor API pricing pages (all listed below) as its official source. The displayed pricing or reference data was last verified on 2026-10-08.

    Are calculator inputs saved or sent to analytics?

    Inputs are processed in your browser. Calculator values are not included in analytics events.