The most accurate AI for data analysis runs code, and shows it
AI accuracy · Facts checked 22 October 2026
For data analysis, the setup matters more than the brand: use a current model that writes and runs code against your data, and shows you the query. Even then, the best published score on SpreadsheetBench V2's end-to-end business workflows is 34.89%. Require code execution, check which definition it used, and recompute one number yourself.
Arithmetic in its head is where analysis goes wrong first
Ask a chatbot to multiply two three-digit numbers without a calculator and it will often get it wrong. When researchers tested this in 2023, GPT-4 managed 59% (Dziri et al., Faith and Fate). Models are much better now. The principle hasn't changed: a language model predicts text, and a number is text.
That's why every major vendor routes calculation to code. OpenAI describes its code interpreter as the way to "solve complex problems in domains like data analysis, coding, and math". Anthropic's code execution tool lets Claude "perform complex calculations" in "a secure, sandboxed environment". Google tells developers to turn on code execution "whenever the model needs to perform any kind of arithmetic, counting, or calculation" (Gemini API docs, October 2026).
So our first rule is simple. If the tool doesn't run code on your data, it isn't doing analysis. It's describing numbers it has read, and sometimes ones it hasn't.
All three big assistants can do this: ChatGPT's data analysis and Claude's code execution both run Python on uploaded files. Which one you prefer matters less than whether code ran. See Claude vs ChatGPT for data analysis for a feature comparison.
Realistic data benchmarks still fail most hard tasks
Data-analysis benchmarks span a huge range, and the range is the lesson.
| Benchmark | What it tests | Best published result | What it tells you |
|---|---|---|---|
| SpreadsheetBench V1 | 912 questions from real Excel forum posts | 70.48% (official page) | Single spreadsheet tasks are often solved |
| SpreadsheetBench V2 | 321 end-to-end business workflows: modelling, debugging, charts | 34.89% (official page) | Multi-step work fails about two times in three |
| DABstep (Adyen, Hugging Face) | 450+ tasks from a payments analytics platform, mixing code with documentation | 14.55% on the hardest tasks at launch (June 2025) | Reading the business rules is as hard as the code |
| Spider 2.0 | Text-to-SQL on real enterprise databases | 21.3% for an o1-preview agent, against 91.2% on the academic Spider 1.0 (2024 paper) | Real schemas are far harder than textbook ones |
| BIRD | Text-to-SQL with execution checks | 82.95 for the top system, against 92.96 for human data engineers (September 2026) | The gap to humans is still about ten points |
Two cautions. First, tuned agent systems now post much higher Spider 2.0 numbers on its leaderboards (96.70 on the Snow variant), so a 2024 headline figure is out of date. Second, the answer keys themselves are imperfect: an audit found annotation errors in 52.8% of BIRD Mini-Dev items and 62.8% of Spider 2.0-Snow items (Jin et al., January 2026).
What survives both cautions is the shape. Narrow, single-step tasks look nearly solved. End-to-end work on messy business data does not.
Every number, traced to the query behind it
A chart doesn't show its filters. Count's reasoning chain does: each claim in an AI analysis is linked to the query, calculation or assumption it rests on.
Most wrong answers are right answers to a different question
The error that worries us most in AI analysis isn't a bad sum. It's a clean, correctly calculated answer to a question you didn't ask.
Take churn. ChartMogul's own example has three customers paying $20, $30 and $50. The $50 one leaves. Customer churn is 33%; revenue churn is 50%. Same data, two honest answers. Stripe's subscriber churn adds new subscribers to the denominator, which gives a third. Ask an AI for "churn" and it will pick one, usually without saying which.
The same happens everywhere:
- "Users" in GA4 means active users in reports, not total users (Google Analytics Help).
- ROAS is conversion value divided by spend; ROI uses profit. A model that mixes them is off by your whole margin (Google Ads Help).
- A month might be calendar or rolling 30 days. GA4's MAU is rolling.
Irrelevant detail makes it worse. Adding one plausible but irrelevant clause to maths word problems dropped GPT-4o's accuracy from 95.2% to 63.1% (Apple, GSM-Symbolic, 2024). Real exports are full of irrelevant columns.
See return on ad spend for one metric's competing definitions.
How we'd choose an AI for analysis work
We wouldn't choose on a leaderboard. We'd choose on five requirements, in this order:
- It runs code you can read. Python or SQL, visible, not hidden behind a summary.
- It works on the source, not a copy. A connection to your warehouse beats a pasted CSV that was out of date when you exported it.
- It states its definitions. Every metric comes with the formula and filters used.
- You can re-run it. Next month's number should come from the same steps, not a fresh conversation.
- It leaves an artifact. A query, notebook or canvas someone else can open. Our post on why AI analysis tools need to produce artifacts, not transcripts makes the full case.
The fair counter-argument: for a one-off look at a small CSV, ChatGPT's or Claude's built-in file analysis is fast and good enough, and setting up anything heavier would be overkill. We agree. The requirements above start to matter when the number goes in a report, a board pack or a decision.
For prompts that make any of these tools state definitions up front, see prompts for data analysis.
Catch the wrong number before it reaches a dashboard
AI analysis fails quietly. The chart renders, the number is plausible, and the error is in a filter three steps back.
A two-minute check
- Ask for the code or SQL, then read only the
WHEREclause and the date range. Wrong filters and windows cause more errors than wrong maths. - Check the row count. Does the number of rows it analysed match what you expect from the source?
- Recompute one figure by hand from totals: total value divided by total spend, not an average of daily ratios.
- Ask "what definition of [metric] did you use?" Compare it with the one your team reports.
- Change one thing and re-run. Drop an irrelevant column or reword the question. If the answer moves, find out why.
These checks catch the common failures. They don't show you how the answer was built, step by step. Count does: connect it to Claude or ChatGPT and each claim in the answer is labelled, with a reasoning chain showing the query or calculation it rests on and any assumption it made along the way. The canvas also runs SQL and Python against your warehouse, so you can re-run the step yourself. Our guide on how to check AI answers covers the full method.
Questions people ask
What is the best AI for data analysis?
Any current flagship model that writes and runs code against your data, and shows you that code. ChatGPT's data analysis and Claude's code execution both do this. On realistic multi-step benchmarks even the best systems fail often (34.89% on SpreadsheetBench V2), so the ability to check the work matters more than the brand.
Can ChatGPT analyse data accurately?
With data analysis switched on, ChatGPT runs Python on your files, which makes calculations far more reliable than answering from memory. The common errors are upstream: the wrong filter, date range or metric definition. See Claude vs ChatGPT for data analysis for how the feature works.
Can Claude analyse data?
Yes. Claude's code execution runs Python in a sandbox to analyse uploaded files, build charts and do calculations. The same checks apply: read the code, confirm the definitions. More in Claude data analysis.
Is AI good at writing SQL?
On academic benchmarks, very good; on real enterprise schemas, much less so. A 2024 study found an o1-preview agent solved 21.3% of Spider 2.0 enterprise tasks against 91.2% on the older Spider 1.0, though tuned agent systems have since scored far higher.
Sources
- OpenAI: Code Interpreter (API docs)
- Anthropic: Code execution tool (Claude API docs)
- Google: Gemini API prompt design strategies (updated 13 October 2026)
- OpenAI: Improvements to data analysis in ChatGPT
- SpreadsheetBench (checked 22 October 2026)
- Adyen and Hugging Face: DABstep (June 2025)
- Lei et al.: Spider 2.0 (ICLR 2025)
- Spider 2.0 leaderboards
- BIRD text-to-SQL leaderboard (September 2026)
- Jin, Choi, Zhu and Kang: Pervasive annotation errors break text-to-SQL benchmarks (January 2026)
- Dziri et al.: Faith and Fate, limits of transformers on compositionality (2023)
- Mirzadeh et al. (Apple): GSM-Symbolic (2024)
- ChartMogul: Customer churn rate
- Stripe Support: Calculating subscriber churn rate in Billing
- Google Analytics Help: Active users and total users
- Google Analytics Help: User stickiness (DAU, WAU, MAU)
- Google Ads Help: Glossary (ROAS and ROI)
