How to analyze data with ChatGPT and check the numbers

This is taking longer than expected.

Try againBrowse the library
AI Blocks

Blog Get started with AI

How to analyze data with ChatGPT and check the numbers

You can analyze data with ChatGPT, Claude or Gemini by uploading a spreadsheet and asking plain questions. This guide shows how to prepare the file and ask useful questions. It also covers how to make the AI show its working, check the numbers and keep private data safe.

Can you analyze data with ChatGPT?

Yes. You can analyze data with ChatGPT, Claude or Gemini by uploading a spreadsheet or CSV file and asking questions about it in plain words. Your AI can sort, total, compare, identify trends and draw charts, but it can also misread a column or drop rows without mentioning it. Reliable results come from four habits: prepare the file, ask one clear question, make the AI show its working, and check the numbers before you act on them.

Here is what each app says it can do with spreadsheets, as of November 2026. Features and limits change regularly, so check the current help page before you depend on any of them.

  • ChatGPT: OpenAI's help article on data analysis with ChatGPT says that for some tasks, ChatGPT writes and runs Python code on your file. It advises you to review the code, the outputs and the assumptions before you rely on a result.
  • Claude: Anthropic's page on creating and editing files with Claude says you can upload CSV, TSV and other files for analysis and charts. Claude can also create Excel files with working formulas, using a setting called code execution and file creation.
  • Gemini: Google's help page on uploading files to Gemini says you can upload spreadsheets to receive answers, summaries and insights, and ask it to create a chart from them.

The method below works in all three apps.

Step 1: Prepare the file before you upload it

Ten minutes of tidying saves an hour of wrong answers. OpenAI's own recommendations make a good foundation: use a header row with clear column names and one record per row, with no blank rows or columns splitting the data. Then add the following habits:

  • Keep one table per sheet, and move notes, charts and side calculations to another tab or delete them from your working copy.
  • Remove total and subtotal rows, because otherwise the AI may add them in again and double your numbers.
  • Put units in the column names, since "Revenue (USD, before refunds)" is far clearer than "Rev".
  • Use one date format throughout. 03/04 means 3 April in some countries and 4 March in others, so use the format 2026-04-03 if you can.
  • Keep only the columns you need, which helps the AI concentrate and keeps private information out.
  • Remove personal data by replacing customer names and emails with an identifier such as C-1042, as explained in the privacy section below.
  • Work on a copy, and keep the original untouched so you can compare results against it.

Three free browser tools help with this preparation. The CSV column profiler shows missing cells, distinct values and sample values for every column, so you spot gaps before the AI does. The CSV column selector keeps only the columns you choose, and the CSV duplicate row remover deletes exact repeats.

Step 2: Ask the right questions

A vague request such as "Analyze this" usually returns a list of obvious facts, whereas a specific business question gives you something to act on. Good questions name the decision, the measure and the time period, for example:

  • "Which five products made the most profit last quarter, after refunds?"
  • "Did average order value change after we raised prices on 1 June?"
  • "Which customers bought twice in the first half of the year, but not since?"

Define your terms as well. Does "sales" mean orders, money received or money after refunds, and does "a customer" mean an email address or an account? If you don't specify, the AI chooses for you, and it may not tell you which definition it chose.

Before any analysis begins, ask for a profile of the file, because it shows you how the AI interpreted your data and it's where most problems first appear.

Prompt: Read my file and plan the analysis first

I've attached a spreadsheet. Don't analyze it yet. First, show me how you read it.

What the file is: [for example, "every online order from January to June 2026, one row per order"]
My question: [one business question]
How I define the key terms: [for example, "revenue means order total minus refunds"]

Do this:
1. Count the rows and columns. List every column with its type (number, date, text), a sample value and the number of empty cells.
2. Flag anything odd: mixed date formats, numbers stored as text, duplicate rows, total rows inside the data, outliers, columns that look like personal data.
3. Tell me which columns you'd use to answer my question, and any you'd need that are missing.
4. Write your plan: the steps you'd take, any filters, and every assumption. Mark each assumption so I can confirm or change it.

Stop there and wait for my go-ahead.

Compare the AI's row count with the one you wrote down, then confirm or correct each assumption before you say "go".

Step 3: Make the AI show its working

A number with no method behind it can't be verified, so ask for the method, the filters and the count of rows used for every figure. In ChatGPT and Claude, the AI often writes code to do the calculations, and you can ask to see it. You don't need to read code fluently, because you only need to notice whether it filtered out rows you intended to keep.

Prompt: Analyze my data and show the working

Go ahead with the plan we agreed. Answer my question: [your question].

For every number you give me, show:
- how you worked it out (the formula, or the code you ran)
- which rows you used, with a count, and any rows you left out and why
- the time period it covers

Then give me:
1. The answer to my question in two or three plain sentences.
2. A small table with the figures behind it.
3. One chart, only if it makes the answer clearer.
4. What the data can't tell us, and what extra data would.

Rules:
- Use only the data in the file. If you need something that isn't there, write MISSING.
- Don't round until the final table, and say how you rounded.
- If a result surprises you, say so and check it before you report it.

Step 4: Check the numbers before you use them

The AI's answer reads equally well whether it's right or wrong, and our guide on stopping AI making things up explains why. With data, checking is quick, because numbers either match or they don't.

  • The row count the AI used matches your own count, or the AI explained the difference.
  • The total of the main column matches the total you calculated in your spreadsheet.
  • You checked three rows by hand, choosing them in the file and following each one through the analysis.
  • Dates were interpreted the right way round, and the period matches the one you requested.
  • No total rows or duplicate records were counted twice.
  • Percentages and averages were calculated from the raw numbers, because an average of averages is often misleading.
  • You recalculated the one number you'll act on, in your own spreadsheet or with a calculator.
  • When asked again in a new conversation, the AI produced the same key numbers.

For questions about money, a second tool you trust is helpful. The free order margin calculator and customer payback calculator let you rework an important figure by hand and see whether it matches.

Prompt: Audit an analysis before I share it

You are a careful analyst checking someone else's work. Here is the file and the analysis I was given. Don't redo the whole analysis. Check it.

The analysis:
[paste the answer, table and method]

My control numbers: [row count] rows, total of [column] = [your total]

Check:
1. Do the row count and the total match my control numbers? If not, find out why.
2. Recompute the three most important figures from the raw data. Show your working.
3. Look for common errors: dates read the wrong way round, total rows counted, duplicates, rows dropped by a filter, averages of averages, percentages of the wrong base.
4. Does each conclusion follow from the numbers, or does it go further?

Give me a table: Figure, Original value, Your value, Match (yes or no), Note. Then list anything I must fix before I share this.

Is it safe to upload your data to AI?

It depends on what the file contains and which plan you use, so read your AI's data settings before you upload anything about customers or employees. Here's what each maker's help pages say, as of November 2026:

  • ChatGPT: OpenAI's page on data controls in ChatGPT explains a setting called "Improve the model for everyone", which is on by default for personal plans. You can switch it off so that your conversations aren't used to train its models, and OpenAI says it doesn't train on business plan data by default.
  • Gemini: Google's Gemini Apps Privacy Hub says human reviewers may read some conversations, and asks you not to enter confidential information you wouldn't want a reviewer to see. The Keep Activity setting controls whether your conversations are used to improve Google's AI.
  • Claude: Anthropic's help page on sensitive data in Claude says you can change your model improvement setting at any time, and that incognito conversations aren't used to improve Claude.

Whatever the setting, these rules keep your information safer:

  • Replace names, emails, phone numbers and addresses with identifiers before you upload anything.
  • Upload only the columns the question actually requires.
  • Where possible, upload totals by week or by product instead of one row per customer.
  • Never upload passwords, card numbers, bank details or health information.
  • Check your own privacy policy, and any contract with clients, before you upload their data.

A worked example: an Ahrefs keyword export

Ahrefs makes tools for search engine optimization, or SEO, which means getting your pages found on Google. Its Keywords Explorer tool shows how often people search for a phrase and how hard it is to rank for. Many marketers export that data to a spreadsheet before deciding what to write first. It makes a good example because the data contains a trap.

What the columns mean

Ahrefs explains its own measures. Keyword Difficulty is a score from 0 to 100 for how hard it is to reach the top 10 results. Ahrefs says the score doesn't take everything into account, so you should look at the top 10 results yourself. Parent Topic is the broader search that sends the most traffic to the top page for a keyword. Traffic Potential is roughly how much search traffic that top page gets from all the keywords it ranks for.

What goes in

Suppose you export 300 keywords about one subject (an example figure) and keep the keyword, volume, Keyword Difficulty, Parent Topic and Traffic Potential columns. Your question is "Which five Parent Topics should we write about first, if we prefer topics with a Keyword Difficulty under 30?"

The trap, and the check that catches it

Ahrefs describes Traffic Potential as the traffic the top-ranking page gets from all the keywords it ranks for. One page often ranks for many of the keywords in your list. So when several rows share a Parent Topic, their Traffic Potential figures can describe the same page's traffic. An AI asked to "add up Traffic Potential by topic" may count that traffic many times over. Tell it in the prompt: "Traffic Potential describes the top page for the Parent Topic. Take it once per topic, don't add it up." Then check one topic by hand.

What comes out

You receive a table like the one below, in which all figures are example figures invented for this article rather than real Ahrefs data:

Parent TopicKeywords in groupTotal volumeMedian Keyword DifficultyTraffic Potential (once)
Topic A245,400123,100
Topic B173,900222,600
Topic C318,200416,800

Topic C has the most traffic, but its difficulty exceeds your limit, so the AI should flag it instead of ranking it first. The audit prompt then confirms that the keyword counts for all the topics add up to the 300 rows you started with. For more on turning keyword lists into articles, see our guide to SEO content with AI.

Common mistakes, and what to do instead

MistakeDo this instead
Uploading the raw export with notes, totals and blank rowsTidy a copy first: one table, one header row, no totals
Asking "what does this data tell us?"Ask one business question with the measure and the time frame
Accepting numbers with no methodAsk for the formula or code and the row count behind each figure
Skipping the control totalsWrite down row count and main total before upload, and compare
Uploading customer names and emailsSwap them for IDs, or upload totals instead of rows
Trusting a chartCheck the numbers under the chart, not just its shape
Acting on the first answer to a big decisionRun the audit prompt in a new chat and recalculate the key number yourself

Where AI Blocks helps

These items are free, so download the workflow or skill, or copy the prompt, and use it in your own AI with your own file.

  • The dataset analysis and insight reviewer takes a data file and one clear question, and gives you a data profile, checked analysis and a ranked brief with actions and limits.
  • The spreadsheet results reviewer checks formulas and source totals, then explains the checked results with clear units, dates and limits before you share them.
  • The analytics report writer is a specialist you can download. Paste a table of your numbers and the decision you face, and you get a report with findings, evidence and next steps.
  • The spreadsheet and CSV cleaner cleans a file using rules you agree, rechecks it each round and keeps unresolved cells for a person to decide.
  • The business results drop investigator takes the before and after figures and what changed, and gives you causes ranked by evidence and one check to run.
  • The free browser tools include CSV tools to profile, trim and de-duplicate a file, plus calculators to double-check an important number.

If you analyze the same report every week, turn these steps into a workflow you can rerun, as our guide on building an AI workflow without code explains.

Questions people ask

Can ChatGPT read Excel files?

Yes. OpenAI's help pages list Excel and CSV files among the spreadsheet types you can upload, and Claude and Gemini accept spreadsheets too. A clean CSV with one header row is often the easiest format for any of them to read accurately.

How big a spreadsheet can I upload?

Each app has its own limits, and they change, so check the current help page. If a file is too large, upload only the columns and date range your question needs, or upload weekly totals instead of every individual row.

Is AI spreadsheet analysis accurate?

It's often correct, but it's sometimes wrong in ways that look convincing. Make it show its method and row counts, compare its totals with yours and recalculate the number you'll act on, and then you'll know whether to trust it.

Can AI write spreadsheet formulas for me?

Yes, and that's often the safer way to use it, because when you paste the formula into your own sheet, you can see exactly what it does. Claude can also create Excel files with working formulas.

Should I use AI inside my spreadsheet app instead?

That can work well, since your data stays in the file you already use, so check what your spreadsheet app offers today. The same rules apply either way: a clear question, a visible method and your own independent check.

What data should I never upload to an AI?

Never upload passwords, card and bank details, health information or anything a client contract says to keep private. Replace names and emails with identifiers, and upload only what the question requires.

All articles and guides