AI & Productivity Tools

Llm Api Cost Calculator

Estimate per-request, total, monthly, and yearly language-model API cost from token volume, request frequency, and the selected model.

Llm Api Cost Calculator — Online Calculator

🤖

LLM API Cost Calculator

Estimate the cost of running AI API calls across different models. Rates are pay-as-you-go USD per 1M tokens (verified June 2026).

Advertisement

The LLM API Cost Calculator estimates language-model API spending from input tokens, output tokens, request count, request frequency, and a selected model. It reports cost per request, total cost for the entered volume, and recurring monthly or yearly projections when a daily or monthly frequency is selected.

How the estimate works

The calculator uses the maintained model table in this tool's code. Prices are expressed as US dollars per one million tokens. Input and output tokens are priced separately:

Input cost=Input tokens1,000,000×Input price per million\text{Input cost} = \frac{\text{Input tokens}}{1{,}000{,}000} \times \text{Input price per million} Output cost=Output tokens1,000,000×Output price per million\text{Output cost} = \frac{\text{Output tokens}}{1{,}000{,}000} \times \text{Output price per million} Total cost=(Input cost per request+Output cost per request)×Request count\text{Total cost} = (\text{Input cost per request} + \text{Output cost per request}) \times \text{Request count}

Daily usage is projected with 30.44 days per month and 365 days per year. Monthly usage is projected with 12 months per year.

Inputs

  • Model: Select one of the model profiles maintained in the calculator.
  • Input tokens: Prompt or context tokens per request.
  • Output tokens: Completion tokens per request.
  • Request count: Number of requests in the selected period.
  • Frequency: One-time, daily, or monthly usage.

Worked example

Suppose one request uses 2,000 input tokens and 500 output tokens, and you send 10,000 requests. For a model priced at 2.50permillioninputtokensand2.50 per million input tokens and 10 per million output tokens:

  1. Input cost per request: 2,000 / 1,000,000 x $2.50 = $0.005.
  2. Output cost per request: 500 / 1,000,000 x $10 = $0.005.
  3. Total for 10,000 requests: ($0.005 + $0.005) x 10,000 = $100.

The comparison table applies the same token volume to every maintained model profile and marks the lowest calculated total.

Reading the result

Input-heavy workloads are more sensitive to input pricing; long generated answers are more sensitive to output pricing. A lower per-request estimate does not account for latency, quality, rate limits, caching, tool calls, or provider-specific discounts.

For a rough count from pasted text, use the AI Token Counter. For a language-neutral token-to-word estimate, use the Tokens to Words Converter.

Questions

Does this use live provider pricing?

No. The model and price profiles are static data maintained in the calculator module. Check the provider's current pricing before committing to a production budget.

Why are input and output tokens separate?

Most model APIs price prompt tokens and generated tokens at different rates. Separating them prevents a short prompt with a long response from being treated like an input-only request.

Can I calculate a daily or monthly budget?

Yes. Choose day or month as the frequency. The calculator returns the corresponding recurring projections using fixed calendar multipliers.

Limitations

This is a planning estimate, not an invoice. It does not include cached-token discounts, batch pricing, image or audio units, taxes, currency conversion, retries, or provider-specific message overhead unless those values are represented by your token inputs.

Related Tools