How to create a sales forecast—A step by step guide

In this how-to guide and tutorial, you will use IBM Planning Analytics and its artificial intelligence (AI) forecasting capabilities to forecast future sales for five products.

What is sales forecasting?

Sales forecasting is the process of using sales data, market trends and external factors to estimate future sales and future revenue for a specific time period—typically a month, quarter or year.

Accurate sales forecasts serve as an organization’s foundation for effective business planning. Finance teams use the sales predictions for data-driven decision making concerning budgets and cash flow management. Operations teams use the forecasts for supply chain management, calculating how much inventory to stock and determining staffing levels.

If a forecast is wildly optimistic, the company overextends, potentially leading to layoffs or budget cuts when the sales revenue doesn’t materialize. If the forecast is too conservative, the company might miss out on growth opportunities because it didn’t have the resources ready to scale.

Sales forecasting methods

Historical forecasting uses historical sales data to predict future revenue. This methodology is grounded in time series models, a form of machine learning that analyzes data points in chronological order to forecast future values.

Historical forecasting works best in stable, predictable environments where trends hold steady over time, drawing on data points like sales averages and seasonal patterns to set a reliable baseline. The limitation, however, is that this approach can be slow to react to sudden market shifts or changes in customer behavior.

Pipeline forecasting augments the historical forecasting approach by applying past performance data to the current, active sales pipeline. Opportunities in the pipeline are assigned a closing probability based on historical sales performance and close rate data.

For example, the “discovery” sales stage might get assigned a 10% probability of closing, the “demo” stage 30%, the “negotiation” stage 70% and the “contract sent” stage a 90% probability. Each stage’s probability is then multiplied by the total potential sales in that stage to calculate each stage’s projected revenue: 

  • USD 500,000 of potential sales in the “discovery” stage X 10% probability = USD 50,000
  • USD 400,000 in “demo” X 30% = USD 120,000
  • USD 300,000 in “negotiation” X 70% = USD 210,000
  • USD 200,000 in “contract sent” X 90% = USD 180,000

The total forecast equals the sum of all stages’ forecasts, USD 560,000. This calculation gives a more realistic number than simply looking at the USD 1,400,000 total face value of the pipeline.

Weighted pipelines and forecasting are the foundation of modern pipeline management because they allow sales teams to see the expected value of their efforts and provide real-time data about expected revenue. However, they rely heavily on sales stages being accurately defined and sales representatives being honest about where a deal truly sits as reported in the customer relationship management (CRM) system.

Bottom-up forecasts build more detailed predictions from the sales rep level up, aggregating individual pipeline data and deal projections into team, regional and company-wide views.

Macro-level forecasting takes a wider lens, looking beyond internal sales data to assess broader market conditions and external volatility. This type of forecasting can include economic indicators like GDP growth or consumer price indices or market research that all shape the selling environment. If interest rates spike, for example, pricing becomes more sensitive and customers’ buying power might shrink. Forecasts are adjusted based on the macro-environment and market trends.

AI forecasting applies machine learning to analyze past data, deal progression and buyer engagement signals to predict which opportunities are most likely to close. AI-powered sales forecasting software and predictive analytics tools can analyze large and complex datasets. As a result, sales leaders and their teams can automate the analysis of thousands of data points to make informed decisions and predict future sales.

For this tutorial, we will use AI forecasting with past sales data to forecast future sales and revenue.

Prerequisites 

Review the following prerequisites before starting the tutorial.

  1. Set up an IBM account to register for a free Planning Analytics trial.
  2. Download the sample file `product_sales_forecast.csv` from our GitHub repository. You can preview this file using Microsoft Excel or Google Sheets.

The sales forecasting process

Step 1. Collect and clean relevant data

Sales teams can collect relevant data from CRMs for sales, like Salesforce, to begin the sales forecasting process.

Next, data cleaning will help remove any noise from a dataset. For instance, if you had a one-time unexpected deal that likely won’t repeat, remove that data point. These outliers will otherwise skew our forecast to be too optimistic.

For our walkthrough, we will upload the dataset as is to the Planning Analytics Workspace and will use the AI forecasting tools to identify and correct for outliers.

From the Planning Analytics home page, create a new book by navigating to the hamburger menu on the upper left and clicking “+ New”. From there, click “Book” to add a new book.

IBM Planning Analytics interface with left navigation menu and a New page showing options to create a Book or Book from template

Next, locate the “BusinessFlow” database on the data tree. Click the ellipsis menu, “Import/Export” and then select “Import data”.

 IBM Planning Analytics interface showing a New book tab with an Import/Export menu listing import data, export data, and refresh options

On the “Import data” window, select “New cube” and name the cube “Sales_forecast.” Select “File” as the “Data source” type from the dropdown. Next, click “Upload a file” and drag and drop the “product_sales_forecast.csv” file you downloaded as part of the prerequisite steps. Select “Next” to continue with the upload.

IBM Planning Analytics Import data screen showing name and data source fields, options panel on the left, and Next button

You will see a preview of the data source next. Here’s how it should look.

IBM Planning Analytics Import data screen showing a preview table with columns for product data, market, version, and value, plus navigation buttons

To finish the import, we need to map member data. Let’s configure the “Import settings.”

The “Dimension mapping format” should be “Leaf only”. “While loading data” should be “Overwrite existing data.” Select “Save import as a process” and name the process “Import_sales_data.”

We need to complete the data source mapping with the following “Cube dimension” to its corresponding “Leaf”: Write in “Product” as a new dimension and map it to “Products_to_forecast” under the leaf column; Populate “Month” as a new dimension and map it to “Month” from the spreadsheet; and add “Version” as a new dimension, mapped to “Version” from the file.

The last column in the data source is correctly identified as “Data” of “Numeric” type and needs to be mapped to the “Value” leaf. The import dialog box should look like this. Click “Import” once you verify that everything looks correct.

IBM Planning Analytics Import data screen showing map member settings, dimension mapping table, and navigation buttons

A “Save process” dialog box appears next; click “Overwrite” to continue.

Save process dialog stating a file named “product_sales_forecast.csv” already exists, with Cancel and Overwrite buttons

The “File import results” dialog reports the processing of the data source. Click “OK” to close the report.

File import results dialog showing 580 dimension rows read and loaded, 580 data rows read and loaded, with OK button

After importing the data, let’s adjust our view so the data is easier to visualize.

First, let’s swap the rows and columns in our view so the chronological data is listed across the columns.

IBM Planning Analytics interface showing a data table with rows and columns inside a book view, with navigation panel on the left

Next, let’s practice using drag and drop selections by moving the “Budget, Actual, Variance…” numbers next to the “Product Total” dropdown.

IBM Planning Analytics table showing Product Total by month, with budget, actual, variance, and forecast rows across January to May

Then, move the “Product Total” selection below to replace the previous “Budget, Actual, Variance…” as the rows.

IBM Planning Analytics table setup showing Product Total and Budget selectors, with drag-and-drop guidance text in the table area

From the “Budget, Actual, Variance…” dropdown, select “Actual” so we forecast on the actual numbers only.

IBM Planning Analytics table with a dropdown open showing Actual, Budget, Variance, and Forecast options above a monthly data grid

Let’s also make sure we see only the five products to forecast as part of this chart. In the “All products” dropdown, select “Set Editor” to explore how we can remove multiple items at once.

IBM Planning Analytics table with a dropdown open for product selection, showing All products, sets, and search options above a monthly grid

In the “Set editor”, you can see that there are 26 products currently included. Select all 26 and then the minus sign to remove them.

IBM Planning Analytics Set editor showing available products on the left and selected product list on the right with action buttons

Finally, select all five products on the left panel, locate the option to insert the selection on the ellipsis menu and click “Member only”. Click “Apply” to finish.

IBM Planning Analytics Set editor showing selected products list, Add members menu open, and instructions panel on the right

Next, let’s adjust the time frame to display data only from January 2024 onwards. Click “Set Editor” for the time selection.

IBM Planning Analytics table with Selection dropdown open, showing Search, Sets, Months, and Levels options above a data grid

Select the months without a year attached (13 items total) to remove them and click “Apply.”

IBM Planning Analytics Set editor with available members list on the left and selected members list on the right, with action buttons

You should now have the relevant data from January 2024 onwards.

Step 2. Define your forecast time frame

The right time frame for a business depends on its sales cycle, business model and marketing strategy. If you sell a low-cost SaaS product with a two-week sales cycle, a monthly forecast is appropriate. By contrast, if you sell enterprise software with a six-month cycle, a quarterly or annual view is more practical. 

Let’s return to our tutorial example to determine the appropriate time frame for our data.

If you examine the data, you can see that there are values for January 2024 through November 2025, but no values after that month. Equipped with nearly two years worth of sales data, we can generate a forecast for December 2025 through May 2026.

Step 3. Forecast

From here, we can let the AI forecasting do the heavy lifting. Highlight the rows for all 5 products to forecast. On the taskbar, select the icon for “forecasting”, an upward trend line chart, and click “Univariate”.

IBM Planning Analytics table showing product rows and monthly columns with numeric values, plus a Publish menu on the right

To set up the univariate forecast, select the forecast period start, December 2025, and its end, May 2026. Click the option to “Save statistical details as comments.” Select the “Preview” option to preview the forecast.

 IBM Planning Analytics table with product rows and monthly values, and an Univariate forecast panel open on the right side

Reviewing the forecast for “Product1”, we can see that there are clear seasonal fluctuations with distinct maximum and minimum values occurring every four months. The “Forecast summary” indicates that we have a strong forecasting model for this product with high forecast accuracy and low forecast errors. Mean absolute percentage error (MAPE) and other model statistics are included for further analysis.

Univariate forecast preview showing a line chart with historical data, dotted forecast trend, and a forecast parameters panel on the right

Let’s review another product’s forecast, Product4. We can see that for this product, the seasonality is less evident than Product1. We can also see that there are outliers detected in our data for this product.

Univariate forecast preview with line chart of historical data, highlighted point, shaded forecast range, and parameters panel on the right

With the outliers adjusted, we can see in the “Outliers” tab that the accuracy of our final results will increase by 4%.

Univariate forecast preview with line chart of historical data, shaded forecast range, and forecast settings panel on the right

More metrics and details are listed in the “Statistical details” tab for us to review.

Univariate forecast preview showing accuracy metrics, statistical model details, parameter sliders, and forecast performance summary panels

Step 4. Communicate and integrate

Once we’ve completed the sales forecasts for all five products, it’s time to share the forecasts with our stakeholders. In our previewed results, there is an option to “Download CSV” if we would like to share the individual product forecasts as spreadsheets. We can also keep the forecast model as part of the existing view in Planning Analytics to share.

Sales managers can use this data to inform their sales strategy and sales planning process, including the implementation of sales quotas. These forecasts can also establish the groundwork for further sales analytics. Or, if our sales leaders need to launch new marketing efforts for a new product, for example, they can use analogous product data and forecasts to establish sales targets instead of just making educated guesses.

Step 5. Monitor performance

As 2026 progresses, we should continue to measure our forecast accuracy. At the end of each month, we should compare the forecasts to actual results, key KPIs and established industry benchmarks.

If our forecast is strong, we can use that confidence to optimize resources and take calculated risks like investing in a new market or new business development.

Conclusion

In this tutorial, you forecasted sales for five products by using Planning Analytics and AI.

You followed a structured approach of data collection, time frame selection and forecasting using AI.

To explore demand forecasting and other AI-enriched FP&A solutions, sign up for a free Planning Analytics trial.

Author

Erika Russi

Data Scientist

IBM