Grok 4.7 vs Gemini 3.8 Flash
Gemini 3.8 Flash runs our sample agent task 2.6x cheaper than Grok 4.7 at list prices.
The short version
Grok 4.7 is #16 on our price list and Gemini 3.8 Flash is #18, from xAI and Google. On our sample agent run, Gemini 3.8 Flash costs $0.296 and Grok 4.7 $0.766, 2.6x apart. Grok 4.7 answers with a 4-point lead on the Intelligence Index (35 vs 31), so you're paying 2.6x for that edge. LMArena's human votes flip the order: Gemini 3.8 Flash leads there, 1498 to 1444.
Side by side
| Measure | Grok 4.7 | Gemini 3.8 Flash |
|---|---|---|
| Provider | xAI | |
| Input / 1M tokens | $2.00 | $0.750 now (through December 31, 2026; $1.50 from January 1, 2027) |
| Output / 1M tokens | $6.00 | $3.75 now (through December 31, 2026; $7.50 from January 1, 2027) |
| Output price ÷ input price | 3.0x | 5.0x |
| Blended / 1M (3:1) | $3.00 | $1.50 |
| Context window | 500K | 1M |
| Sample agent run | $0.766 | $0.296 |
| AA Intelligence Index | 35 | 31 |
| LMArena Text | 1444 (xhigh) | 1498 (high) |
| Blended $ per index point | $0.086 | $0.048 |
Prices from xAI and Google, verified 2026-11-30. Scores from Artificial Analysis and LMArena. How to read this page.
A sample agent run
20 steps, 365,000 input and 6,000 output tokens in total, largest single prompt 32,500 tokens.
| Volume | Grok 4.7 | Gemini 3.8 Flash |
|---|---|---|
| One run | $0.766 | $0.296 |
| 1,000 runs | $766.00 | $296.25 |
| 10,000 runs | $7,660.00 | $2,962.50 |
| 100,000 runs | $76,600.00 | $29,625.00 |
Input makes up 95% of the Grok 4.7 bill and 92% of the Gemini 3.8 Flash bill. With both bills that input-heavy, trimming or caching the context each step saves more than shortening the replies. On Grok 4.7, step 1 costs $0.0098 and step 20 $0.067; on Gemini 3.8 Flash, $0.0041 and $0.025. Each step re-reads the growing history, so the late steps carry most of the bill. A $500 monthly budget covers about 652 runs on Grok 4.7 and 1,687 on Gemini 3.8 Flash. At 10,000 runs a month the difference is $4,697.50.
How the bill builds, step by step
The first 10 steps account for 30% of the Grok 4.7 run and 31% of the Gemini 3.8 Flash run, because every later step re-reads a longer history.
Show the numbers
| After step | Grok 4.7 | Gemini 3.8 Flash |
|---|---|---|
| 1 | $0.0098 | $0.0041 |
| 5 | $0.079 | $0.032 |
| 10 | $0.233 | $0.092 |
| 15 | $0.462 | $0.180 |
| 20 | $0.766 | $0.296 |
Four everyday workloads
| Workload | Grok 4.7 | Gemini 3.8 Flash | Gap |
|---|---|---|---|
| Support chat reply a short system prompt, recent chat history and a reply | $0.0070 | $0.0034 | 2.1x |
| RAG answer a question plus about 20K tokens of retrieved documents, and a cited answer | $0.045 | $0.018 | 2.5x |
| 10-step agent task 10 model calls, each re-reading about 8K tokens of context and emitting a 400-token tool call | $0.184 | $0.075 | 2.5x |
| Long-report summary one 200K-token document summarized into about 2K tokens | $0.824 | $0.158 | 5.2x |
The gap is widest on the long-report summary (5.2x, Gemini 3.8 Flash cheaper) and narrowest on the support chat reply (2.1x). Gemini 3.8 Flash is cheaper on both input and output, so it wins every row at base rates. Grok 4.7's long-prompt rate ($4.00/$12.00 from 200K tokens) applies to the long-report summary row.
Per 1M tokens of mixed traffic, Grok 4.7 costs $2.40, $3.00, $4.00 and Gemini 3.8 Flash $1.05, $1.50, $2.25 at 10%, 25% and 50% output. The gap narrows as jobs write more, from 2.3x to 1.8x.
- Support chat reply at 100,000 a month: $700.00 on Grok 4.7, $337.50 on Gemini 3.8 Flash, so Gemini 3.8 Flash saves $362.50.
- RAG answer at 100,000 a month: $4,480.00 on Grok 4.7, $1,800.00 on Gemini 3.8 Flash, so Gemini 3.8 Flash saves $2,680.00.
- 10-step agent task at 100,000 a month: $18,400.00 on Grok 4.7, $7,500.00 on Gemini 3.8 Flash, so Gemini 3.8 Flash saves $10,900.00.
- Long-report summary at 100,000 a month: $82,400.00 on Grok 4.7, $15,750.00 on Gemini 3.8 Flash, so Gemini 3.8 Flash saves $66,650.00.
Where each one fits
Grok 4.7
- Harder multi-step reasoning, where a 4-point Intelligence Index lead (35 vs 31) is most likely to show.
- Budgets that run past December 31, 2026, after which Gemini 3.8 Flash costs $1.50/$7.50.
Gemini 3.8 Flash
- High-volume agent work: $296.25 per 1,000 sample runs against $766.00, a saving of $46,975.00 per 100,000 runs.
- User-facing chat and writing: LMArena voters prefer it 1498 to 1444, about 58% of head-to-head votes.
- Single prompts beyond 500K tokens, up to its 1M limit.
- Prompts of 200K tokens or more, where Grok 4.7 switches to its higher long-prompt rate.
What you trade
Choosing Gemini 3.8 Flash cuts the run cost by 61% and gives up 4 index points. Put the other way, each point Grok 4.7 adds costs $117.44 per 1,000 runs. Per index point, Gemini 3.8 Flash is the better value at $0.048 blended per 1M tokens against $0.086. Grok 4.7 charges 3.0x its input rate for output and Gemini 3.8 Flash 5.0x, so the more a job writes, the better Grok 4.7 looks.
Using both
Across all 20 models we track, 7 models run our sample task for less than Grok 4.7, and 3 undercut Gemini 3.8 Flash. A common setup routes routine calls to the cheaper model and hard ones to the stronger. Sending 70% of runs to Gemini 3.8 Flash and 30% to Grok 4.7 averages $0.437 per run, 43% below running everything on Grok 4.7, while the hard cases still get its 4-point edge.
Running both means two API keys and two tool-call formats. Our schema converter writes both from one JSON Schema.
Context window
Gemini 3.8 Flash takes 1M tokens (about 750,000 English words) and Grok 4.7 500K. That 2.0x difference matters for whole-codebase or book-length prompts, and our 32,500-token agent peak fits either one easily.
Grok 4.7's base price covers prompts below 200K tokens. Longer ones cost $4.00/$12.00.
Reasoning settings
Artificial Analysis lists one reasoning setting for each, and both scores are at high, so the comparison is at matched effort.
Other options at this level
3 other models score between 28 and 38 on the Index: Claude Haiku 5.5 (37, $0.040 per run), GPT-6 Luna (28, $0.040 per run), DeepSeek V4.1 Flash (1017) (32, $0.117 per run). Claude Haiku 5.5 undercuts both at $0.040 per run, so it's worth a test before you settle. Claude Haiku 5.5 scores highest of the group at 37.
Gemini 3.8 Flash is already Google's cheapest option on our list, at $0.296 per run.
Artificial Analysis vs LMArena
On the Intelligence Index, Grok 4.7 places 16th and Gemini 3.8 Flash 18th of the 20 models on our list. On LMArena Text they place 18th and 8th of the 20 we track there (1444 vs 1498). So the boards disagree. Artificial Analysis scores fixed tests of reasoning, knowledge and coding, while LMArena ranks blind chat answers by human votes, which points to Grok 4.7 for hard problems and Gemini 3.8 Flash for answers people like to read. A 54-point LMArena gap means Gemini 3.8 Flash would win about 58% of blind votes against Grok 4.7. LMArena tested Grok 4.7 at xhigh and Gemini 3.8 Flash at high.
Price change on January 1, 2027
Gemini 3.8 Flash goes from $0.750/$3.75 to $1.50/$7.50 per 1M input/output tokens on January 1, 2027. Our sample run then costs $0.593 on Gemini 3.8 Flash against $0.766 on Grok 4.7, so Gemini 3.8 Flash stays the cheaper pick by 1.3x.
FAQ
Is Gemini 3.8 Flash cheaper than Grok 4.7?
Yes. Per sample run it costs $0.296 against $0.766, and per 1M blended tokens $1.50 against $3.00.
Which has the larger context window?
Gemini 3.8 Flash, at 1M tokens.
Which should I use for an AI agent?
It depends on how hard the steps are. For routine tool calls, Gemini 3.8 Flash saves 61% per run. For long plans where one wrong step wastes the run, Grok 4.7's 4-point lead is worth testing.
Which scores higher?
Grok 4.7 on the Artificial Analysis Intelligence Index, 35 to 31. On LMArena Text, Grok 4.7 is 1444 (xhigh) and Gemini 3.8 Flash is 1498 (high).
Run your own numbers in the token cost estimator · Grok 4.7 pricing · Gemini 3.8 Flash pricing · All comparisons