Skip to content
benchtopia
  • Fetching the field guide…

Grok · Best AI for

Best Grok model for writing code

Only xAI models, scored against every current AI on the same tests, so you can see which one to pick and how it stacks up.

Answer: Grok 4.7 (54/100 · $3 per 1M tokens)

Grok 4.7. It scores 54/100 for writing code, #17 among all 35 current models (the overall leader, GPT-6 Astra, scores 91).

All 3 Grok models for writing code

Score = share of all of today's AI models it beats on this job's tests (100 = best of all). Bar in coral = the overall #1, for reference.

  1. 1Grok 4.7#17 of 35 overall · a few tests54
  2. 2Grok 4.6#20 of 35 overall · plenty of tests49
  3. 3Grok 4.5#26 of 35 overall · a few tests39

Score, price and memory side by side

Cost per job = one long request (≈ 20K tokens read, 2K written), using list API prices.

ModelScore$ / 1M tokensCost per jobMemoryReleased
Grok 4.754$3$0.052500KSep 2026
Grok 4.649$3$0.052500KAug 2026
Grok 4.539$3$0.052500KJul 2026

Quick answers

Which Grok model is best for writing code?

Grok 4.7. It scores 54/100 for writing code, #17 among all 35 current models (the overall leader, GPT-6 Astra, scores 91).

About Grok 4.7 →
What's the runner-up?

Grok 4.6, scoring 49 at $3 per million tokens.

See the details →
Which is the best value?

Grok 4.6: it scores 49 (vs 54 for Grok 4.7) and costs $3 per million tokens instead of $3.

See the details →
How does it compare with the overall best for writing code?

GPT-6 Astra scores 91 vs 54, but costs about 6.7× as much per token.

Best AI for writing code →
How are these ranked?

Each model's score is the share of current AI models it beats on the writing code tests, weighted towards newer and harder tests. Only xAI models, scored against every current AI on the same tests, so you can see which one to pick and how it stacks up.

How scores work →

More ways to pick for writing code

Grok for other jobs

24 jobs · scores update automatically from public test results · data as of November 21, 2026