How to Forecast Sales in Google Sheets with AI

Cody Schneider9 min read

Building an accurate sales forecast used to mean wrestling with complex formulas or expensive, specialized software. Today, you can create a surprisingly powerful and intelligent sales forecast using a tool you probably have open right now: Google Sheets. This guide will walk you through how to use AI directly within Google Sheets to move beyond simple trendlines and generate truly dynamic sales predictions.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Forecast in Google Sheets?

Before jumping into the AI methods, let’s quickly cover why Google Sheets is such a great environment for this task. For many startups, small businesses, and marketing teams, it’s the default hub for data.

  • Accessibility: It’s free and browser-based, meaning you and your team can access it from anywhere without installing software.
  • Collaboration: Real-time collaboration makes it easy to share your forecast with stakeholders, get feedback, and allow others to contribute or review your numbers.
  • Integration: As you'll see, Google Sheets' ability to integrate with third-party AI tools through add-ons is what makes this process so powerful.

Traditional vs. AI Forecasting: What's the Difference?

Understanding the distinction between legacy methods and a modern AI-driven approach is an important first step. It helps contextualize why this process is so much more effective.

Traditional forecasting typically relies on simple statistical models. In Google Sheets, the most common is linear regression, executed with the =FORECAST.LINEAR function. It finds the straight-line trend in your historical data and extends that line into the future. It’s useful for stable businesses with very predictable growth, but it fails to account for more complex, real-world factors. What about seasonality, the impact of marketing campaigns, or subtle market shifts? Linear forecasts miss these nuances entirely.

AI-powered forecasting, on the other hand, uses machine learning models. Instead of just drawing a straight line, these models can analyze your historical data to identify sophisticated patterns, including:

  • Seasonality: Does your business see a recurring spike every holiday season or a dip in the summer? A linear model can't see this, but an AI can.
  • Complex Trends: Is your growth accelerating or slowing over time? AI can model non-linear growth curves that better reflect reality.
  • Correlations: With more advanced setups, AI models can even consider multiple variables, like how your ad spend or website traffic might correlate with and predict future sales.

Basically, AI looks at your data more like a human analyst would, finding intricate patterns that simple math alone would overlook.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Get Your Historical Sales Data Ready

Any forecast, AI-driven or not, is only as good as the data it's built on. This is the single most important step in the entire process. If you feed the AI messy, inconsistent data, you'll get a messy, unreliable forecast. This is often framed as "garbage in, garbage out," and it is absolutely true.

The Right Format for Your Data

Simplicity is best. All you need is two clean columns in your Google Sheet:

  • Column A: Date (e.g., 2023-01-01, 2023-02-01) - Must be a consistent time interval (daily, weekly, monthly).
  • Column B: Sales Volume or Revenue - Just the numbers, no currency symbols or commas.

Your sheet should look something like this:

Tips for Keeping Your Data Clean

  • Be Consistent: If you use monthly data, make sure every row represents a month. Don’t mix weekly and monthly data.
  • Fill in Gaps: Ensure you don't have missing periods in your data, as this can confuse the model.
  • Go Back in Time: The more historical data you provide, the better. At a minimum, try to use 1-2 years of data so the AI has enough information to identify seasonal trends and other long-term patterns.

Step 2: Basic Forecasting with Google Sheets' Built-in Function

To appreciate what AI brings to the table, let's start with a baseline using Google's native forecasting function. We’ll create a basic forecast using =FORECAST.LINEAR().

This function works by looking at your historical dates and sales numbers, calculating a simple linear trend, and projecting that trend forward to a future date you specify. The syntax looks like this:

=FORECAST.LINEAR(target_date, historical_sales_range, historical_date_range)

Let's say your past dates are in A2:A25, your past sales are in B2:B25, and you want to forecast sales for January 31, 2025, which you've put in cell A26. Your formula would be:

=FORECAST.LINEAR(A26, B2:B25, A2:A25)

You can drag this formula down for subsequent months to create your forecast. The weakness is obvious when you chart it: you get a perfectly straight line. It's a useful quick projection, but it’s unlikely your business grows so predictably.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 3: Supercharge Your Forecasts with an AI Add-on

Now for the exciting part. We're going to bring a true AI model into Google Sheets using an add-on. There are several great options available, but one of the most accessible and popular is any of the various add-ons that connect your sheet to a GPT model, such as the OpenAI API.

For this example, we’ll use a generic approach that works with popular tools like "GPT for Sheets and Docs."

Installing the AI Add-on

  1. Click on Extensions in the Google Sheets menu.
  2. Hover over Add-ons and select Get add-ons.
  3. In the Google Workspace Marketplace search bar, type a keyword like "GPT" or "AI."
  4. Choose a highly-rated add-on (like GPT for Sheets™, Coefficient, or similar) and click Install.
  5. Follow the prompts to grant the necessary permissions to the add-on.

Connecting to a GPT API

Most of these add-ons act as a bridge between your spreadsheet and a powerful AI model like one from OpenAI. This requires an API key, which authenticates your requests.

You generally only have to do this once. The specifics may vary slightly between add-ons, but the process is usually similar.

  1. Sign up for an OpenAI account and navigate to their API key section.
  2. Create a new secret key and copy it immediately. OpenAI will only show it to you once.
  3. Back in Google Sheets, open the add-on you just installed (usually from the Extensions menu).
  4. Find the settings or "Set API key" option and paste your key there.

Generating Your First AI Sales Forecast

With the add-on configured, you can now use a new function in any cell. The core skill here is writing a good prompt - a clear instruction for the AI. Let's create a forecast for the next six months.

The beauty of AI is that you can communicate in plain English. Your prompt needs to tell the AI three things:

  1. What you want it to do (forecast sales).
  2. The data source it should reference.
  3. The specific details of the forecast (timeframe, seasonality, etc.).

Most tools have a function like =GPT_LIST() or =GPT(). Here's a powerful prompt pattern:

="Forecast our monthly sales for the next 6 months. Pay attention to seasonal trends revealed in the historical data. The historical data (from Date in column A and Sales in column B) is: " & ARRAYTOTEXT(A2:B25)

Let's break that down:

  • "Forecast our monthly sales..." is the clear instruction.
  • "Pay attention to seasonal trends..." tells the model to look for more than just a straight line.
  • ARRAYTOTEXT(A2:B25) is a Google Sheets function that converts your data range into text that the AI can understand within the prompt.

Pasting this into a cell might take a few seconds, but the add-on will then output a list of forecasted sales numbers for your upcoming six months.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 4: Analyzing and Visualizing Your AI Forecast

The AI will give you a list of plain numbers. The final step is to put them in context and create a visual that tells the story.

  1. Combine Your Data: Create a new table that includes your historical dates and sales, and then add the new forecasted months and their corresponding numbers below them.
  2. Create a Line Chart: Select all of this data (both historical and forecasted) and go to Insert > Chart. Google Sheets will default to a line chart, which is perfect for this.
  3. Style Your Chart: Make it clear which part of the line is historical and which is forecasted. You can do this by changing the color of the forecast data series or turning it into a dashed line for easy differentiation.

You’ll immediately see a much more realistic projection than the flat line from the =FORECAST.LINEAR function. The AI-generated chart will likely have peaks and valleys that reflect the seasonality learned from your past data.

Tips for Improving Your AI Sales Forecast

Your first AI forecast is a huge step up, but you can make it even more accurate with a little refinement.

  • Refine Your Prompts: Experiment with your instructions. You could ask the AI to "explain its reasoning in a single sentence" to understand the patterns it identified. Or, specify a "conservative" or "optimistic" forecast to get different scenarios.
  • Add More Input Variables: For more advanced analysis, add columns for marketing spend, website traffic, or key promotions. Then, adjust your prompt to instruct the AI to "consider the relationship between marketing spend and sales in the forecast." This can yield incredibly insightful results.
  • Iterate and Review: Forecasting isn't a "set it and forget it" task. At the end of each month, update your sheet with the actual sales numbers and re-run your AI forecast. This continually trains the model on the most current data.

Final Thoughts

By connecting AI to Google Sheets, you can transform a familiar spreadsheet into a seriously smart forecasting console. Moving from simple linear predictions to nuanced, pattern-aware AI forecasts gives you a clearer, more realistic vision of where your business is heading, empowering you to make better decisions about inventory, staffing, and marketing budgets.

While forecasting in Sheets is powerful, a constant challenge is keeping the historical data up to date. The manual process of downloading CSVs from Shopify, Salesforce, or your ad platforms to paste into your forecasting sheet can be slow and prone to errors. We designed Graphed to remove this friction entirely. You can connect all your sales and marketing sources in seconds, and instead of wrangling spreadsheets, just ask questions like "forecast our revenue for Q4 based on last year's trends." Graphed builds a live, interactive dashboard that updates automatically, helping you get instant answers without any of the manual data prep.

Related Articles