Predictions in Google Sheets & Excel (No Code)
Spreadsheets are the most-used data tool on Earth. They're also one of the most underrated places to do machine learning. With nothing more than the formulas already built into Google Sheets and Microsoft Excel, plus a sprinkle of AI features, you can do real predictive work — forecasting sales, classifying entries, spotting trends, even running the equivalent of regression models. Best of all, the skills transfer directly to any office job.
What You'll Learn
- The built-in formulas in Sheets and Excel that perform real ML
- How to forecast time-series data (sales, traffic, study hours) in two clicks
- How to use Google Sheets' Smart Fill and Excel's Ideas / Copilot
- How to combine ChatGPT with your spreadsheet for AI-powered analysis
Setup
You'll need either:
- A free Google account (for Google Sheets)
- Or Excel (Microsoft 365 or Excel for the Web — also free with a Microsoft account)
For the AI-pairing exercises at the end you'll also want ChatGPT or Claude open in another tab.
The Forgotten ML in Spreadsheets
Did you know that TREND(), FORECAST(), and LINEST() in Google Sheets and Excel are doing linear regression under the hood? They were doing supervised learning long before "machine learning" became a marketing term.
Here are the most useful spreadsheet ML functions:
| Function | What it does | Example use |
|---|---|---|
TREND | Predicts future values from a linear pattern | Project next quarter's sales |
FORECAST.LINEAR | Forecasts a single future value | Predict revenue for a specific month |
FORECAST.ETS | Time-series forecasting with seasonality | Predict daily web traffic |
LINEST | Returns full regression statistics | Understand which features matter most |
CORREL | Correlation between two columns | Find which features link to outcomes |
RAND / RANDBETWEEN | Random sampling for train/test splits | Build your own validation sets |
These aren't "AI lite" — they're real statistical / ML methods that have been used for decades.
Hands-On 1: Forecast in 30 Seconds
Open a new Google Sheet. Paste this:
Month,Sales
Jan,8200
Feb,8900
Mar,9700
Apr,10100
May,11300
Jun,12000
Jul,12700
Aug,13800
Sep,14400
Oct,15500
Nov,16100
Dec,17200
Now select all your data (including headers), then go to Insert → Chart. Sheets recognizes a time series and offers a line chart automatically.
To forecast: select all your data, then go to Insert → Chart → Customize → Series → Trendline → Linear. Then turn on "Label" and "Show R²". You now have a regression model living inside your chart.
For an actual numeric forecast for the next 6 months:
=FORECAST.LINEAR(13, B2:B13, ROW(B2:B13))
That returns the predicted sales for "month 13" (next January). Change the 13 to 14, 15, etc. for further months.
This is supervised learning. You just did it in a spreadsheet.
Hands-On 2: Smart Fill / Flash Fill (Pattern Detection)
Google Sheets has Smart Fill and Excel has Flash Fill — both detect patterns from your examples and complete columns automatically.
Try it:
- Column A: a list of full names (e.g., "Maria Gonzalez", "Karim Hassan", "Wei Chen")
- Column B: type the first one as
M.G., the second asK.H.and stop - Sheets / Excel should suggest filling the rest. Press Tab to accept.
Behind the scenes, this is a tiny supervised ML model (Google calls it "smart fill") that learned the transformation from your examples. Try it for:
- Extracting domain names from emails
- Reformatting phone numbers
- Splitting addresses into components
- Generating product SKUs from descriptions
This single feature can save hours per week. Most people don't know it exists.
Hands-On 3: Excel Ideas / Microsoft Copilot
If you have Microsoft 365, click the Analyze Data button in Excel (formerly "Ideas"). It scans your sheet and suggests interesting patterns, charts, and even basic predictions — automatically.
Microsoft Copilot, available with paid Microsoft 365 plans, takes this further: you can type natural language ("forecast next quarter's revenue", "highlight customers at risk of churn") and it builds the analysis for you.
Hands-On 4: ChatGPT + Your Spreadsheet
The most powerful combo is using ChatGPT as the analytical brain on top of your spreadsheet data.
- Copy a small dataset from your spreadsheet
- Paste it into ChatGPT
- Try this prompt:
"Here is sales data by month. Please:
- Detect any seasonality
- Forecast the next 3 months using a method appropriate for seasonal data
- Compare to a simple linear trend forecast and explain which I should trust more
- Suggest one experiment I could run to make my forecast more accurate"
ChatGPT (with Data Analysis on) will run real statistical methods, plot the forecast, and explain the trade-offs. You bring the data; the AI brings the methods.
Hands-On 5: Build a Tiny Predictive Spreadsheet App
Here's a 15-minute project anyone can complete. Build a "Will I pass this class?" predictor:
- Set up a sheet with columns:
Student, HoursStudiedPerWeek, AttendanceRate, MidtermGrade, FinalGradePass(Y/N) - Fill in 20 fake students (or use ChatGPT to generate realistic data)
- Use
LINESTor a regression chart to find which features predict passing - In a new row, plug in your own current values for the input columns
- Use
FORECAST.LINEARto predict your outcome
You've just built a tiny predictive analytics tool — the kind of thing data analysts get paid to make.
When to Use Spreadsheets vs Other ML Tools
Use spreadsheets when:
- The data is small (a few thousand rows max)
- The pattern is reasonably linear or well-behaved
- You need to share with non-technical colleagues
- You need fast, "good enough" forecasting
Move to other tools (Teachable Machine, ChatGPT Data Analysis, real ML libraries) when:
- Data is larger or more complex
- You need image, text, or audio analysis
- Patterns are highly non-linear
- You need rigorous evaluation and tuning
Today's Hands-On Mini-Project
Pick one and complete it before moving on:
- Use the sales data above and add a
FORECAST.LINEARprojection for the next 6 months. Plot it. - Use Smart Fill or Flash Fill to do a real chore from your life (rename files, format a contact list, etc.)
- Build the "Will I pass" predictor with realistic data from your own classes.
Key Takeaways
- Spreadsheets contain real, decades-old ML inside built-in functions like
FORECAST,TREND, andLINEST - Smart Fill / Flash Fill are tiny supervised ML systems that learn from your examples
- Excel's Analyze Data and Microsoft Copilot bring AI-driven analysis directly into your sheet
- Pairing ChatGPT with spreadsheets gives you AI-powered methods on top of data you already have
- Spreadsheet-based ML is perfect for small, fast, business-friendly predictive work
Final lesson of Module 3 next: how to apply everything you've learned to your everyday decisions and school projects.

