Best AI Model for Math 2026: Claude vs GPT-6 vs Gemini 4

Claude Fable 5.2, GPT-6.2 Astra and Gemini 4 compared on published math benchmarks: MathArena, HLE-Diamond, LeanLean and RiemannBench, with cost per problem and a way to test them on your own problems.

Medy Evrard

23 November 2026

Best AI Model for Math 2026: Claude vs GPT-6 vs Gemini 4

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Which is the best AI model for math 2026 has produced? It depends on the kind of math. GPT-6.2 Astra leads the independent MathArena leaderboard at 92.9%, at $2.46 per problem run. Claude Fable 5.2 tops Artificial Analysis’s HLE-Diamond exam at 80.2% and has the strongest public record on long Lean proof projects. Gemini 4 Carbon ranks third on MathArena at 85.4%. Gemini 4 Neon’s best math score, 84.0% on RiemannBench, comes from Google’s own report.

Why the sudden interest? On November 20, 2026, Anthropic mathematician Levent Alpöge posted a four-page note saying he had found a proof of the Riemann Hypothesis “working with Claude,” with a full formalization in Lean. Coverage of the Lean and Mathlib community check on November 21 describes the certified scope as the Generalized Riemann Hypothesis for Dirichlet L-functions (BigGo). Mathematicians told Al Jazeera it may take weeks to understand the argument, and no journal has reviewed it yet. Anthropic hasn’t said which Claude model was involved, so treat that story as a sign of where the field is heading, not as a benchmark.

Best AI model for math in 2026: the short answer

Pick by the math you actually do:

Your math workload Best pick Why
Competition and research problems with a checkable answer GPT-6.2 Astra #1 on MathArena (92.9%) at $2.46 per run
The same, on a budget GPT-6.2 Sol 91.2% on MathArena at $0.86 per run
Expert exam questions across math and science Claude Fable 5.2 #1 on HLE-Diamond (80.2% at max effort)
Large Lean formalization with many agents Claude Fable 5.2 Formalized Fermat’s Last Theorem in 30 hours (Anthropic’s report)
A Gemini stack Gemini 4 Carbon 85.4% on MathArena, #3 overall

No single model wins every board, and Neon isn’t on either independent board yet.

Which benchmarks measure math reasoning in 2026?

A math reasoning benchmark asks a model to solve problems it can’t have memorized and grades the final answer or the proof. The useful ones in late 2026 use fresh problems (new competitions, recent arXiv papers) or machine-checked proofs, because models may have seen older problems during training. MathArena now files competitions such as AIME 2025 under “Deprecated” for that reason.

Four boards matter for this comparison:

Our DeepSeekMath-V2 guide explains why a checker beats a judge model.

Claude vs GPT-6 vs Gemini 4: math benchmark scores

Here is every published math-relevant score for the current flagships. “Not listed” means the board hadn’t run that model as of November 23.

Benchmark (who ran it) Claude Fable 5.2 GPT-6.2 Astra Gemini 4 Neon Gemini 4 Carbon
MathArena expected performance (independent) 82.1% (max) 92.9% (max) Not listed 85.4% (high)
MathArena LeanLean, Oct 2026 (independent) Not listed 58.97% Not listed 45.82%
HLE-Diamond overall (Artificial Analysis) 80.2% (max) Not shown in summary 71.3% (per Google) Not shown
HLE-Diamond reasoning half (Artificial Analysis) 85.6% (max) 84.8% (max) Not shown Not shown
RiemannBench (Google’s model card) Not reported Not reported 84.0% Not reported

Sources: MathArena models and its LeanLean October table, the Artificial Analysis HLE-Diamond page, and the Gemini 4 Neon model card.

Three things stand out. GPT-6.2 Astra leads MathArena by 10.8 points over Fable 5.2, and its cheaper sibling GPT-6.2 Sol (91.2%) also beats every Claude and Gemini model there. On HLE-Diamond’s reasoning half, Fable 5.2 and Astra sit 0.8 points apart, which is inside normal run-to-run noise. And Fable 5.2’s overall HLE-Diamond lead depends on max effort: at xhigh it drops to 75.8%.

Diagram of where each math score comes from: MathArena and Artificial Analysis test the models independently, while Google's RiemannBench figure for Gemini 4 Neon is self-reported

Why vendor math numbers don’t line up

Each lab picks its own benchmarks and its own rivals, so their charts rarely share a row:

Vendor Math or reasoning claim Compared against
Google (Neon) RiemannBench 84.0%, HLE-Diamond 71.3% Claude Opus 5.5 (80.0%, 67.9%), GPT-6.2 Sol (80.0%, 64.0%)
Anthropic (Fable 5.2) Humanity’s Last Exam with tools: 74.2% GPT-6 Astra (57.2%), Opus 5.5 (67.7%)
OpenAI (GPT-6.2 Astra) No dedicated math row; science claims on Terminal-Bench-Science and Vals Science Index Fable 5.2, Opus 5.5, Gemini 4 Carbon

Google skips Fable 5.2 and Astra, Anthropic compares with the older GPT-6 Astra, and the OpenAI launch post leads with professional work, not math. Only the independent boards give a fair head-to-head.

Our Gemini 4 Neon benchmarks breakdown shows the thinking level behind each Google row.

What about formal proofs in Lean?

Anthropic’s Fable 5.2 launch post reports that a team of about 1,000 Fable 5.2 agents fully formalized Fermat’s Last Theorem in Lean in 30 hours, with minimal human help. Opus 5.5, in the same setup, finished 26% in 18 hours. A footnote matters: the agents started from 60 target statements, a one-sentence sketch of the classical route, the definitions and 47 already-proved lemmas. That’s a strong result on a guided project, not proof discovery from scratch.

On MathArena’s independent LeanLean track, GPT-6.2 Astra scores 58.97% and Gemini 4 Carbon 45.82%. Fable 5.2 hasn’t been run there yet, so there’s no head-to-head on short Lean proofs.

Cost per math problem: which model is cheapest?

List prices, read from each vendor’s pricing page on November 23, 2026:

Model Input / output per 1M tokens MathArena cost per problem run
GPT-6.2 Astra $8 / $40 $2.46
GPT-6.2 Sol $2 / $10 $0.86
Claude Fable 5.2 $8 / $40 $38.97
Gemini 4 Carbon $2 / $10 through Nov 30, then $4 / $20 $15.70
Gemini 4 Neon $3 / $15 Not listed

Token price tells you little here. Fable 5.2 and Astra share a $8 / $40 rate, yet Fable costs about 16 times more per MathArena problem because it writes far more reasoning tokens at max effort. Carbon shares Sol’s token price this month and still costs about 18 times as much per problem. Reasoning tokens bill at the output rate, so verbose reasoning is where math bills grow.

Prices come from the Claude pricing page, the Gemini API pricing page and OpenAI’s launch post. Our three-way comparison of Neon, Astra and Fable covers context windows and caching.

Which model should you use for which kind of math?

  1. Competition math with a numeric answer: start on GPT-6.2 Sol and send only its misses to Astra.
  2. Research-level and short proof problems: GPT-6.2 Astra, the MathArena and LeanLean leader.
  3. Expert questions mixing math with physics or biology: Claude Fable 5.2 at max effort.
  4. Long multi-agent formalization: Claude Fable 5.2, based on Anthropic’s Fermat case study.
  5. Already on Gemini: Gemini 4 Carbon until Neon shows up on MathArena.

Set the reasoning level on purpose: the boards ran these models at high or max, and API defaults are often lower.

Run your own math benchmark with Apidog CLI

Leaderboards grade someone else’s problems. Run 10 of your own problems with known answers against all three APIs, and let your coding agent (Claude Code, Codex or Cursor) build that suite with Apidog CLI.

Setup takes three commands:

npm install -g apidog-cli@latest
apidog login --with-token <YOUR_APIDOG_TOKEN>
npx -y skills add https://apidog.com   # pick your agent when prompted

Then give your agent one prompt:

In Apidog project <projectId>, create a test suite named "math-bench". Add three
test cases that send the same math problem to gpt-6.2-astra (OpenAI Responses API,
effort high), claude-fable-5-2 (Claude Messages API) and gemini-4-neon (Gemini API,
thinking_level high). Read the problems and expected answers from math-problems.csv.
Assert a 200 status and that the final answer equals the expected value. Keep each
API key in a private environment variable. Run the suite 4 times and report accuracy,
output tokens and response time per model.

The agent checks each payload against the CLI schema, writes the cases and runs the suite:

apidog cli-schema get test-case-create
apidog cli-schema validate test-case-create --file astra-case.json
apidog test-case create --project <projectId> --file astra-case.json
apidog test-suite create --project <projectId> --name "math-bench"
apidog test-suite run <suiteId> --project <projectId> -e <envId> -d math-problems.csv -n 4 -r cli,json

The -d flag feeds each CSV row in as a test iteration, and -n 4 mirrors MathArena’s four runs per problem. The JSON report gives you pass rate and timings per model, so you compare your own accuracy and cost, not a vendor chart.

A coding agent running Apidog CLI on a sandbox project: it lists test suites, then shows the create and run commands for the math-bench suite
Sequence diagram: your coding agent runs an Apidog CLI test suite that sends each math problem to three model APIs four times and reports accuracy, tokens and time

Grade final answers exactly and record output tokens. Our Apidog CLI in Claude Code guide covers the agent setup, and the apidog run command reference lists every flag. Apidog’s Free plan covers up to 4 users, enough to share the suite with your team.

Conclusion

GPT-6.2 Astra is the safest default for math in November 2026: it leads MathArena and costs a fraction of Fable 5.2 per problem, while Sol gets within 2 points for about a third of the cost. Pick Claude Fable 5.2 for expert-level questions or long Lean formalization. On Gemini, Carbon has the independent numbers; Neon’s lead is still Google’s claim. Run your own 10-problem suite before you commit.

FAQ

Which AI model is best at math in 2026? On the independent MathArena leaderboard, GPT-6.2 Astra leads at 92.9%, followed by GPT-6.2 Sol (91.2%), Gemini 4 Carbon (85.4%) and Claude Fable 5.2 (82.1%). On Artificial Analysis’s HLE-Diamond exam, Claude Fable 5.2 leads at 80.2%.

Which Claude model helped with the Riemann Hypothesis proof? Anthropic hasn’t named one. Levent Alpöge’s note says only that he worked “with Claude,” and the claim still awaits review by mathematicians.

Is Gemini 4 Neon good at math? Google reports 84.0% on RiemannBench and 71.3% on HLE-Diamond for Neon, ahead of Claude Opus 5.5 and GPT-6.2 Sol. MathArena hadn’t listed Neon as of November 23, 2026, so there’s no independent head-to-head with Astra or Fable 5.2 yet.

Why does Claude Fable 5.2 cost so much more per math problem? It writes many more reasoning tokens at max effort, and those bill at the output rate. MathArena measured $38.97 per problem run for Fable 5.2 against $2.46 for GPT-6.2 Astra, at the same $40 per million output rate.

Can I test these models on my own math problems? Yes. Put your problems and expected answers in a CSV, then have your coding agent build an Apidog test suite that calls all three APIs, runs each problem 4 times and reports accuracy, tokens and latency per model.

Explore more

Claude API Math: How to Write Formal Proofs You Can Check in Lean

Claude API Math: How to Write Formal Proofs You Can Check in Lean

Send a math problem to the Claude API, get a Lean 4 proof back, and let Lean check every step. A step-by-step guide with curl, a Python retry loop and effort settings.

23 November 2026

Testing AI-Generated API Code: Check It Like Lean Checks Proofs

Testing AI-Generated API Code: Check It Like Lean Checks Proofs

Lean accepted an AI-written proof without trusting its author. Use the same split for your API: a frozen spec, agent-written code, and contract tests the agent runs but can't edit.

23 November 2026

Did Claude Prove the Riemann Hypothesis? What Actually Happened

Did Claude Prove the Riemann Hypothesis? What Actually Happened

Levent Alpöge says he proved the Riemann Hypothesis working with Claude, and the Lean community certified the code. Here's what was claimed, what Lean checked and what's still open.

23 November 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

Best AI Model for Math 2026: Claude vs GPT-6 vs Gemini 4