Chart & Visualization Issues

How to Use an Excel Data Table to Calculate Multiple Inputs and Create a Chart

Emma BrownEmma Brown Nov 2, 2026 868 views

Question details

The user needs to evaluate a specific formula across a wide range of input values and visually graph the resulting input-output pairs.

How to Use an Excel Data Table to Calculate Multiple Inputs and Create a Chart
Product
Excel
Device & OS
not provided
Scenario
Calculating multiple formula outputs based on varying input values to analyze mathematical relationships or business scenarios.
Observed behavior
Instead of manually calculating each output one by one, the goal is to efficiently generate a complete data table of input-output pairs and represent them on a chart.
Before you start

Ensure your base formula correctly references a single input cell before attempting to create a data table, as the What-If Analysis feature depends strictly on this structural setup.

Solution 1Recommended

Use the What-If Analysis Data Table Feature

Utilize Excel's built-in Data Table tool to automatically calculate outputs for a range of inputs and plot the results.

A Data Table is part of Excel's What-If Analysis tools. It allows you to take one or two variables in a formula and replace them with multiple different values to view the outcomes simultaneously in a grid.

1
Set up the base formula

In an empty cell (e.g., B1), enter your calculation formula that references a blank input cell (e.g., A1). For example, if your formula is y=2x, type =2*A1 in cell B1.

2
List your input values

In a new column, list all the input variables you want to test (e.g., D2 through D10). Type the cell reference to your base formula (e.g., =B1) in the cell exactly one row above and one column to the right of your first input value (cell E1).

3
Generate the Data Table

Highlight the entire range containing your input values and the formula reference cell (D1:E10). Go to the Data tab, click 'What-If Analysis', and select 'Data Table'.

4
Configure the input cell

In the Data Table dialog box, leave the 'Row input cell' blank. In the 'Column input cell', select your original blank input cell (A1), then click OK. Excel will populate the outputs.

5
Insert a scatter chart

Select the newly generated input and output columns (D2:E10). Go to the Insert tab, click the 'Insert Scatter (X, Y) or Bubble Chart' icon, and choose a Scatter chart to graph the pairs.

Use the What-If Analysis Data Table Feature
Automatic Updates: If you change the base formula, the entire Data Table and the connected Scatter Chart will update automatically.
Advanced Spreadsheet Tool

Create Data Tables and Charts Easily in WPS Spreadsheet

WPS Spreadsheet offers fully compatible What-If Analysis tools and advanced charting options, making it incredibly easy to calculate multiple inputs and visualize complex data structures without any hassle.

  1. 1. Set up your data: Open WPS Spreadsheet and enter your base formula, referencing a single input cell just like you would in Excel.
  2. 2. Access What-If Analysis: Highlight your data table range, navigate to the 'Data' tab on the top ribbon, and click 'What-If Analysis' followed by 'Data Table'.
  3. 3. Generate the chart: Select the resulting input and output columns, go to the 'Insert' tab, click 'Chart', and choose the 'XY (Scatter)' option to instantly visualize your results.
100% compatibility with Microsoft Excel formulas, functions, and chartsBuilt-in What-If Analysis tools for rapid multi-variable calculationsExtensive library of customizable, professional chart templatesLightweight, fast, and free to use on Windows, Mac, and Linux
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel data table show the same result in every row?

This usually happens if your workbook calculation options are set to 'Automatic except for data tables' or 'Manual'. To fix this, go to the Formulas tab, click 'Calculation Options', and select 'Automatic'. Alternatively, you can press F9 to force a manual recalculation.

What chart type is best for displaying mathematical input-output pairs?

An XY Scatter chart with smooth lines is ideal for plotting continuous input-output pairs (like mathematical formulas) because it treats both the horizontal and vertical axes as numerical data, unlike Line charts which treat the horizontal axis as categorical text.

Can I calculate two input variables at the same time using a Data Table?

Yes, Excel supports Two-Variable Data Tables. You can input one set of variables in a row and another in a column. Place your base formula at the top-left intersection cell of the row and column, select the entire range, and define both the 'Row input cell' and 'Column input cell' in the Data Table dialog.

How do I delete values inside an Excel Data Table?

Because a Data Table acts as an array formula, you cannot delete individual cells within the results area. To clear the table, you must select all the resulting output cells generated by the Data Table simultaneously, and then press the Delete key.