AI token cost calculator

AI token cost calculator

Estimate token counts from text length and calculate GPT / Claude API costs

Choose a model

Pricing (USD, per 1M tokens)

Filled in by the preset, editable

Text to send (optional)

Automatically estimates the input token count

Repetition

Token counts cannot be exact here

Real tokenizers differ by model and cannot be reproduced in a browser without the official library. This calculator uses a character-based estimate instead — non-Latin scripts (like Korean, Chinese, or Japanese) tend to use noticeably more tokens per character than English. The API response's usage field is always the accurate number; this tool is for rough sizing.

Prices change without notice

The presets reflect published pricing at the time they were added, taken directly from each provider's official pricing page. API prices can change at any time, so treat the presets as a starting point — edit the fields directly and check the provider's current pricing page before billing anyone based on this.

More calculators

Frequently asked questions

QWhy multiply by number of requests?

A single call looks cheap, but a service calling the same prompt hundreds or thousands of times a day adds up fast. Enter your daily call count to estimate a day's cost, or multiply by 30 for a rough month.

QDoes this count tokens for non-English text accurately?

It is a rough estimate only. Character-to-token ratios vary a lot by script and by model's specific tokenizer — treat this as an order-of-magnitude guide, not an exact count.

QWhere do the price presets come from?

They are copied from Anthropic's and OpenAI's official pricing pages at the time they were added to this tool. Always confirm current pricing directly with the provider before relying on it for billing.