What Is Token?
Also known as: LLM Token, Text Token
Definition
A token is the basic unit of text a language model processes, usually a word fragment rather than a whole word. In English, one token averages roughly four characters, so about 100 tokens covers 75 words.
Token Explained
Tokenizers are built by learning which character sequences appear together most often in a training corpus, typically using byte-pair encoding or a similar subword algorithm. Frequent words become single tokens, rare words split into several pieces, and unusual strings can fragment heavily. The vocabulary is fixed at training time, commonly somewhere between 32,000 and 250,000 entries depending on the model family and how many languages it targets.
Token counts are not proportional to character counts in the way people assume. Ordinary English prose sits near the four-characters-per-token average. Code, JSON, and XML tokenize far less efficiently because braces, indentation, and punctuation each consume tokens. Part numbers, serial numbers, and alphanumeric identifiers fragment badly: a string like 44-7192-AX may consume six or more tokens. Non-English text, especially non-Latin scripts, often uses two to four times more tokens for the same meaning.
Everything that matters commercially is measured in tokens. Context windows are expressed in tokens, cloud API pricing is per token, throughput is tokens per second, and KV cache memory scales with token count. Because output tokens are generated one at a time while input tokens are processed in parallel, output is generally the more expensive side in both latency and cloud pricing, which is why concise output instructions have a real effect on cost.
For estimation, useful rules of thumb hold well enough. A page of prose is roughly 500 to 700 tokens. A typical work instruction or procedure runs a few thousand. A long technical specification can reach tens of thousands. Multiply by the number of retrieved chunks a RAG prompt carries and the arithmetic of context budget becomes concrete quickly. Always verify with the actual tokenizer for your model family, since counts differ meaningfully between families.
Why It Matters
- Context window limits are token limits, so document chunking and retrieval budgets must be planned in tokens rather than pages.
- Cloud AI pricing is per token, making token efficiency a direct line item rather than an abstract engineering concern.
- Part numbers and identifiers fragment into many tokens, quietly consuming context in exactly the ERP workloads that rely on them.
- KV cache memory scales with tokens per request, tying prompt length directly to how many concurrent users a GPU can serve.
In Practice
A team estimated that fifty retrieved records would fit comfortably in a 32,000-token window based on character count. In practice the records were JSON with long field names and alphanumeric part codes, tokenizing at nearly double the expected rate, and half the records were silently truncated out of the prompt.
Frequently Asked Questions
How many tokens are in a page of text?
A standard page of English prose, roughly 400 to 500 words, comes to about 500 to 700 tokens. Dense technical documents with tables, part numbers, and specifications run higher, sometimes 1,000 or more per page. Code and structured data such as JSON can double these figures because punctuation and identifiers tokenize inefficiently.
Why do input and output tokens cost different amounts?
Input tokens are processed in a single parallel prefill pass, which uses the GPU efficiently. Output tokens are generated sequentially, each requiring a full pass over the model weights, so they cost far more compute time per token. That is why cloud providers typically price output tokens several times higher than input tokens and why limiting response length reduces cost meaningfully.
Related Terms
Context Window
A context window is the maximum number of tokens a language model can hold in view at one time, covering the system instructions, conversation history, retrieved documents, and the generated response combined.
LLM (Large Language Model)
An LLM (Large Language Model) is a neural network with billions of parameters trained on huge volumes of text to predict the next token in a sequence, which gives it broad language understanding, reasoning, and generation ability.
Inference
Inference is the phase in which a trained model is run to produce output from new input, as opposed to training, where the model's weights are being learned. In production, inference is where essentially all AI compute cost is spent.
Go Deeper
On-Prem vs Cloud AI Cost Comparison Calculator
Compare your projected cloud LLM API bill against an amortized on-prem GPU deployment and find the breakeven month.
On-Prem LLM Deployment Architecture: Reference Guide
Reference architecture for on-prem LLM deployment: inference servers, GPU sizing, RAG pipelines, and security zones for regulated manufacturers.
Small Language Models vs LLMs for Enterprise Workloads
Small language models vs LLMs for enterprise workloads: accuracy, cost, GPU footprint, and when a 7B model beats a frontier model for ERP automation.
Working with Token in a live environment? Our engineers do this every day - and our AI agents automate most of it.
Try it here, free
MCP Tool Definition Context Token Overhead Calculator
Sizes the context window and input cost eaten by MCP tool schemas before the user says a word, and shows the what-if as you add tools.
Keep exploring
Free tools
- MCP Tool Definition Context Token Overhead CalculatorSizes the context window and input cost eaten by MCP tool schemas before the user says a word, and shows the what-if as you add tools.
- LLM Token Cost Calculator for ERP ChatEstimate what an ERP chat assistant costs per month on a pay-per-token API, including retrieved context and output length.
- LLM Token Cost CalculatorTurn request volume, prompt length, and per-million token pricing into a defensible monthly and annual LLM budget, including the effect of prompt caching.
ERP fixes and how-tos
- NetSuite Delete Integration: How to Remove an Integration Record and Its Token Access SafelyHow to delete or disable a NetSuite integration record and revoke its tokens safely: find what uses it, block it first, revoke access tokens, then remove it.
- Prophet 21 API returns 401 Unauthorized: how to fix token and OData accessGetting 401 from the Prophet 21 API or OData service? Check the token request, bearer header, user permissions, and server URL, with a working curl pattern.
- Fishbowl Inventory API Documentation: Auth, Endpoints and ExamplesA practical guide to the Fishbowl Inventory REST API: where the docs live, how login and tokens work, the main endpoints and example requests you can try.
Guides
- SyteLine REST API Authentication: OAuth, Tokens, and SecurityConfigure SyteLine REST API authentication with OAuth 2.0, bearer tokens, and basic auth. Secure your CloudSuite Industrial API integrations with proven patterns.
- The LLM Inference Cost Optimization PlaybookCut LLM inference costs with a practical playbook: quantization, batching, GPU right-sizing, caching, and the on-prem vs API breakeven math for 2026.
- How to Fix SyteLine Login and Authentication ErrorsResolve SyteLine login failures including 'Authentication failed' and 'Unable to validate credentials' errors. Covers SSO, AD integration, and token configuration.
AI on your ERP
- Natural Language Query for ERP Data: Ask SAP, Infor, or Oracle a Question in Plain EnglishSee how natural language query over SAP, Infor, Oracle, and NetSuite data works: grounded text-to-SQL, role-based permissions, and a visible audit trail.
- AI for SAP EWM: Ask About Warehouse Tasks, Handling Units and Stock in Plain EnglishAI for SAP Extended Warehouse Management: ask about warehouse tasks, handling units and storage bins in plain English, with a private model close to S/4HANA.
Integrations
- How to build an MCP server for Sage 100How to build a Model Context Protocol server for Sage 100: tool design, ODBC and SQL access, auth, transports, permission scoping and audit logging.
- How to add an AI chatbot to Sage 100How to build an AI chatbot on Sage 100 for staff and customers: grounded answers from ERP data, role-based access, and a fully on-prem option with open models.
Troubleshooting
- Why your cost per token is too high, and the biggest levers to fix itHigh cost per token almost always traces back to low GPU utilization, the wrong model size, or no quantization or caching. Here is how to find the biggest lever.
- Why vLLM keeps generating past the end of turn, and how to fix stop tokensRunaway vLLM generation usually means eos_token_id doesn't match the model's real end-of-turn token. Fix it with explicit stop_token_ids or stop strings.