How to analyse data with AI: upload, ask, check, chart, with 6 prompts

AI assistants now run real code on your data, which makes them fast analysts and occasionally confident wrong ones. This guide shows how to set up the file, ask questions that get checkable answers, and catch the errors before they reach a slide.

The short answer

To analyse data with AI, export a clean CSV or Excel file, upload it to an assistant that runs code, ask one precise question at a time and check the numbers it reports. Anthropic's Claude runs code and creates files on every plan, including Free, and accepts CSV and XLSX files up to 500 MB. Google's Gemini web app takes up to 10 files per prompt and can chart uploaded spreadsheets. Inside a workbook, Microsoft's Copilot in Excel has a Chat only mode.

What you need before you start

  • A question. "Which product lines lost margin between the first and third quarter, and why?" beats "analyse this". Write down what decision the analysis supports.
  • A clean file. CSV or XLSX, one header row, one record per row, no merged cells, no totals mixed into the data, and a short note on what each column means and its units.
  • The right tool for the size and sensitivity of the data:
    • Claude (Free and up): accepts CSV and XLSX, up to 500 MB per file and 20 files per chat. XLSX uploads need Code execution and file creation (called Create and edit files in the updated settings layout) switched on in Settings, then Capabilities; it is on by default for Free, Pro, Max and Ultra.
    • Gemini (free and up): up to 10 files per prompt, up to 100 MB each for non-video files, with rolling upload limits that are higher on Google AI Pro and Ultra.
    • ChatGPT: data analysis is on the pricing comparison with plan-dependent limits; Free has limited uploads.
    • Copilot in Excel or Gemini in Google Sheets if the data already lives in a workbook and you have the subscription (see how to use AI for Excel).
  • Permission to use the data. Customer records, salaries and health data should only go into a work plan your organisation has approved. Remove names and IDs you do not need.

How to analyse data with AI, step by step

  1. Upload the file. In Claude, click the + button in the lower left of the chat box, choose Add files or photos, select the file and click Open. In the Gemini web app at gemini.google.com, click Add files, then Upload Files, then Submit.
  2. Describe the data. Paste your column notes and the question. Ask the AI to first tell you how many rows and columns it sees, the date range and any missing or odd values. If those basics are wrong, stop and fix the file.
  3. Ask one question at a time. Ask for the answer, the method in plain English and the numbers behind it. Claude and ChatGPT run code to calculate, so ask to see the code or the steps.
  4. Check it. Recalculate one or two numbers yourself in Excel or Sheets. Ask what rows were excluded and why. Ask for the same result a second way (for example, a pivot and a sum).
  5. Chart it. Ask for the one chart that answers the question, with a title that states the finding. In Gemini, select Edit below a chart to change its type or labels, then Update.
  6. Ask for the explanation, then challenge it. "What could explain this?" followed by "What data would prove or disprove each explanation?" keeps the AI from presenting a guess as a finding.
  7. Export the work. Claude can return Excel files with working formulas and reports with charts. Keep the file, the prompts and the checks together so someone else can repeat the analysis.

For data that lives in business systems, Claude Dashboards (beta, Pro and above) builds charts from data platforms or connected apps such as Salesforce, and each chart shows its query and when it was last refreshed.

A worked example: why did support tickets rise?

Nadia, an operations analyst, exports six months of support tickets: 18,000 rows with Created date, Category, Channel, Customer plan and Resolution time in hours. Her manager asks why ticket volume rose in September.

  1. She removes customer names and emails, saves a CSV and uploads it to Claude with her column notes.
  2. Claude reports 18,000 rows, April to September, and flags 212 rows with no category. Nadia asks it to keep them as "Uncategorised" rather than drop them.
  3. She asks: "Show monthly ticket counts by category and the change from August to September, with the code you used." The table shows most of the rise sits in the Billing category.
  4. She checks the Billing totals for August and September with a filter in Excel. They match.
  5. She asks what could explain the Billing rise. Claude suggests a pricing change, a payment provider issue or a new plan launch, and says the file cannot tell them apart. Nadia knows a new invoice layout went out on 2 September, so she asks for daily Billing tickets around that date. The jump starts on 3 September.
  6. She asks for one line chart titled "Billing tickets doubled after the new invoice layout on 2 September" and exports it. The finding goes to her manager with the caveat that the data shows timing, not cause.

Common mistakes and how to fix them

  • Uploading a messy file. Merged headers, notes in cells and subtotals lead to wrong answers. Fix: one header row and one record per row.
  • Not checking the basics. Fix: ask for row count, column list and date range first, and compare with what you expect.
  • Accepting a number without the method. Fix: ask for the code or steps, and recheck one figure by hand.
  • Mistaking correlation for cause. AI will offer neat explanations. Fix: ask what data would prove each one, and say "the data shows" only for what it shows.
  • Files too big for good answers. Gemini warns that very large uploads can lead to responses that miss details. Fix: filter to the columns and period you need.
  • Personal data in personal accounts. Fix: anonymise, use a work plan, and switch off training (ChatGPT: Settings, Data controls, Improve the model for everyone; Claude: Settings, Privacy, Help Improve our AI models; Gemini: turn off Keep Activity).

Which AI tool to use for data analysis

Your situationUseWhy
A CSV or Excel export, no subscriptionClaude FreeRuns code, large file limit, returns Excel files with formulas
Several files, or you live in GoogleGeminiUp to 10 files per prompt, editable charts, Gemini in Sheets on eligible plans
You already pay for ChatGPTChatGPT data analysisHigher upload limits on paid plans
The data is in a workbook you shareCopilot in Excel (Chat only mode)Answers without changing the file
Live business data in connected appsClaude Dashboards (beta)Charts that show their query and refresh time

Our opinion: Claude is the best free starting point for file-based analysis because of its file limits and code execution on every plan; Gemini is the better pick when you work in Google Workspace. Whatever you use, the checking step is not optional. Read more in the best AI for data analysis and the best AI for spreadsheets, and take prompts from prompts for data analysis and Copilot prompts for Excel. Tool guides: Claude, Gemini, ChatGPT and Copilot. Comparing assistants? See Claude vs Gemini or ChatGPT vs Claude.

Prompts to copy

Check the data first

Before any analysis, tell me how many rows and columns this file has, the column names and data types, the date range, and any missing, duplicate or odd values. Do not drop anything yet.

You get: A sanity check before you trust any result

Answer one question with working

Question: [question]. Answer it from this data, explain your method in plain English, show the code or steps you used, and list any rows you excluded and why.

You get: An answer you can verify

Find what changed

Compare [period A] with [period B] for [measure]. Show the total change, then break it down by [dimension 1] and [dimension 2], and tell me which segments explain most of the change.

You get: The drivers behind a change

Challenge the explanation

List three possible explanations for [finding]. For each, say what in this data supports it, what contradicts it, and what extra data would settle it. Do not pick one unless the data clearly shows it.

You get: Honest hypotheses, not guesses as facts

One chart that answers the question

Make the single chart that best answers [question]. Give it a title that states the finding in under 12 words, label the axes with units, and tell me why you chose this chart type.

You get: A clear chart with a finding as its title

Write it up for a manager

Write a 150-word summary of this analysis for [audience]: the question, the answer with the key numbers, how confident we can be, and the one decision it supports. Include the caveats.

You get: A short, honest write-up

Start the Claude lessons Start the Gemini lessons