Graphing Inequalities in Excel- Step-by-Step Tutorial
Graphing Inequalities in Excel: No-Nonsense Guide
Most people think graphing inequalities in Excel is complicated. It's not. You just need to know the right chart type and a few tricks. This guide gets you there fast.
What You Need Before Starting
You'll need Excel 2016 or later. Older versions work but the interface differs. Make sure you have your inequality written in a form Excel can use—typically y < mx + b or y > mx + b.
You'll be working with scatter plots and area charts. That's it. Scatter plots for the boundary lines, area charts for shading the solution regions.
The Basic Approach
Excel doesn't have a built-in "graph inequality" button. You have to build it yourself. Here's the logic:
- Plot the boundary line (y = mx + b)
- Use a second data series for the shaded region
- Format the region to show which side is included
Simple in theory. Let's do it.
Step-by-Step: Graphing y < 2x + 3
Step 1: Set Up Your Data
Create a table with x-values. Pick a range that covers your needs—let's use -10 to 10 with increments of 1.
Calculate y for the boundary line in column B: =A2*2+3
For the inequality y < 2x + 3, you need to plot points where y is less than the boundary. Create column C with the same formula as column B—this gives you the ceiling of your region.
Step 2: Insert the Scatter Chart
Select your x and boundary y columns (A and B). Go to Insert → Scatter → Scatter with Straight Lines.
You'll see your boundary line appear. That's step one done.
Step 3: Add the Shaded Region
Right-click the chart → Select Data → Add new series.
Select column C (your ceiling values) for the y-values. Leave x-values the same.
The chart now has two lines stacked on top of each other. Here's where it gets useful.
Step 4: Format the Fill Area
Click on the upper line (column C data) → Format Data Series.
Under Fill, select Solid fill. Choose a light color—blue or gray works well.
Under Line, select No line.
Your shaded region appears above the boundary line. But this shows y > boundary. You want y < boundary.
Step 5: Fix the Shading Direction
For y < boundary, you need to flip the logic. Instead of shading above, shade below.
Create a column D with a very low y-value (like -1000) for all x-values. Create column E with your boundary y-values.
Add a new series using columns D and E. Format the area between them:
- Solid fill with your chosen color
- No line
- Make sure the fill is below the boundary line
Now you have y < 2x + 3 shaded correctly.
Graphing y > mx + b (Greater Than)
The process is identical. Just flip the shading area to be above the boundary line instead of below.
Use a low ceiling value (like 1000) above your boundary for the shaded region. The logic stays the same—you're just defining which side of the line gets filled.
Graphing Compound Inequalities
Need to graph something like -2 < y < x + 1?
This gives you a region between two lines. Here's how:
- Calculate y for both boundaries (lower and upper)
- Add both as scatter plot lines
- Create a third data series between them
- Shade the area between the two boundary lines
The shading works the same way—fill between the two lines.
Handling Strict vs. Non-Strict Inequalities
y < and y > are strict. The boundary line itself isn't part of the solution.
Change the line style to dash instead of solid. This tells viewers the line is not included.
y ≤ and y ≥ include the boundary. Use a solid line.
Quick Comparison: Inequality Types
| Inequality | Boundary Line | Shaded Region |
|---|---|---|
| y < mx + b | Dashed | Below line |
| y ≤ mx + b | Solid | Below line |
| y > mx + b | Dashed | Above line |
| y ≥ mx + b | Solid | Above line |
Common Problems and Fixes
Shading is on the wrong side
Your ceiling/floor values are inverted. Swap them.
Line looks jagged
Use more x-values. Instead of increments of 1, use 0.5 or 0.1. More points = smoother line.
Chart doesn't show full region
Your y-axis scale is too small. Right-click the axis → Format Axis → Set fixed minimum and maximum values that actually cover your data range.
Legend shows extra series
Hide the helper series from legend. Click the series → Format → Series Options → Plot On Secondary Axis (uncheck if not needed). Or just delete the legend entirely.
Alternative: Using Excel's Built-In Functions
If you're comfortable with formulas, use IF statements to generate your data:
For y < 2x + 3, create a column that returns the boundary value only when the inequality holds, and NA() otherwise:
=IF(y < 2*x + 3, y, NA())
Plot only the valid points. This approach shows only the solution region as discrete points rather than a continuous shaded area. Less visual, but mathematically precise.
Getting Started Checklist
- ☐ Write your inequality in y = mx + b form
- ☐ Create x-values spanning your needed range
- ☐ Calculate boundary y-values
- ☐ Insert scatter plot with straight lines
- ☐ Add ceiling/floor data for shading
- ☐ Format fill and line styles
- ☐ Adjust axis scales to fit
- ☐ Set line style (solid vs dashed) based on strict/non-strict
Bottom Line
Graphing inequalities in Excel takes about 5 minutes once you know the scatter plot + area fill trick. The key is creating separate data series for the boundary line and the shaded region, then formatting them correctly.
No plugins needed. No special tools. Just standard Excel charting features used in a specific way.