Skip to content
llmkitty calico cat logo llmkitty

AI Token Cost Calculator

Estimate the API cost of any OpenAI, Anthropic, Google, Llama, Mistral, DeepSeek, or Grok call. Enter token counts or paste your text, split input vs output, and project the monthly bill, all in your browser.

Your usage

Prices per 1M tokens · Last verified: 2026-07-12

 · verify price

Estimated Monthly Cost

$0.0075

≈ $0.00/day

Cost per API call

$0.0075

Input 0% · $0

Output 0% · $0

Input tokens (0) $0
Output tokens (0) $0
Total per call $0
llmkitty sleeping cat, curled up next to the cost readout

How to use the AI token cost calculator

Pick a provider and model, then tell the calculator how much text moves in each direction. You can enter token counts directly (typing shorthand like 100k or 1.5m works too), or switch to "Paste text" and drop in a sample prompt and answer to get an automatic token estimate. Set how many requests you expect per month and the tool projects the running bill. Turn on "Compare another model" to see a second model's cost next to the first, useful when you're deciding between a flagship and a cheaper option. Every number updates live, and the whole thing runs on your device. Nothing you paste is uploaded. If you want an exact token count for your actual text first, including real tiktoken-equivalent counts for OpenAI models, try the token counter, then use its "see what this costs to run" link to bring the count straight back here.

Comparing API cost across providers

OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, and xAI all price by the token, but the absolute rates and the input/output spread vary a lot between them, and between models from the same provider. A flagship reasoning model from one vendor can cost ten times more per million tokens than a small, fast model from another, for tasks where the smaller model is perfectly adequate. This hub calculator lets you switch providers and models in the same view so you can shop the whole market at once. If you already know which provider you're using, the dedicated calculators below skip the provider picker and go straight to that vendor's model lineup and cost-cutting notes:

Input tokens vs output tokens

Language model APIs bill in two directions. Input tokens are everything you send: the system prompt, instructions, examples, and the user's message. Output tokens are what the model generates back. These are priced separately, and output almost always costs more, frequently three to five times the input rate, because generating text is more expensive than reading it. That asymmetry matters: a task with short prompts and long answers (like drafting) is dominated by output cost, while a task with huge context and short answers (like classification over documents) is dominated by input cost.

How token estimation works here

When you paste text, the calculator estimates tokens per-model rather than applying one heuristic across the board. Most estimate-lane models split at roughly four characters per token (about 1.33 tokens per word for English), and that's the default here. Anthropic's newer tokenizer (Opus 4.7+, Fable 5, Sonnet 5) is the one confirmed exception: it runs about 30% denser, so this calculator estimates those Claude models at roughly 3.1 characters per token instead of 4, so a Sonnet 5 estimate doesn't quietly undercount next to a Haiku 4.5 one. This is close enough for budgeting but not exact; real tokenizers split code, punctuation, numbers, and non-English scripts differently. For a precise count, use the provider's official tokenizer, or the exact BPE counts this site's token counter runs client-side for OpenAI models; for planning a monthly bill, the per-model estimate is fine.

A worked example

Say you send a 1,000-token prompt and get a 500-token answer on a model priced at $2.50 input and $10.00 output per million tokens. Input costs 1,000 ÷ 1,000,000 × $2.50 = $0.0025. Output costs 500 ÷ 1,000,000 × $10.00 = $0.005. That's $0.0075 per call, and at 100,000 calls a month, $750. Drop to a mini model at a tenth of the price and the same volume costs $75. That single swap is usually the biggest lever you have. Use the compare toggle above to see it side by side before you commit.

Cutting your bill

The highest-impact moves are choosing the smallest model that still meets your quality bar, trimming system prompts and few-shot examples you no longer need, capping maximum output length, and caching or reusing context that repeats across calls. Measure before optimizing: run this calculator on your real average prompt and response sizes rather than guessing, because the shape of your traffic decides which lever pays off. Compare a few models side by side using the same token counts to see the trade-off between price and capability before you commit.

Frequently asked questions

How is API cost calculated for language models?

Providers charge per token, priced separately for input (the prompt you send) and output (the text the model generates). Cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate). This calculator does both halves and adds them.

Why does output cost more than input?

Generating tokens is more compute-intensive than reading them, so nearly every provider prices output higher than input, often 3-5×. That means a short prompt with a long answer can cost far more than a long prompt with a short answer.

How many tokens is 1,000 words?

Roughly 1,300-1,400 tokens for typical English, since a token averages about ¾ of a word (or ~4 characters). Code, punctuation, and non-English text tokenize differently, so treat any text-based estimate as approximate.

How do I estimate tokens from text without an API?

A common rule of thumb is characters ÷ 4, or words × 1.33. This tool uses that heuristic when you paste text. For exact counts, use the provider’s official tokenizer, but the estimate is close enough for budgeting.

Are these prices current?

Prices change often. Each provider links to its official pricing page next to the model menu. Check there before relying on a figure for a real budget. The last verification date is shown under the result.

How can I reduce my token costs?

Use a smaller model where quality allows, trim system prompts and few-shot examples, cap max output length, cache or reuse repeated context, and batch requests. Switching a high-volume task from a flagship to a mini model often cuts cost 10-20×.

Related tools

OpenAI API Pricing CalculatorClaude API Pricing CalculatorGemini API Pricing CalculatorLlama API Pricing CalculatorMistral API Pricing Calculator