Home/Tools/LLM API Cost Calculator
AI calculators

LLM API Cost Calculator

Estimate monthly token costs using your provider’s current input and output rates. No API key or model request required.

✓ LOCAL PROCESSING✓ FREE · NO ACCOUNTREVIEWED 2026-10-24

01 / Input

02 / Result

Ready when you are.

Your result will appear here.

Quick reference

LLM API Cost Calculator: assumptions and output
SettingValue / behavior
Input cost formulainput tokens × input USD / 1M
Output cost formulaoutput tokens × output USD / 1M
Example per request$0.004
Example 10,000 requests$40

Start with representative requests

API bills depend on both traffic and the shape of each request. Measure the entire input, including system instructions, conversation history, retrieved documents and tool definitions. Then estimate the generated output separately. A short user question can still create a large input when an application resends a conversation. Use a provider’s tokenizer or usage records for exact token counts; word counts and character ratios are not reliable billing units across languages and models.

Formula and worked example

The cost per request is input tokens multiplied by input price plus output tokens multiplied by output price, with both prices expressed per one million tokens. Divide that sum by 1,000,000 and multiply by the number of requests per month. For 2,000 input tokens at $1 per million and 500 output tokens at $4 per million, one request costs $0.004. At 10,000 requests, that is $40 per month and $480 per year. These are illustrative user-entered rates, not a quoted price for a named model.

Build realistic scenarios

Compare a typical request, a long-context request and a retry-heavy request. If the model has cached-input discounts, calculate cached and uncached traffic separately and add the results. Batch processing, reasoning tokens, images, audio, search tools, storage and regional charges can have separate billing rules. This calculator covers only the two token rates entered in the form, so those charges need their own budget line. Taxes and currency conversion are also excluded.

Interpret the result

Copy the output into your planning sheet with the provider price-page date and a short description of the workload. Revisit the model after changing prompts or output limits because those changes can alter token usage more than the nominal per-token rate. Requests are not sent to any model or provider. The page runs arithmetic locally, stores no API key and charges nothing. A numerical estimate is useful for comparison, but actual provider usage records are the source of truth for an invoice.

Frequently asked questions

Are provider prices built in?

No. Enter current published rates from the provider you intend to use.

Does this count tokens?

No. It calculates cost from token counts you supply.

Does it make paid API requests?

No. All calculation happens locally.

About this tool

Built and maintained by Mihai at Void Fabric. This page documents the behavior of the current implementation. Found an error or an unclear assumption? Send a reproducible example with sensitive values removed.