Token Calculator
Counts tokens in pasted text with OpenAI's o200k_base byte-pair tokenizer, exact for GPT-4o and newer and approximate for other providers. It also reports characters, words, pages, reading time, and speaking time, and converts tokens, words, characters, and pages using a 0.75 words-per-token ratio with per-token cost estimates across many models.
Everything you enter is processed on your device. This tool loads a code library from cdn.jsdelivr.net, which sees your IP address but never what you type.
Documentation
A token calculator converts text length between tokens, words, characters, and pages, and projects what a piece of writing will cost to send to a language model. One mode converts a length that is already known; the other measures a real block of text directly. Setting an encoder and a price per token ties the estimate to a specific model's tokenizer and rate, projecting token cost, context-window fit, and reading or speaking time before any text reaches an API.
Tokens, words, characters, and pages describe the same passage at four different resolutions, connected by fixed ratios rather than treated as separate counts. Any one of the four can be set as the input value, with the remaining three computed from it. Words per page defaults to 500 words but adjusts to match a specific manuscript or reporting convention. Cost is computed as tokens multiplied by a price per token in a chosen currency: each encoder carries a default rate, and that rate can be replaced with a provider's published price. An optional comparison view sets the resulting length against familiar benchmarks such as short-story or novel scale.
Analyzing a precise text sample plans prompt size and budget more accurately than a ratio-based conversion. The token count is produced by OpenAI's o200k_base byte-pair tokenizer running in the browser, so it is exact for GPT-4o and newer OpenAI models and a close approximation for providers that do not publish an in-browser tokenizer. The same sample yields word and character totals, a page count, an estimated reading time, and a speaking time, useful for scripting videos, podcasts, and presentations. Encoder and words-per-page settings carry over from the converter, so page and reading-time estimates follow the same conventions in both modes.
The token counter and cost estimator derive results two different ways. The Text Analysis tool counts tokens with a real byte-pair tokenizer (OpenAI o200k_base); the Token Converter has no text to tokenize, so it estimates tokens from a words-per-token ratio that is approximate and varies by model.
- Text Analysis token count = exact tokens from the o200k_base tokenizer (a close approximation for non-OpenAI providers).
- Converter words per token = encoder ratio (default 0.75 words per token).
- Words = Tokens × words per token.
- Tokens = Words ÷ words per token.
- Characters ≈ Words × average characters per word (default 5).
- Pages = Words ÷ words per page (default 500).
- Estimated cost = Tokens × cost per token, displayed in the selected currency.
- Reading time (minutes) ≈ Words ÷ 250.
- Speaking time (minutes) ≈ Words ÷ 130.
A token calculator supports planning prompts, managing API budgets, and sizing content for AI models, writing, and research.
- Estimate AI usage cost by converting planned prompts and completions to tokens and currency.
- Check model input limits by converting large documents to token counts before submission.
- Plan article, essay, or script length by comparing words, pages, and reading or speaking time.
- Scope proposals, theses, and reports by translating target pages into words and tokens.
- Measure dataset size for training or evaluation by converting bulk text to tokens and pages.
- Run cost scenarios by switching encoders, adjusting words per page, and updating cost per token.
- Prepare retrieval and question answering content by keeping passages within token limits.
Interpret the results to make clear decisions. Tokens show what the model processes. Words and characters show human length. Pages convert length to a familiar print estimate. Reading time helps plan user experience for blogs, documentation, and support content. Speaking time helps script podcasts, webinars, and voiceovers. Treat costs as estimates because providers price input and output differently by encoder and may change rates. Verify costs in your provider dashboard before you deploy or scale usage.
Plan a blog post by entering 1,200 words and reviewing the token count, page estimate, and reading time to fit your publication template. Price a customer support summary by pasting the draft and checking the token cost against your monthly budget. Validate a dataset by converting a 50-page report to tokens to confirm the content fits within a model context window. Compare encoders by switching the Encoder and observing changes to cost per token and total spend. Align a video script by checking speaking time to target a 3-minute, 5-minute, or 10-minute slot.
What is a token? A token is a unit of text that a language model reads or writes. The Text Analysis tool counts tokens with OpenAI's o200k_base tokenizer, which is exact for GPT-4o and newer OpenAI models; other providers use their own tokenizers, so those counts are close approximations. Why do costs differ? Providers price input and output tokens differently and may change rates over time, so treat the calculator as a planning tool. How accurate are page counts? Page counts depend on your words-per-page setting. Set this value to match your formatting. How should I use encoders? Use the encoder that matches your target model to improve token estimates. Can I use currencies other than USD? Yes. Select a symbol and enter your price per token, then review cost in your chosen currency.
Inputs, outputs, and what the Token Calculator computes
What the Token Calculator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.
Inputs
- Text input for analysis
- Words per page (numeric input) · default: 500
- Encoder
- Number of Tokens (text input) · default: 4,096
- Select non-token unit · default: Words
- Cost per token: $ € £ ¥ ₹ ₩ ₽ ₺ R$ CHF kr ₪ ₱ ฿ ₫ ₴ ₦ ₲ Kč zł RM lei · default: $
- Cost per token (text input) · default: 0.0000125
- Show Facts · default: off
Controls
Calculate · Reset All
Computation
Text Analysis token count = exact tokens from the o200k_base tokenizer (a close approximation for non-OpenAI providers).
Example
Plan a blog post by entering 1,200 words and reviewing the token count, page estimate, and reading time to fit your publication template.