Tools Web

Calculators

Grok Token Cost Calculator

Estimate xAI Grok API spend from input and output tokens. Presets cover Grok 4.7, 4.6, and 4.3 short-context list rates; edit $/1M for long-context bands. Cost = tokens ÷ 1,000,000 × price per 1M. Estimates only; official xAI pricing prevails.

Math runs in your browser. Nothing is uploaded.

Custom $/1M rates (optional)

Estimated USD cost
—

Input cost
—

Output cost
—

Per 1k input tokens
—

Per 1k output tokens
—

Estimates only; official vendor pricing prevails (2026-10-30). Cost = tokens ÷ 1,000,000 × price per 1M.

OpenAI Token Cost Calculator · Claude Token Cost Calculator · Gemini Token Cost Calculator · LLM API Cost Calculator

How it works

How is Grok token cost calculated?
USD cost = (input tokens ÷ 1,000,000 × input $/1M) + (output tokens ÷ 1,000,000 × output $/1M). Grok 4.7 at $2 / $6 with 100k in + 20k out ≈ $0.32.
Which Grok models are presets?
Grok 4.7, 4.6, and 4.3 short-context (<200K) list rates from xAI. Long-context bands use higher $/1M—edit the custom fields.
Does long context change the price?
Yes. Once a prompt reaches about 200K tokens, xAI bills the higher long-context band for the whole request. Override $/1M when that applies.
How does this relate to OpenAI or Claude pages?
Same token formula. Open the OpenAI, Claude, Gemini, or LLM API calculators for other vendors.
Can xAI change these prices?
Yes. Estimates only; confirm on xAI’s pricing docs before you budget.