AI API Cost Calculator

Prices checked November 2026 from official API pricing pages. Figures are estimates in US dollars, using standard short-context list rates. Update the single price table in the page script when a vendor changes a rate.

The share of input tokens billed at the vendor’s cached-input rate, when one is published.

Uses about 0.75 words per token, a rough English average. Tokenizers differ by model.

Estimated cost

$0.00

per month (30 days)

$0.00Per request
$0.00Per day
$0.00Input / 1M
$0.00Output / 1M
    ModelVendorPer requestPer dayPer month

    The comparison table is sorted from lowest to highest monthly cost with the same token and request settings. The selected model is highlighted.

    Estimate API spend before you ship a feature

    This AI API cost calculator uses official per-1M-token list prices, checked in November 2026, for flagship and smaller models from OpenAI, Anthropic, Google Gemini, xAI, Mistral and DeepSeek. Enter input and output tokens per request, how many requests you expect each day, and the share of input tokens that will be billed as cached. You get a per-request, per-day and per-month estimate, plus a comparison table sorted by monthly cost. See all five helpers in 5 Free AI Tools: Prompts, Humanizer & API Costs, or browse the Free Tools hub.

    How the cost is calculated

    • Uncached input tokens × input price, plus cached input tokens × cached-input price, plus output tokens × output price, all per 1 million tokens.
    • If a vendor does not publish a cached-input rate (Mistral Small 4 and Ministral 3), a cached share is billed at the ordinary input rate.
    • A month is counted as 30 days. There is no weekend adjustment except in the DeepSeek notes, where official off-peak rates are half of the peak prices shown.
    • The words-to-tokens helper uses about 0.75 words per token. Real token counts depend on the model’s tokenizer, language and punctuation.
    • Standard short-context rates are used. Long-context surcharges, batch discounts, priority tiers, tool calls, image or audio tokens, and committed-use deals are not included.

    Prices were checked in November 2026 against these official pages:

    Notable time-limited rates as of this check: Gemini 4 Carbon stays at $2 input and $10 output through 30 November 2026, then $4 and $20 from 1 December 2026. Gemini 3.8 Flash stays at $0.75 and $3.75 through 31 December 2026, then $1.50 and $7.50 from 1 January 2027. DeepSeek prices in the table are peak rates; off-peak is half.

    Estimates only. Vendors change prices, context tiers and caching rules. This calculator is general information, not a quote or an invoice. Confirm current rates on the official pages before you set a budget.

    Frequently asked questions

    When were these prices checked?

    November 2026, against the official OpenAI, Anthropic, Google Gemini, xAI, Mistral and DeepSeek API pricing pages linked on this page. Rates can change at any time, so confirm on those pages before you budget.

    What is a cached input token?

    Some APIs bill repeated prompt prefixes at a lower cached-input rate. The cached share box is the percentage of each request’s input tokens you expect to hit that rate. If a model has no published cache price, this calculator bills that share at the ordinary input rate.

    Why might my real bill be higher?

    Reasoning or thinking tokens, long-context surcharges, tool calls, image or audio inputs, priority processing, regional endpoints and tax are not included. DeepSeek also charges peak rates at certain UTC hours on weekdays.

    How accurate is the words-to-tokens helper?

    It uses a simple English rule of about 0.75 words per token, or four tokens for every three words. Code, other languages and each vendor’s tokenizer will differ, so treat it as a starting point and measure real usage when you can.

    Can I add or update a model?

    Yes. All list prices live in one JavaScript object in this page’s script, named API_MODELS. Change a rate, add a row, or edit a note there, then rebuild or paste the updated snippet.

    Does this tool call any API?

    No. The math runs in your browser with the prices baked into the page. Your token counts are not sent anywhere.