Skip to content
Business

AI Prompts for Data Analysis: Spreadsheets, Charts and Insights

AI won't replace your judgement, but it's a fast analyst for the grind: cleaning data, writing formulas, spotting trends and explaining results in plain words.

Illustration of AI helping analyse spreadsheet data and build charts

You have a spreadsheet with 40,000 rows, a vague question from your manager, and a sense that a pivot table could answer it if you could just remember the syntax. So you paste the whole thing into a chatbot and type "analyze this." The reply is a wall of generic observations that could describe any dataset on earth. The tool didn't fail — it never learned what your columns mean, what you're asking, or which number your boss cares about. That's why most people give up on AI for real analysis too early.

Good AI prompts for data analysis close that gap. You describe the data the way you would to a new analyst, state the exact question, and name the tool. Then the model does the tedious part — formulas, queries, structure — while you keep the judgment. Get the briefing right and it earns its place next to Excel, Sheets, and your SQL client.

Describe the data before you ask the question

The model can't see your screen. Paste raw numbers with no context and it guesses what each column is — wrong. Every data prompt needs four things before the ask:

  • The columns: name each one and say what it holds. "order_date (YYYY-MM-DD), revenue (USD, includes tax), region (North/South/East/West), channel (web or retail)."
  • Data types and quirks: which fields are numbers vs text, where nulls live, whether revenue is a string with a $ stuck to it.
  • The actual question: not "analyze sales" but "which region grew fastest quarter over quarter, and by how much."
  • The tool: Excel, Google Sheets, SQL (which dialect), or a CSV you're uploading. The answer for Excel is a formula; for Postgres it's a query. They aren't interchangeable.

That last line saves the most time. "Give me the Excel formula" and "write the SQL" are completely different outputs, and the model hands you the wrong one if you never say. That habit runs through prompting for business tasks — you supply the truth, the model supplies the structure.

Clean the mess before you trust the math

Real data is filthy: dates in three formats, "N/A" mixed with blanks, trailing spaces, duplicate rows, currency stored as text. Analyze it dirty and every downstream number is quietly wrong. Describe the mess precisely and let the model write the fix.

Google Sheets. Columns: customer_name, signup_date, plan, monthly_fee. Problems I can see: - signup_date is mixed: "2025-03-01", "3/1/2025", "March 1 2025" - monthly_fee is text with a "$" prefix and commas, e.g. "$1,200" - some customer_name rows have leading/trailing spaces - duplicate rows exist (same name + signup_date) Give me the exact steps and formulas to normalize signup_date to a real date, convert monthly_fee to a number, trim names, and flag duplicates in a helper column. Tell me which column each goes in. Don't change data silently — I want to review before deleting anything.

The "review before deleting" line matters — you want problems surfaced, not rows quietly dropped. For messier reshaping, framing the request as a structured JSON prompt keeps input and output unambiguous.

Get the formula and the explanation together

The fastest win in ChatGPT for data analysis is turning a plain-English need into a working formula. Ask for the formula *and* a line explaining it, so you verify the logic instead of pasting a black box.

Excel. Table on Sheet1: A=order_date, B=region, C=revenue (number). Data is rows 2 to 5000. Write one formula that returns total revenue for the "North" region, but only for orders in Q1 2025 (Jan 1 - Mar 31, 2025). Requirements: - Use SUMIFS, not an array formula - Explain each argument in one line so I can check it - Tell me exactly which cell to put it in

You get a SUMIFS you can read argument by argument and confirm the date bounds. For a gnarlier calculation, a chain-of-thought prompt forces the model to show its working first.

SQL is the same — describe the schema, name the dialect, state the grain you want.

PostgreSQL. Two tables: orders(id, customer_id, order_date DATE, amount NUMERIC) customers(id, name, country TEXT) Return, for each country, the total revenue and the number of distinct customers, for orders in 2025 only. Sort by total revenue descending. Only include countries with more than 10 distinct customers. After the query, explain the GROUP BY and HAVING in one sentence each.

Naming the dialect stops the model handing you MySQL syntax that breaks in Postgres. The patterns in the coding prompts guide carry straight over.

Totals are easy; the story is in the change. Tell the model which periods to compare and what "growth" means — absolute dollars, percentage, or both. Otherwise it picks one and you can't tell which.

Below is monthly revenue by product line for 2024 and 2025. Compare 2025 vs 2024 for each product line. For each, give: - Absolute change (USD) - Percentage change - One plain sentence on the trend (growing, flat, declining, volatile) Then name the single product line I should worry about most and say why, using only the numbers in the table. Do not invent a cause. TABLE: [paste your data]

"Do not invent a cause" is doing real work. A model will cheerfully explain that revenue fell "due to seasonality" when it has no idea why. Keep it to what the numbers show.

Describe the pivot table, chart, or outlier you want

You can't paste a chart into a prompt, so describe it: chart type, axes, grouping, what it should reveal. Vague requests ("make a chart") get vague charts.

Google Sheets. Columns: date, channel (web/retail), units_sold. 1. How do I build a pivot table with channel as rows, month as columns, and SUM of units_sold as values? 2. Then describe the chart to build from it: a grouped column chart, months on the x-axis, one bar per channel, so I can compare web vs retail month by month. Give me the menu clicks, not the concept.

Outliers need a definition too. "Find anything weird" is not a spec. Give the model the rule: values more than two standard deviations from the mean, or any day revenue jumped over 50% from the day before. Ask it to list the rows and flag them — it spots candidates, you confirm they're real.

Tip: When you upload a CSV, give the model a five-row sample and describe the file's size and columns. It reasons far better about "12 columns, 80,000 rows, one row per transaction" than a raw dump it has to infer — and you avoid pasting volume you don't need.

Turn findings into plain language for non-analysts

The person who asked often can't read a pivot table. Your last step is translation: numbers in, one clear takeaway out. Tell the model who's reading and what decision they face.

Turn these findings into a 4-sentence summary for a non-technical CEO who has 30 seconds. No jargon, no percentages without context. Findings: - North region revenue up 22% YoY ($1.1M to $1.34M) - Retail channel flat; all growth came from web - One product line (Legacy Pro) down 40%, dragging the total - Web conversion improved after the March site redesign End with the one decision I should raise in the next meeting.

Sharpening that translation is what a prompt optimizer is for; to start from scratch, a ChatGPT prompt generator gives you a base. The framing in the advanced prompt engineering guide helps when the ask gets complicated.

Check every number before you present it

The best AI prompts for data analysis build verification into the workflow, because AI miscalculates. It misreads which column is which, sums the wrong range, and reports it with total confidence. Treat every output as a draft from a fast, careless intern.

  • Re-check formulas by reading them, not by trusting the result. Confirm the range, dates, and conditions match what you asked.
  • Spot-check figures against the source. Verify two or three numbers by hand. If they hold, confidence rises; if one's off, throw out the whole answer.
  • Never present a number you haven't verified. "The AI said so" is not a source. You are.
  • Watch data privacy. Don't paste customer names, financial records, health data, or anything under an NDA into a consumer tool. Anonymize first — "Customer A, $12k" analyzes as well as the real name, and the sensitive detail stays with you.

Strong Excel AI prompts and clean SQL don't excuse you from checking the math — they just make it faster to produce and easier to get subtly wrong at scale. The discipline is simple: describe the data honestly, ask a precise question, verify the output, keep confidential data out. Do that and AI prompts for data analysis become a genuine second pair of hands. Skip verification and they become a fast way to be wrong.

References

Put this into practice. Apply what you just read with our free tool: Prompt Optimizer →
FAQ

Frequently asked questions

Yes. It can write formulas and SQL, suggest how to clean and structure data, summarise trends, and explain results in plain language. With file upload it can also work directly on a spreadsheet or CSV you provide.
Describe the data and the question: 'Here are monthly sales by region as a CSV. Identify the three biggest changes quarter over quarter, suggest likely reasons, and give me the Excel formula to reproduce each figure.'
Verify the maths. AI can miscalculate or misread a column, so check its formulas and spot-check figures against the source before you present them or make decisions.
Yes, and it's one of its most reliable uses. Describe your columns and what you want, and it will produce the formula or query — then explain how it works so you can adapt it.

Write your next prompt in seconds

Turn a rough idea into a clear, structured prompt any AI can follow. Free, private, and no account needed.

Open the Prompt OptimizerSee all tools