LightCube Data Extractor Add to Chrome ↗

AI API Cost Calculator

Compare the monthly cost of OpenAI, Claude, Gemini and other LLM APIs for your workload. Enter how many requests you send and how big your prompts are, and the table ranks every model by what it would actually cost you per month — including prompt caching and Batch API discounts.

Calculations run entirely in your browser. Your prompts and numbers never leave your device.

1 · Token estimator (optional)

Paste a sample prompt to approximate its token count, then send it to the workload inputs below.

0 estimated tokens

Approximate; real tokenizers differ by ~10–20%.

2 · Your workload
3 · Filter providers
4 · Cost comparison

How the math works

Prices are quoted per 1,000,000 tokens and split into input (your prompt) and output (the model's reply). For each model the calculator computes:

  • Cached vs. uncached input. Your cache percentage splits input tokens into cached and uncached. Uncached tokens use the standard input price; cached tokens use the model's cached-input price when it has one, otherwise the standard input price.
  • Cost per request = (uncached input × input price + cached input × cached price) ÷ 1e6 + (output tokens × output price) ÷ 1e6.
  • Batch API. When the toggle is on and a model offers a batch API, cost per request is multiplied by that model's batch factor (for example 0.5 for 50% off). Models with no batch API keep standard pricing and show a no batch badge.
  • Per day = cost per request × requests per day. Per month = per day × days per month.

Assumptions. List prices on the standard (non-priority) tier, USD. Token counts you enter are estimates. Anthropic prompt-caching charges an extra one-time cache write fee the first time a prefix is cached; that write cost is not modeled here beyond the standard input price, so heavy-caching workloads may cost slightly more than shown. Always verify current prices on the official pages before budgeting.

Sources & pricing notes

    Frequently asked questions

    What is a token?
    A token is the unit LLMs read and bill by: a chunk of text roughly three quarters of a word in English, so about 4 characters. Providers charge separately for input (prompt) tokens and output (completion) tokens, priced per million tokens.
    How do I estimate my monthly LLM cost?
    Multiply your tokens by the price. Cost per request is input tokens times the input price plus output tokens times the output price, divided by one million. Multiply by requests per day, then by days per month. Paste a sample prompt above to approximate token counts, then enter your request volume.
    Does prompt caching reduce cost?
    Yes. When a provider supports prompt caching, tokens served from the cache are billed at a lower cached-input rate, often a fraction of the standard input price. The calculator applies your cache hit percentage to input tokens. Note that some providers also charge a one-time cache write fee, which is not modeled here.
    What is the Batch API discount?
    Several providers offer an asynchronous Batch API that returns results within roughly 24 hours in exchange for a discount, commonly around 50% off list prices. It suits non-interactive workloads like bulk summarization or evaluation. Toggle it on to apply each model's batch multiplier; models without a batch API keep standard pricing.
    Which LLM API is cheapest?
    It depends on your workload. A model with cheap input but expensive output can win for retrieval-heavy prompts and lose for long generations, and prompt caching or batch discounts can flip the ranking. Enter your own request volume and token sizes and read the comparison table above, which sorts by your monthly cost.

    Cost per request by provider: OpenAI · Anthropic · Google · DeepSeek.

    Need to turn web pages into CSV for your LLM pipeline? Try the free LightCube Data Extractor.

    Read the full pricing breakdowns: ChatGPT API Cost Per Request and OpenAI vs Claude vs Gemini API Pricing.