Calculator

Token counter / tokenizer

Paste a prompt and get a fast token estimate, plus a one-request cost preview against current list prices.

Live token count

Planning estimate

34tokens

$0.003042 / request · GPT-5 · $3.04 @ 1K req

Input cost$0.000043
34 tok
Output cost$0.003
300 tok
Characters138
Words23
Lines1
Chars / token4.0

Prompt

Text to count

Paste a prompt, system message, or document chunk—counts update live.

Exact BPE (o200k / cl100k). OpenAI family uses exact BPE; others are planning ratios. Likely range 29–41.

Cost

Quick cost preview

Uses the estimated token count as uncached input for one request.

Input$0.000043
Output$0.003
Total / request$0.003042
At 1,000 requests$3.04

OpenAI-family counts use the browser GPT BPE tokenizer (o200k_base / cl100k_base). Anthropic, Google, and DeepSeek remain planning estimates—confirm with each provider SDK for production billing. Pricing snapshot updated 2026-07-31. Approximate static list prices for planning only. Always verify against each provider’s official pricing page before production budgeting.

Guide

How to get value from this calculator

Count tokens in your prompt and expected completion before you send a request or size a budget. Token counts drive billing on every major API, and small wording changes can shift cost noticeably at high monthly volume. Paste text directly—no API key required.

Cost formula

Estimated request cost = (prompt tokens / 1,000,000 × input price) + (completion tokens / 1,000,000 × output price)

Why it matters

You cannot estimate spend accurately without token counts. Character length, language, and special formatting all affect tokenization, so guessing from word count leads to budget errors that compound at scale.

How to use it

  1. Paste or type your system prompt, user message, and any retrieved context.
  2. Select the tokenizer that matches your target model family.
  3. Review the input token count and adjust prompt length if needed.
  4. Enter an expected completion length to preview output-side cost.
  5. Read the live cost preview in the verdict panel as you edit.
  6. Compare token counts across model encodings if you might switch providers.
  7. Use the count to feed monthly volume into the API cost calculator.

Planning tips

  • Include tool definitions and JSON schema in your count—they add hidden tokens.
  • Multimodal inputs (images, files) add tokens beyond visible text; count those separately.
  • Long system prompts are re-sent on every request unless cached—factor that into monthly volume.
  • Test a few representative user messages, not just an average-length example.
  • Use the verdict's live cost preview to catch expensive prompts before production volume.
  • If output is capped by max_tokens, use that cap as your planning completion length.

Frequently asked questions

Is the token count exact?

Counts use the same tokenizer families providers bill against and are suitable for planning. Edge cases in special tokens or provider-side preprocessing may differ slightly from your invoice.

Do I need an API key to count tokens?

No. Token counting runs entirely in your browser. Nothing is sent to CentsPerToken servers or to any LLM provider.

Why does the same text tokenize differently across models?

Each model family uses its own vocabulary and encoding rules. A prompt that is 800 tokens on one model may be 950 on another, which changes cost when you switch providers.

How do I estimate monthly cost from a single prompt?

Multiply per-request input and output cost by expected daily requests and by 30. Use the API cost calculator for a fuller model-by-model breakdown.