jsonversal

LLM Token & Pricing Calculator

Estimate how many tokens your text contains and the approximate cost across GPT, Claude, Llama and Gemini. Runs entirely in your browser — your text never leaves your device.

Estimated tokens
Characters
Words
Estimated cost
Select a model and enter text to see an estimate.

How to use

  1. Paste your text — token, character and word counts update instantly.
  2. Pick the model you plan to use from the dropdown.
  3. Choose whether you need input + output cost or output only.
  4. Read the estimated cost under the model selector.

Pricing is approximate and based on per-million-token list prices at the time of writing. Double-check the current rate with your provider before relying on the number.

Frequently Asked Questions

How accurate is the token estimate?

This is an approximation, not a real tokenizer. English text is usually close (roughly 4 chars per token), but accuracy varies by model and language. Always verify exact counts with the provider when it matters.

Why does the estimate differ from the real tokenizer?

Each model uses its own byte-pair encoding (BPE) tokenizer with a specific vocabulary. This tool applies a lightweight heuristic, so results may differ from OpenAI’s tiktoken or Anthropic’s tokenizer.

Does my text get uploaded?

No. The text you paste is processed entirely in your browser with JavaScript. Nothing is sent to any server.

Which models are included?

GPT (4o / 4.1 / o-series), Claude (Sonnet / Haiku / Opus), Llama and Gemini families, with configurable input and output pricing per million tokens.

More tools