Home / Guides / How to Build a Sensitivity Analysis in Excel (Data Tables)

How to Build a Sensitivity Analysis in Excel (Data Tables)

Financial Modeling · Updated June 2026

To build a sensitivity analysis in Excel, use a Data Table (Data tab, What-If Analysis, Data Table). Reference your output formula in the top-left corner, list input values along a row and a column, then point Excel at the row input cell and column input cell so it recalculates the output for every combination. This shows how an output like IRR or net income moves as two assumptions change.

What a Data Table actually does

A Data Table is Excel's built-in tool for stress-testing a model. You give it a grid of input values, and it substitutes each one into a single input cell, recalculates your whole model, and records the resulting output. Nothing is hardcoded: the table stays live and updates when your assumptions change.

There are two flavors. A one-variable Data Table flexes a single assumption (for example, revenue growth) and can report several outputs at once. A two-variable Data Table flexes two assumptions (for example, growth and margin) against a single output. Two-variable tables are the workhorse of valuation sensitivity grids.

The key constraint: the inputs you flex must be the real driver cells your model reads from. The Data Table temporarily writes each grid value into that driver cell, so linking to a copy or a value inside the table itself will silently produce wrong numbers.

Build a two-variable Data Table step by step

Suppose cell B2 holds revenue growth (10%), B3 holds gross margin (40%), and B10 calculates IRR. You want to see IRR for growth from 6% to 14% and margin from 30% to 50%.

  1. In the top-left corner cell of your table grid (say D5), enter =B10 so the corner points at your output. Format it white-on-white if you want to hide the raw number.
  2. List the row input values across the top, starting one cell to the right of the corner: put 6%, 8%, 10%, 12%, 14% in E5:I5.
  3. List the column input values down the left side, starting one cell below the corner: put 30%, 35%, 40%, 45%, 50% in D6:D10.
  4. Select the entire grid including the corner formula and both axes: D5:I10.
  5. Go to the Data tab, click What-If Analysis, then Data Table.
  6. In Row input cell, enter B2 (revenue growth, because growth runs across the row). In Column input cell, enter B3 (margin, because it runs down the column).
  7. Click OK. Excel fills every interior cell with the IRR for that growth and margin combination.
IRR6%8%10%12%14%
30%8.1%9.4%10.7%12.0%13.2%
40%11.9%13.5%15.1%16.6%18.0%
50%15.4%17.3%19.1%20.8%22.4%

Row axis is revenue growth, column axis is gross margin. The 40% margin row is the base case. Values are illustrative.

Build a one-variable table for multiple outputs

When you want several outputs (IRR, NPV, payback) against one driver, use a one-variable table. List the input values down a column, then in the row above and one cell to the right, place each output formula side by side.

Select the block (the input column plus the output formula row plus the empty grid below), open What-If Analysis, Data Table, and fill ONLY the Column input cell (because your inputs run vertically). Leave Row input cell blank. Excel substitutes each column value into your single driver and fills in every output.

Fix the four things that break Data Tables

Data Tables fail quietly, so know the usual suspects before you trust the grid.

Do it in one click

Find Hardcodes

A sensitivity grid is only honest if the cells you flex are genuine inputs. ModelMint's Find Hardcodes scans your assumption block and flags any number typed into a formula, so the row and column input cells you point Excel at are the real drivers and not a value stuck mid-calculation.

Get ModelMint See how it works

FAQ

Why is my Data Table returning the same number in every cell?

Almost always the input cell is wrong. Excel is substituting your grid values into a cell your output does not actually depend on, so the output never changes. Confirm the row and column input cells are the real driver assumptions and that your corner formula traces back to them.

Can a Data Table reference a model on another worksheet?

The Data Table grid and its input cells must live on the same worksheet, but those input cells can feed a model spread across other sheets. A common workaround is to put dummy input cells on the table sheet that your model reads, then sensitize those.

How many variables can a Data Table handle?

A native Data Table handles at most two variables. For three or more, build a small two-variable table and pair it with a scenario switch, or repeat the table once per setting of the third variable.