Skip to content

Tool

LLM Cost Calculator

Enter your token counts, your request volume and the prices you are quoted, and see what one request, one day and one month cost. You supply the prices, so the result stays correct when a vendor changes them.

The prices shown are example prices, not any vendor's. Enter your model's current prices; we remember them in this browser.

Result

  • Per request: $0.013
  • Per day: $13.50
  • Per 30 days: $405.00

How the cost is computed

Providers meter two things separately: the tokens you send (input) and the tokens the model writes back (output). Each has its own price, quoted per million tokens. The cost of one request is input tokens divided by a million, times the input price, plus output tokens divided by a million, times the output price. That is the whole formula.

Per-day cost is the per-request cost times how many requests you make. Per-month cost here is per-day times thirty. It is a planning number, not an invoice, so round it in your head.

Why output costs more per token

Input is processed in parallel: the model reads the whole prompt in one pass. Output is generated one token at a time, and each new token needs another pass that depends on the one before it. That sequential work is slower and ties up the hardware for longer, so output is priced higher per token than input.

In practice this means a short prompt with a long answer can cost more than a long prompt with a short answer. Do not guess which side dominates for your workload. Put in your numbers and look.

Picking realistic token counts

The most common mistake is using the size of the user's message as the input. The input is everything you send: system prompt, instructions, retrieved documents, tool definitions, conversation history and the new message. Paste a real, fully assembled request into the Token Counter and use that number.

For output, look at real responses and take a typical length rather than the maximum you allow. If your outputs vary a lot, run the calculator twice, once with a typical length and once with a long one, and keep both figures.

A worked example

These are example prices, not any vendor's. Say input costs 2 dollars per million tokens and output costs 10. A request with 1,000 input tokens and 500 output tokens costs 0.002 for input plus 0.005 for output, which is 0.007 dollars.

At 100 requests a day that is 70 cents a day and about 21 dollars a month. Double the output length and the monthly figure rises by about 70 percent, because output was already the larger share of the bill. This is the kind of sensitivity the calculator is for.

Caching and batching

Prompt caching lets a provider reuse work it has already done on a stable prefix of your prompt, such as a long system prompt. Cached input is typically billed at a reduced rate, so the effect depends on how much of your input is an identical prefix across requests. Enter a lower effective input price if you want to model it.

Batch interfaces trade latency for price: you submit work to be done within a window instead of immediately, and the provider charges less per token. If your workload does not need an immediate answer, model it with the batch prices.

What this does not model

It does not know about minimum charges, free tiers, tiered pricing for very long prompts, fine-tuning, embeddings, image or audio tokens, or tool calls that trigger extra requests. It also assumes every request looks the same. Real traffic has a spread, and retries add cost you will not see in a single request.

If your system is an agent that loops, the per-request model is wrong, because each turn re-sends a growing history. Use the Agent Run Budget Simulator for that.

Frequently asked questions

Where do I find the prices to enter?

On your provider's pricing page or in your contract. They are quoted per million tokens, with separate numbers for input and output. The calculator ships with no built-in prices so that nothing on this page can go out of date.

Why is my real bill different from the estimate?

Usually because the token counts were off. Real requests carry more input than the user's message, and real outputs vary in length. Retries, failed calls and traffic that is not evenly spread across days also add up.

How do I get an input token count?

Paste a fully assembled request, system prompt and context included, into the Token Counter. For exact numbers on a hard budget, use the count your provider returns in its response usage field.

Is my data sent anywhere?

No. The math runs in your browser. Your inputs are kept in the page link only if you copy it, and that link never leaves your device unless you share it.

Related tools

  • Token Counter

    Count tokens for any text, exactly for OpenAI models and estimated for Claude, in your browser.

  • Claude Token Counter

    Estimate Claude tokens and input cost for a prompt, with the limits of estimating spelled out.

  • OpenAI Token Counter

    Exact o200k_base token counts for GPT-style prompts, computed locally.

  • Agent Framework Picker

    Five questions to decide between a plain loop, an SDK, or a framework.

  • Agent Run Budget Simulator

    See how an AI agent's cost grows turn by turn and where your budget cap would stop it.

  • JSON to Zod

    Paste a JSON sample or a JSON Schema and get a Zod schema and TypeScript types, in your browser.

  • Tool Schema Validator

    Check an OpenAI, Anthropic or MCP tool definition for common mistakes and convert it to the other two formats.