TechnicalCost Optimization

Understanding Token Usage Across Different LLMs

By Tali and TamirApril 21, 20252 min read

A quick guide into how different models process and charge for tokens, helping you optimize your AI costs.

If you use large language models (LLMs), it pays to understand how they count and charge for tokens. Every provider tokenizes differently, and that affects both your cost and your performance. This post walks through how the major models handle tokenization, with tips to keep your usage down.

What Are Tokens?

Tokens are the basic units that LLMs process. They can be parts of words, whole words, or even punctuation marks. For example, the sentence "Hello, how are you?" might be broken down into tokens like ["Hello", ",", "how", "are", "you", "?"].

Different models tokenize text differently:

  • OpenAI's GPT models use a tokenizer called "tiktoken"
  • Anthropic's Claude has its own proprietary tokenizer
  • Google's Gemini uses SentencePiece with a different vocabulary
  • Open-source models (DeepSeek, Llama, Mistral) overwhelmingly use byte-level BPE tokenizers

Comparing Token Counts Across Models

We ran experiments with identical prompts across multiple models to compare token counts. Here's what we found:

Model Tokens for "Hello world" Tokens for a 500-word document
GPT-5.5 2 ~750
Claude Opus 4.8 3 ~800
Gemini 3.5 3 ~780

The same text turns into a different number of tokens on each model, and that flows straight through to cost.

Cost Implications

These differences in tokenization have direct cost implications. For example, if Claude consistently uses 10% more tokens than GPT-5.5 for your specific use case, that translates to a 10% higher cost for the same input.

Cost optimization depends on more than token count alone:

  • Response quality: A model that uses more tokens but provides better responses might be more cost-effective overall
  • Token pricing: Different providers charge different rates per token
  • Context length: Some tasks require longer context windows, which some models handle better than others

Optimizing Your Token Usage

Here are some strategies to optimize your token usage across all LLMs:

  1. Be concise in your prompts: Remove unnecessary information or examples
  2. Use compression techniques: For long documents, consider summarizing or extracting key points
  3. Choose the right model for the task: Some models are more efficient for certain types of content
  4. Monitor and analyze: Use TryAii to compare token usage across models for your specific prompts

Conclusion

Token usage drives your LLM costs. With TryAii's comparison view you can see how each model tokenizes your actual content, then pick the right model for each task.

Next up: prompt-optimization strategies that cut token usage without hurting output quality.

About the Author

Tali and Tamir is a contributor to the TryAii blog, focusing on AI technology, LLM comparisons, and best practices.

Related Articles

Why Even Advanced LLMs Get '9.9 vs 9.11' Wrong

Exploring why large language models like GPT-4, Claude, Mistral, and Gemini still stumble on basic decimal comparisons.

April 21, 20253 min read

What "Lunapolis" Reveals About the Shared Training Corpora of Modern LLMs

A data-centric look at why multiple large-language models invent the same lunar-city names—and what that convergence teaches us about their overlapping training sets.

May 12, 20254 min read