About
TokenCalculator.dev is an independent, privacy-first browser-based utility for developers, prompt engineers, and teams analyzing prompt size, API input cost, and context-window utilization before calling an LLM.
Mission
The calculator is maintained around three commitments: text, document contents, and image pixels remain on-device; calculation provenance is exposed for every result; and changing model facts link back to public sources.
Tokenizer methodology
OpenAI-family text uses js-tiktoken with the model’s configured BPE encoding and vocabulary. Where an equivalent offline production tokenizer is not distributed, Claude, Gemini, and DeepSeek use a deterministic Provider-Calibrated UTF-8 Token Projection: UTF-8 byte length is normalized by a provider-family bytes-per-token coefficient. Every result identifies its computation path.
Open model data
Pricing and context-window limits are refreshed from the open-source Models.dev catalog. A bundled, versioned registry keeps the calculator available when that public catalog cannot be reached. Provider invoices and official documentation remain authoritative.
Editorial responsibility
Pricing corrections, methodology questions, and reproducible calculation issues can be sent to hello@tokencalculator.dev. Substantive changes are reviewed against provider documentation before publication.
Last reviewed: August 22, 2026.