model comparison

vs

Grok 4.7 vs Claude Sonnet 5

xAI against Anthropic, compared on listed price, real workload cost, context and capabilities.

the short answer

  • Grok 4.7 lists the lower output price; input prices match.
  • Grok 4.7 offers the larger context window.
  • Claude Sonnet 5 reads cached input for less ($0.2/M against Grok 4.7's $0.5/M), which decides the bill for agents that resend long context.
  • Claude Sonnet 5 retired on 6 October 2026; its numbers are kept for reference.

side-by-side specs

specGrok 4.7Claude Sonnet 5
providerxAIAnthropic
input price$2/M$2/M
output price$6/M$10/M
cached input$0.5/M$0.2/M
blended price (3:1)$3/M$4/M
context window500k tokens200k tokens
max output—128k tokens
inputtext, imagestext, images
structured outputyesyes
weightsclosedclosed
releasedSeptember 21, 2026June 30, 2026
availabilityliveretired 6 October 2026

same work, both models

workloadGrok 4.7Claude Sonnet 5
one chat reply3,000 tokens in, 500 outClaude Sonnet 5 costs 1.2× as much as Grok 4.7$0.009$0.01
summarise a 100-page report50,000 tokens in, 1,500 out, one requestClaude Sonnet 5 costs 1.1× as much as Grok 4.7$0.11$0.12
1,000 classification calls500 tokens in, 20 out, per call$1.12$1.20
coding-agent session2M tokens in across ~60 turns, 60,000 out, no cache$4.36$4.60
same session, cached85% of input read from the prompt cache, the rest written to itGrok 4.7 costs 1.1× as much as Claude Sonnet 5$1.81$1.69

at listed rates. token counts are typical sizes, not measurements.

Grok 4.7 pricing notes

  • once a prompt reaches 200K tokens, every rate doubles for the whole request ($4 input, $12 output, $1 cached); the listed price is the sub-200K rate.

Claude Sonnet 5 pricing notes

  • Anthropic made the $2 / $10 introductory rate permanent on 2026-08-10; the planned $3 / $15 rise was cancelled.
  • its updated tokenizer can turn the same text into roughly 1.0-1.35x as many tokens, by content type.
  • cache writes bill at the 5-minute rate ($2.50 per 1M); Anthropic's 1-hour tier ($4) is not modelled.

when to pick which

Grok 4.7

xAI's model for coding and knowledge work, launched September 2026 as the successor to Grok 4.6 at the same price and speed. it takes text and images, and reasoning is always on.

pick it if

  • you want xAI's top model for coding and multi-hour terminal tasks
  • your prompts repeat: cached input bills at a quarter of the input rate
  • you need text and image input in one 500K window

skip it if

  • Grok Build 0.1 fits your work: half the input, a third the output price
  • you need a non-reasoning mode: reasoning on Grok 4.7 cannot be disabled

Claude Sonnet 5

Claude Sonnet 5 was Anthropic's mid-tier Sonnet model, released June 2026 with adaptive thinking and text plus image input. it was retired in favour of Claude Sonnet 5.5, which kept the same $2 / $10 price.

pick it if

  • you wanted agentic work Anthropic placed close to Opus 4.8, at lower prices
  • you reused long prompts: cache reads billed at a tenth of input
  • you needed image input alongside adaptive thinking

skip it if

  • you are choosing today; Sonnet 5.5 replaced it at the same $2 / $10

faq

which is cheaper, Grok 4.7 or Claude Sonnet 5?

Grok 4.7 lists the lower output price; input prices match. on a coding-agent session (2M tokens in, 60,000 out) Grok 4.7 costs $4.36 and Claude Sonnet 5 $4.60.

which has the larger context window?

Grok 4.7 offers the larger context window. Grok 4.7: 500k tokens; Claude Sonnet 5: 200k tokens.

try either model

switch between models inside the same octomind session.

prices from the catalog of 2026-11-15