How many tokens is your text?

Paste anything: a prompt, email, or document and see the token count and API cost across 10 AI models instantly.

Paste any text above to see word count, token count, and estimated API cost.

This tool is 100% free and ad-free. If it saved you API costs or debugging time, consider supporting the project!

☕ Support howmanytokens.org on Buy Me a Coffee

Frequently Asked Questions

Tokens are the basic semantic pieces of text that a Large Language Model (LLM) reads and processes. A token can be a single character, a syllable, a whole word, or a fragment of a complex word. As a general rule of thumb for English text, 1 token is roughly equal to 4 characters or 0.75 words. Technical writing, code, and text with lots of punctuation or unusual formatting tends to use more tokens per word than plain conversational English.

Roughly 1,300–1,500 tokens for English text, though this varies by tokenizer and content type. GPT models average around 1.3 tokens per word, while other models may differ slightly based on how they split text.

Every AI provider trains their model using a distinct mathematical vocabulary rulebook called a tokenizer. For example, OpenAI’s GPT models use custom algorithms like cl100k_base or o200k_base, while Anthropic’s Claude and Google’s Gemini models use entirely different underlying dictionaries. Because their vocabularies differ, the exact same sentence will split into a different number of text chunks depending on the provider you use, which is one of the most overlooked reasons cost comparisons between providers can be misleading if you’re only looking at price-per-token.

Cost is calculated as: (input tokens × input price per token) + (output tokens × output price per token), based on the specific model’s published pricing. Since input and output are almost always priced differently, and output usually costs more, the split between how much you send versus how much the model generates matters a lot. Paste your text into the calculator above to see the exact token breakdown and estimated cost for 10 models.

AI providers bill users directly based on two core variables: input tokens (the size of the prompt you send) and output tokens (the generation sent back). Furthermore, if your total text exceeds a model’s hard context limit, your API request will immediately error out and fail. Checking your text weight beforehand prevents unnecessary cloud overspending and keeps engineering pipelines running smoothly.

Pricing varies by provider and model tier rather than by a fixed rule. As of 2026, Claude Haiku 4.5 is one of the most affordable options at $0.80 per million input tokens, while Claude Sonnet 4.6 sits at $3.00. GPT-4.1 Nano starts at just $0.10 per million input tokens, making it a strong choice for high-volume tasks. Beyond headline pricing, the two providers also use different tokenizers, so the same text can produce a different token count on each. Use the calculator above to compare costs for your specific text.

Context windows vary by model. Many modern models support 128,000 tokens or more, which is roughly 96,000 words or about 400 pages of text. Some models like Gemini 1.5 Pro support up to 1 million tokens. A larger context window lets you send more text in a single request, whether that’s a long document, an entire codebase, or extended conversation history, without needing to truncate or split it. The calculator above shows how many tokens your text uses so you can check if it fits your chosen model.

No. Everything runs in your browser using client-side processing. We don’t save, log, or transmit your text anywhere, which means you can check sensitive prompts, proprietary documents, or client work through the calculator without it ever leaving your device.

Two factors combine here. First, each provider sets its own price per token, which varies by model tier and capability. Second, and less obviously, each provider’s tokenizer splits the same text into a different number of tokens in the first place. So even if two models had identical pricing, the same paragraph could still cost differently because one tokenizer counts more tokens for it than the other.

It depends on what you’re doing. For simple, high-volume tasks like classification or short responses, lightweight models across any provider tend to be the most economical. For tasks involving very long documents, a model with a larger context window can sometimes work out cheaper overall, even at a higher per-token price, because it needs fewer separate calls. The only reliable way to know for sure is to test your actual text against real pricing, which is exactly what the calculator above is built for.

We review and update pricing regularly as providers change their rates or release new models. If you notice pricing that looks out of date, we always appreciate it being flagged so we can verify and correct it quickly.