Free tool ยท runs in your browser ยท nothing uploaded

AI API Cost Calculator

Turn token counts and per-million-token prices into a cost per request, per day, and per month.

$0.00875Per request
$0.8750Per day
$26.25Per month30 days
43%Input share of cost
6,000,000Tokens per month

The pre-filled prices are placeholders so the math has something to work with. Replace them with the current per-million rates from your provider; they change often and differ by model.

LLM APIs bill per token, with separate rates for the tokens you send and the tokens the model writes back, usually quoted per million. That makes the price list easy to read and the monthly bill hard to guess. This calculator does the arithmetic: enter your typical request size, how many requests you make a day, and the rates from your provider's pricing page, and see the cost per request, per day, and per month.

Every field is editable: input tokens, output tokens, requests per day, price per million input tokens, and price per million output tokens. The starting values are only placeholders to show the math, not anyone's real prices, so replace them with the numbers for the model you plan to use. The calculator runs in your browser and stores nothing.

How to use it

  1. Enter the average input tokens and output tokens for one request. Use the Token Counter if you are unsure.
  2. Set how many requests you expect per day.
  3. Type the price per million input tokens and per million output tokens from your provider's pricing page.
  4. Read the cost per request, per day, and per month, then change the inputs to compare models or prompt sizes.

How LLM API pricing works

Nearly every provider prices in two parts: a rate for input tokens, which cover your prompt, system instructions, attached documents, and conversation history, and a higher rate for output tokens, which the model generates. Both are usually quoted per million tokens. Some providers discount cached or batched requests, and a few charge extra for images or very long contexts, but the two-rate model covers most bills.

The formula is simple. Cost per request equals input tokens times the input rate plus output tokens times the output rate, each divided by one million. Multiply by requests per day for a daily figure and by thirty for a monthly one. The calculator does this arithmetic and nothing more, so you can check it by hand.

Where the money actually goes

Two things dominate most API bills, and neither is the headline rate. The first is input size: in a chat, the entire history is resent with every turn, so a long conversation costs more with each message. Attached documents and verbose system prompts have the same effect. The second is output length, since output tokens cost more and models will happily write four paragraphs where one was asked for.

Cheap levers, in rough order of impact:

  • Trim the system prompt and stop resending instructions the model already has
  • Ask for a specific length or format so the output stops when it should
  • Summarize long conversations instead of replaying every turn
  • Route simple requests to a smaller, cheaper model and save the large one for hard ones
  • Use prompt caching or batch endpoints where your provider offers them
  • Measure a week of real traffic before committing to a monthly budget

Frequently asked questions

Does the calculator include real prices for GPT, Claude, or Gemini?
No. Prices change often and vary by model tier, so the calculator starts with placeholder values and asks you to enter the current rates from your provider's pricing page.
Is anything I enter saved or sent?
No. The math runs in your browser. Nothing is uploaded or stored.
How do I know how many tokens a request uses?
Paste a typical prompt into the Token Counter for an estimate, then add the length of a typical reply. Remember that chat history counts as input on every turn.
Why is output priced higher than input?
Generating text takes more compute than reading it, so providers charge more for it. That is also why keeping replies short usually saves more than trimming prompts.

Keep going

More free tools

Do it in ChatUp

Now run it on a real model.

Paste what you built here into ChatUp and choose GPT, Claude, Gemini, Grok or DeepSeek for the job. One account, same history on web, iPhone and Android.