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
More in this group
- DeepSeek Token Cost Calculator deepseek-flash / v4-pro cost, peak vs off-peak, cache hit/miss.
- OpenAI Token Cost Calculator GPT-5 / 4.1 / o-series token cost in USD.
- Claude Token Cost Calculator Fable / Haiku / Sonnet / Opus token cost in USD.
- Gemini Token Cost Calculator Gemini 2.5 / 3 Flash and Pro token cost in USD.
- LLM API Cost Calculator Generic token cost from any $/1M rates.
- AI Agent Cost Calculator Multi-step agent token cost per task and month.
- RAG Cost Calculator Embed + retrieve + LLM token cost in USD.
- Gemini Grounding Cost Calculator Gemini Search grounding queries after free quota.
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.