Token Cost Calculator

Grok API Pricing

xAI Grok rates per 1M tokens — Grok 4.7 with its long-context band and cached-input rate, plus the retired Grok 4 row — priced against every other model.

Last updated: 2026-10-27

1,000
2,000
400
1,000 × 2,000in + 400out = 2,000,000 input,400,000 output tokens

Estimated cost across 1 models

Grok Cheapest

Grok 4.7

$6.40/ month
$76.80 / year
Input
$4.00
Output
$2.40400,000 tokens
Input
$2.00 / 1M2,000,000 tokens
Output
$6.00 / 1M
Context window
500,000Last updated: 2026-10-20

Prices verified 2026-10-27. Source: official provider pricing pages. · Machine-readable: /api/prices.json

Rates in force

Every rate below is the one in force on 2026-10-27 — the same resolution the calculator charges with, so a promotional base rate is never quoted as the long-term price.

ModelInput /1MOutput /1MCached input /1MContext windowNotesStatus
Grok 4.7$2$6$0.5500Kabove 200K tokens: input ×2, output ×2Active
Grok 4$3$15$0.75256Kno long-context bandRetired

Prices as of 2026-10-27

Quick takeaways
  • 1Grok 4.7 is the current xAI flagship in the registry, priced on a short-context rate with a long-context band on top.
  • 2The long-context band applies to the whole request, so one oversized prompt is billed at the higher rate.
  • 3Grok publishes a cached-input rate, so a repeated prefix is priced at the cache rate instead of the input rate.
  • 4Grok 4 is retired but kept in the registry, so the old prices stay findable.
  • 5Every rate below is the one in force on the snapshot date, not a promotional base rate.
Token Cost Calculator

How to bring the bill down

  1. 1Price the repeat: the cached-input rate is the single biggest lever when the same system prompt goes out on every call.
  2. 2Split long documents into requests that stay under the long-context threshold where you can.
  3. 3Compare blended rates, not headline rates — output is usually the bigger share of a real bill.
  4. 4Use the calculator’s cached-input switch to see the effect on a monthly workload.
  5. 5Check the context window before you paste: the row that fits your document is not always the cheapest one.
frequently asked

Frequently asked questions

How much does Grok 4.7 cost per 1M tokens?
Grok 4.7 is $2 per 1M input tokens and $6 per 1M output tokens, with cached input at $0.50 per 1M and a 500K context window.
What does Grok prompt caching cost?
A Grok 4.7 cache hit is $0.50 per 1M tokens against $2 per 1M uncached — a 75% discount. A request that repeats a long prefix pays the cache rate for that prefix instead of the input rate.
What does Grok cost above the long-context threshold?
Up to 200K tokens, a Grok 4.7 request is billed at $2 per 1M input and $6 per 1M output. Above that threshold the same request is billed at $4 per 1M input and $12 per 1M output.
How does Grok 4.7 compare with Gemini and Claude on price?
Grok 4.7 is $4 per 1M blended, against $6 for Gemini 4 Argon and $12 for Claude Opus 5.5 on the same measure.
Is Grok 4 still available?
Grok 4 is retired — the registry keeps its price so the old numbers stay findable, but the API now serves Grok 4.7 at $2 per 1M input and $6 per 1M output.
More calculators

Pick the right page for your use case

Token Cost Calculator

Compare prices across OpenAI, Claude, Gemini, DeepSeek, MiniMax, and Grok. Real tokenizer for OpenAI, accurate estimates for the rest.

Compare every LLM price →

OpenRouter Pricing Calculator

See what your tokens actually cost after the OpenRouter markup — and when going direct to the provider is cheaper.

Calculate OpenRouter markup →

Claude Token Cost Calculator

Cost per token and monthly estimates for Claude Opus, Sonnet, and Haiku — with the Anthropic API.

Calculate Claude API cost →

DeepSeek API Pricing

V4-Pro and V4.1-Flash per-token rates, off-peak hours, and prompt-cache savings — compared to Claude, GPT, and Gemini.

View DeepSeek API pricing →

ChatGPT API Pricing

GPT-6 and GPT-5 per-token rates, Batch API 50% off, and prompt-cache savings — compared to Claude, Gemini, and DeepSeek.

View ChatGPT API pricing →

Gemini API Pricing

Google Gemini rates per 1M tokens — Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.8 Flash and the Flash-Lite tier — with the long-context band, the cache rate and the service tiers, priced against every other model.

View Gemini API pricing →

MiniMax API Pricing

MiniMax M3.1 Flash and M3 rates per 1M tokens — a flat rate, the priority lane, the long-context doubling and the cache rate — priced against every other model.

View MiniMax API pricing →

Kimi API Pricing

Moonshot Kimi rates per 1M tokens — K3.1 Pro, the Highspeed twin and the still-sold K3, with the million-token window and the separately billed cache writes.

View Kimi API pricing →