Skip to content

AI API Cost Calculator

Model prices

From the provider's price page, in US dollars per million input (prompt) tokens.

Per million output (completion) tokens; usually 3–5 times the input price.

Your usage

System prompt, history and user text together. About 750 English words is 1,000 tokens.

Monthly API cost —
Cost per request
—
Cost per 1,000 requests
—
Daily cost
—
Yearly cost (12 months)
—
Tokens per month
—
Share of cost from output
—
Monthly cost: input vs output tokens
The chart appears with your result

Multiply each token count by its price per million and divide by 1,000,000, then add input and output. At $3 in and $15 out, a request with 1,000 input and 500 output tokens costs $0.0105; 1,000 of those a day for 30 days is $315 a month.

About this tool

Developers sizing a chatbot, a retrieval pipeline or a nightly batch job need a monthly figure before the first invoice arrives. Providers bill input (prompt) and output (completion) tokens separately, and output is usually several times dearer, so a short prompt with a long answer can cost more than a long prompt with a terse reply. Enter the two prices from the provider's page, the typical tokens in and out per request, and your traffic. The tool returns cost per request, per 1,000 requests, per day, per month and per year, plus how much of the bill comes from output, drawn as a donut chart you can save as PNG, SVG or CSV. It does not know current prices: type them in, and remember cached-input discounts, batch discounts and image or audio tokens are not modelled.

How to use it

  1. Enter the model's prices

    Type the input and output price per million tokens in US dollars, copied from the provider's pricing page.

  2. Describe one request

    Set the average input tokens (system prompt, history and user text) and output tokens per request.

  3. Set your traffic

    Enter requests per day and drag the active-days slider, for example 22 for a weekday-only job.

  4. Read the breakdown

    The monthly cost leads; the stats and the donut show where the money goes between input and output.

Examples

Chatbot on a $3 / $15 model

Input price per 1M tokens
3
Output price per 1M tokens
15
Input tokens per request
1000
Output tokens per request
500
Requests per day
1000
Active days per month
30

Result Monthly API cost: $315.00
Cost per request: $0.010500
Cost per 1,000 requests: $10.5000
Daily cost: $10.50
Yearly cost (12 months): $3,780.00
Tokens per month: 45,000,000
Share of cost from output: 71.4%

  1. Input per request = 1000 ÷ 1,000,000 × $3 = $0.003
  2. Output per request = 500 ÷ 1,000,000 × $15 = $0.0075
  3. Per request = $0.0105; per day = × 1000 = $10.5
  4. Per month = $10.5 × 30 days = $315

Each request costs about one cent, of which 71% is output. A thousand chats a day adds up to $315 a month.

RAG lookups on a $0.15 / $0.60 model

Input price per 1M tokens
0.15
Output price per 1M tokens
0.6
Input tokens per request
2000
Output tokens per request
300
Requests per day
500
Active days per month
30

Result Monthly API cost: $7.20
Cost per request: $0.000480
Cost per 1,000 requests: $0.4800
Daily cost: $0.24
Yearly cost (12 months): $86.40
Tokens per month: 34,500,000
Share of cost from output: 37.5%

  1. Input per request = 2000 ÷ 1,000,000 × $0.15 = $0.0003
  2. Output per request = 300 ÷ 1,000,000 × $0.6 = $0.00018
  3. Per request = $0.00048; per day = × 500 = $0.24
  4. Per month = $0.24 × 30 days = $7.2

Long retrieved context but short answers: $0.00048 per request, so 500 lookups a day costs $7.20 a month.

How it is calculated

Monthly cost = (Tin × Pin + Tout × Pout) ÷ 1,000,000 × R × D

Tin, Tout
input and output tokens per request
Pin, Pout
price in dollars per million input and output tokens
R
requests per day
D
active days per month

Providers quote prices per million tokens, so each request's token counts are scaled by one millionth and multiplied by the matching price. Input and output are priced separately and summed to a per-request cost, which is multiplied by daily requests and then by active days. The yearly figure is twelve such months. The output share is the output part of one request divided by its total.

When not to use it

  • Plans billed per seat or per month rather than per token need a different comparison.
  • Workloads dominated by cached prompts or batch discounts will cost less than shown.
  • Image, audio or fine-tuning charges follow other price units and are not included.

Common mistakes

  • Entering the price per 1,000 tokens where the field expects the price per million.
  • Counting only the user's message and forgetting the system prompt and chat history resent each turn.
  • Swapping the input and output prices, which hides how dear long answers are.
  • Estimating tokens from characters at one per character instead of roughly four characters per token.

Frequently asked questions

How many tokens is a word?

For English text, OpenAI's rule of thumb is about 4 characters or three quarters of a word per token, so 1,000 tokens is roughly 750 words. Code, numbers and non-Latin scripts such as Arabic or Chinese usually use more tokens per word, so measure a sample with the provider's tokenizer if the budget is tight.

Why is output priced higher than input?

Input tokens are processed in parallel in one pass, while output tokens are generated one at a time, each needing its own pass through the model. That sequential work costs providers more compute per token, which is why output prices are commonly three to five times the input price.

Does chat history count as input every turn?

Yes. Most chat APIs are stateless, so the whole conversation is resent with each new message. A ten-turn chat can carry thousands of input tokens on its last request even when the newest message is one line. Use the average across turns, not the first turn, as the input figure.

How do prompt caching and batch discounts change the figure?

Several providers bill cached input tokens at a fraction of the normal price and offer around half price for batch jobs that can wait hours. This tool applies one price per token type, so for a heavily cached or batched workload enter an effective blended price, or treat the result as an upper bound.

What does the cost per 1,000 requests tell me?

It is an easy unit for pricing your own product. If 1,000 requests cost $10.50, a feature that a user triggers 200 times a month costs you about $2.10 per user in model fees before hosting, retries or failed calls.

Where do I find the prices to enter?

Each provider publishes a pricing page listing dollars per million input and output tokens per model. Prices change often and differ between model sizes, regions and resellers, so copy them on the day you plan, and check whether your account has negotiated rates.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 25). AI API Cost Calculator. Tools Directory. Retrieved October 28, 2026, from https://tools.milunir.com/text-tools/ai-writing-assistants/ai-api-cost-calculator/

MLA

Tools Directory Editorial Team. “AI API Cost Calculator.” Tools Directory, 25 Oct. 2026, https://tools.milunir.com/text-tools/ai-writing-assistants/ai-api-cost-calculator/. Accessed 28 Oct. 2026.

Chicago

Tools Directory Editorial Team. “AI API Cost Calculator.” Tools Directory. Last modified October 25, 2026. Accessed October 28, 2026. https://tools.milunir.com/text-tools/ai-writing-assistants/ai-api-cost-calculator/.

Link<a href="https://tools.milunir.com/text-tools/ai-writing-assistants/ai-api-cost-calculator/">AI API Cost Calculator – Tools Directory</a>