Model Comparison

Codestral-22B vs Grok-2Which is better in 2026?

Grok-2 significantly outperforms across most benchmarks.

Verdict: Codestral-22B vs Grok-2 — which is better?

Codestral-22B (by Mistral AI) and Grok-2 (by xAI) are two of the AI models people compare most. Here is how they stack up on benchmarks, price and capabilities, and which one to pick in 2026.

Codestral-22B outperforms in 0 benchmarks, while Grok-2 is better at 1 benchmark (HumanEval). Grok-2 significantly outperforms across most benchmarks.

Choose Codestral-22B if…

  • you need open weights you can self-host or fine-tune

Choose Grok-2 if…

  • you want the strongest raw capability — it leads on 1 of 1 shared benchmarks
  • you want the most recent training data — it shipped Aug 2024

Performance Benchmarks

Comparative analysis across standard metrics

1 benchmarks

Codestral-22B outperforms in 0 benchmarks, while Grok-2 is better at 1 benchmark (HumanEval).

Grok-2 significantly outperforms across most benchmarks.

Wed Jul 15 2026 • llm-stats.com

Arena Performance

Human preference votes

Context Window

Maximum input and output token capacity

Only Grok-2 specifies input context (128,000 tokens). Only Grok-2 specifies output context (8,000 tokens).

Mistral AI
Codestral-22B
Input- tokens
Output- tokens
xAI
Grok-2
Input128,000 tokens
Output8,000 tokens
Wed Jul 15 2026 • llm-stats.com

Input Capabilities

Supported data types and modalities

Grok-2 supports multimodal inputs, whereas Codestral-22B does not.

Grok-2 can handle both text and other forms of data like images, making it suitable for multimodal applications.

Codestral-22B

Text
Images
Audio
Video

Grok-2

Text
Images
Audio
Video

License

Usage and distribution terms

Codestral-22B is licensed under MNPL-0.1, while Grok-2 uses a proprietary license.

License differences may affect how you can use these models in commercial or open-source projects.

Codestral-22B

MNPL-0.1

Open weights

Grok-2

Proprietary

Closed source

Release Timeline

When each model was launched

Codestral-22B was released on 2024-05-29, while Grok-2 was released on 2024-08-13.

Grok-2 is 3 months newer than Codestral-22B.

Codestral-22B

May 29, 2024

2.1 years ago

Grok-2

Aug 13, 2024

1.9 years ago

2mo newer

Knowledge Cutoff

When training data ends

Neither model specifies a knowledge cutoff date.

Unable to compare the recency of their training data.

No cutoff dates available

Outputs Comparison

Notice missing or incorrect data?Start an Issue discussion

Key Takeaways

Has open weights
Larger context window (128,000 tokens)
Supports multimodal inputs
Higher HumanEval score (88.4% vs 81.1%)

Detailed Comparison

Interactive Arena

Judge for yourself.

Run your own prompts against Codestral-22B and Grok-2 side-by-side, then vote on the output you prefer.

Codestral-22B
✓ Preferred
Grok-2
Open in Playground
AI Model Comparison Table
Feature
Mistral AI
Codestral-22B
xAI
Grok-2

FAQ

Common questions about Codestral-22B vs Grok-2.

Which is better, Codestral-22B or Grok-2?

Grok-2 significantly outperforms across most benchmarks. Codestral-22B is made by Mistral AI and Grok-2 is made by xAI. The best choice depends on your use case — compare their benchmark scores, pricing, and capabilities above.

How does Codestral-22B compare to Grok-2 in benchmarks?

Codestral-22B scores HumanEvalFIM-Average: 91.6%, HumanEval: 81.1%, MBPP: 78.2%, Spider: 63.5%, HumanEval-Average: 61.5%. Grok-2 scores DocVQA: 93.6%, HumanEval: 88.4%, MMLU: 87.5%, MATH: 76.1%, MMLU-Pro: 75.5%.

What are the context window sizes for Codestral-22B and Grok-2?

Codestral-22B supports an unknown number of tokens and Grok-2 supports 128K tokens. A larger context window lets you process longer documents, conversations, or codebases in a single request.

What are the main differences between Codestral-22B and Grok-2?

Key differences include multimodal support (no vs yes), licensing (MNPL-0.1 vs Proprietary). See the full comparison above for benchmark-by-benchmark results.

Who makes Codestral-22B and Grok-2?

Codestral-22B is developed by Mistral AI and Grok-2 is developed by xAI.