๐ŸŒ EN

๐Ÿงฎ AI Token Cost Calculator

Calculate token costs for GPT, Claude, Gemini and other major LLM APIs. Enter token counts directly or paste text to estimate them, then check the projected monthly cost.

Monthly usage simulation

In paste mode, or in direct mode when input/output are left blank, the simulation assumes a 70% input / 30% output split per request. If both input and output tokens are filled in direct mode, those exact per-request numbers are used instead.

Estimated cost (per request)
Input cost โ€” Output cost โ€” Total cost โ€”
Input cost if cached (reference)
โ€”

Real-world caching applies to repeated system prompts or context, not to a full novel input on every call.

Source:
Monthly usage simulation
Cost per day โ€” Cost per month (ร—30) โ€” Cost per year (ร—365) โ€”
GUIDE

Learn more

01

1. Why estimate LLM API cost before you scale

Working out expected cost before wiring an LLM API into a new feature or product keeps a growing user base from turning into an unmanageable bill. This matters even more for services with long prompts or multi-turn conversations โ€” a single request may look cheap, but the numbers change fast once you multiply by daily or monthly volume. This calculator shows both the per-request cost and a monthly simulation so you can get a budget sense before you scale.

02

2. How tokens differ from words and characters

A token is the smallest unit a model processes text in, and it doesn't map 1:1 to words or characters. A common rule of thumb for English is roughly 4 characters per token, but that's only an approximation โ€” actual counts depend on each model's tokenizer (e.g. BPE-style). CJK languages (Korean, Japanese, Chinese) in particular tend to use more tokens per character than English, since a single character is often split into multiple subword tokens โ€” so the same character count can cost noticeably more than equivalent English text.

03

3. Why input and output pricing differ

Most providers price output (generated) tokens several times higher than input (prompt) tokens, and every model in this dataset follows that pattern. Input can be processed (encoded) all at once, while output has to be generated (decoded) one token at a time โ€” more compute and latency per token. That's why keeping responses short is an especially effective lever for cutting cost.

04

4. What prompt caching is

Prompt caching (context caching) lets a provider cache a system prompt, long context, or document on the server side, then charge a much lower rate when the same content shows up again on a later request. It pays off most in conversational setups where a system prompt or chat history is retransmitted on every turn. It doesn't apply when every request sends genuinely new text, so the "if cached" figure in this calculator is a reference scenario, not a guarantee.

05

5. How to reduce token costs in production

(1) Keep prompts as short as the task actually requires โ€” include only necessary context. (2) Take advantage of prompt caching for system prompts or context that repeat across requests. (3) Route simple tasks like classification or summarization to a cheaper, smaller model instead of your flagship model. (4) Batch multiple requests together to take advantage of batch discounts or throughput optimizations. These four levers alone can meaningfully cut real-world operating cost.

06

6. Limitations of this calculator

This calculator estimates cost from each provider's published list-price API rates. It does not account for volume discounts, enterprise agreements, provisioned throughput, free credits, regional price differences, or the effective slowdown from rate limits. Actual billed amounts can differ based on your contract terms โ€” use this as a starting point for budgeting, and confirm final numbers directly with the provider.

Frequently asked questions

How accurate is the text-to-token estimate?
~4 characters per token is a rough rule of thumb based on English text. Actual tokenizers vary by model, and non-English text (Korean, Japanese, Chinese, etc.) can deviate from this approximation more. For exact counts, run the text through the model provider's official tokenizer.
Why is output more expensive than input?
Generating tokens one at a time (decoding) takes more compute than processing input all at once (encoding), which is why most providers price output tokens several times higher than input tokens.
Does this include image or audio tokens?
No โ€” this calculator only handles text tokens. Image, audio, and video inputs are often billed under separate pricing schemes that are out of scope here.
How often are these prices updated?
Manually, as of the date shown in the data file's as_of field. Provider prices can change without notice, so always confirm the latest numbers on the provider's official pricing page before finalizing a budget.