Skip to content
CoronRing
All tools

Token Counter

Context budgeting is guesswork without a real count, and model choice is guesswork without a real price. Paste a prompt, see tokens, then compare projected cost across the whole hosted-model catalogue rather than the four models you happen to remember.

Reads LiteLLM’s public price list from GitHub, or its jsDelivr mirror, each time the page opens. Your text is never sent anywhere, and the request carries nothing but its own URL.

Input text
tokens
0
±0
characters
0
words
0
lines
0

Estimate, not an exact count. No production tokenizer runs client-side, so this uses a segment-weighted character model, typically within ±10% on prose and ±15% on code. For an authoritative figure, call the provider's own counter, e.g. /v1/messages/count_tokens.

Projection
Calls
Cost · 4 models
loading prices
Model$/1M in$/1M outCache readContextEst. cost
Claude Opus 4.6pinned
Most capable Anthropic reasoning and agentic coding model.
$5.00$25.00—
1M
$0.00
Gemini 2.5 Flashpinned
High-speed, multimodal Google model with 1M context window.
$0.300$2.50—
1M
$0.00
GPT-4opinned
OpenAI flagship versatile multimodal model.
$2.50$10.00—
128K
$0.00
DeepSeek V4 Flashpinned
Ultra-fast and cost-efficient reasoning and chat model.
$0.440$1.32—
1M
$0.00

Rates come from LiteLLM's price list. They are list prices: they exclude batch discounts, committed-use rates, priority tiers, and per-request surcharges such as web search. Cache-write cost is not modelled. A first pass over a cached prefix bills above the input rate, so a cold run costs more than shown here.

About this tool

01 · Pricing Catalogue

Aggregates over 2,400 models across 80+ providers from LiteLLM's unified index. Statically compiled to eliminate external network requests.

Units: Standardized USD / 1M input, output, and cached tokens.

02 · Segment-Weighted Estimator

Runs entirely in-tab with zero prompt leakage. Uses character-class weighting (code, CJK, digits, whitespace) to outperform naive chars/4 heuristics.

Precision: ±10% on prose, ±15% on code structures.

Operational Limits & Assumptions

  • · Budgeting vs Billing: Ideal for architectural sizing and price projection; not for final invoice reconciliation.
  • · List Pricing: Excludes volume tier discounts, enterprise commitments, and tool call add-on fees.
  • · Cache Reads: The cache slider applies published cache-read rates and excludes one-time cache-write costs.
  • · Snapshot Date: Reflected date indicates the price list sync timestamp.

Found a case it gets wrong? Tell me about it .