Grok token calculator

Estimate Grok context and cost before sending.

A private planning calculator for Grok prompts, expected output, context headroom, and xAI token pricing — including the doubled rates on 200K+ prompts.

Grok 4.6500,000token context window
$2 input / 1M $0.5 cached / 1M $6 output / 1M
Official · verified 2026-08-16View provider pricing ↗Current flagship (Aug 2026). Prompts of 200K+ tokens pay doubled rates on the entire request.

What this page helps you decide

  • Measure plain-text prompt size locally with a real tokenizer.
  • See input, cached input, and output cost separately.
  • Watch the 200K long-context tier that doubles Grok rates.
  • Compare Grok 4.6 and 4.5 with Claude, GPT, Gemini, and Kimi.

Prices are planning references, not a billing guarantee. Check the provider’s current pricing before launch.

Estimate a Grok 4.6 request
500,000 context
0input tokens · local estimate
$0.00estimated input cost
$0.0030reserved output cost
$0.0030estimated request total

0.10% of context reserved. Close approximation · o200k proxy — counts are exact for OpenAI models and a close approximation for xAI; provider formatting, tools, and files can change the real count.

The formula

From prompt to request cost

Estimated request cost equals input tokens multiplied by $2 per million, plus expected output multiplied by $6 per million. Cached input is separate only when the provider publishes a rate.

What changes the result

Count the assembled request

System instructions, conversation history, retrieved documents, tool definitions, files, and response length all matter. Use the visible prompt for drafting, then validate the final payload with xAI.

Before you rely on the number

Grok 4.6 calculator questions

Is this Grok 4.6 token count exact?

No. It is a private plain-text planning estimate. xAI tokenization, chat formatting, tools, files, and images can change the real count.

Does the prompt leave my browser?

No. The calculator runs locally in your browser. Only the page itself and published registry data are loaded from PromptCostLab.

How should I verify production cost?

Check the linked xAI pricing page, then compare the estimate with token usage returned by the real API request.