To shade the area under a curve in Excel, put your x-values in one column and y-values in the next, select both columns, then choose Insert > Insert Line or Area Chart > 2-D Area. An area chart fills beneath the data series, but it treats the x-values as equally spaced categories; if your x-values are unevenly spaced, use a regular x-grid or another method to represent the spacing accurately.
What an Excel area chart shows
An area chart is the quickest built-in way to color the space below a plotted series. Excel connects the y-values in row order and fills the region between that line and the chart’s baseline. For a typical curve whose values are all zero or higher, that baseline is zero. The chart is a visual display: it does not calculate the mathematical area for you.
For example, enter x-values 0, 1, 2, 3 in A2:A5 and corresponding y-values 0, 2, 3, 1 in B2:B5. Select A1:B5 if the columns have headings, then insert a 2-D Area chart. Excel uses the first column as category labels and fills under the series formed from the second column. The curve is a sequence of straight segments unless you choose a chart style that smooths the line; smoothing changes the appearance and may not preserve the exact values between observations.
Area charts are useful for showing a continuous-looking quantity, such as temperature over evenly spaced days, cumulative output by month, or a measured response at equally spaced settings. If the chart is intended to communicate the shape and relative size of values, the filled area can make the series easier to see than a line alone.
Create and format the shaded chart
- Put the x-values in the first column and the y-values in the next. Add a heading to each column if you want Excel to use it as the series name.
- Select the headings and data, then go to Insert > Insert Line or Area Chart > 2-D Area. Avoid a 3-D style for ordinary data analysis because perspective can make comparisons harder.
- Check the chart’s labels and direction. If Excel plotted rows as series instead of columns, select the chart and choose Chart Design > Switch Row/Column.
- To change the fill, right-click the plotted area and choose Format Data Series. In the formatting pane, open Fill & Line, select Fill, and choose a color. Adjust transparency if you want gridlines or another series to remain visible.
- Add context from Chart Design > Add Chart Element, such as axis titles, a chart title, or gridlines. Label the units on the y-axis so the shaded values are interpretable.
On Excel for Mac, the same chart type is available from the Insert tab’s chart options, and series formatting is available by Control-clicking or right-clicking the series and selecting Format Data Series. Ribbon grouping and pane layout can vary slightly by release. In Excel for the web, chart insertion and basic formatting are available, though some advanced formatting controls may be more limited than in the desktop app.
Check whether your x-values are equally spaced
This is the most important limitation to understand. An area chart uses a category axis, so each row gets the same horizontal distance on the chart. The labels can look like numbers, but Excel does not use their numerical gaps to set the spacing. If the x-values are 0, 1, 2, 3, the spacing is appropriate. If they are 0, 1, 10, 100, the chart still gives each successive point the same width, which misrepresents the horizontal scale.
For unevenly spaced observations, decide whether equal spacing is acceptable for the purpose. If you only need a simple category comparison, an area chart may still be suitable, but label it clearly. If the horizontal distances carry meaning, create a new set of evenly spaced x-values and estimate the y-values at those positions, or choose a visualization that preserves the numeric x-axis. An XY scatter chart preserves numeric spacing, but its standard series options do not provide the same one-click fill-under-the-line treatment as an area chart.
Sorting also matters. Excel connects points in their worksheet order, not by automatically sorting the x-values. Sort the data by x-value before charting if the curve should move from left to right. Otherwise, the line can double back, and the filled shape may overlap itself.
Shade only part of the curve
To highlight a range of the curve, make a helper series that contains the y-values inside the chosen range and zero outside it, then plot that series as an area. For example, with x-values in A2:A20, y-values in B2:B20, and the desired lower and upper x-limits in F1 and G1, enter this in C2 and fill it down through C20:
=IF(AND(A2>=$F$1,A2<=$G$1),B2,0)
Use the original y-series as a line series and the helper series as the area series if you want the complete curve visible with only the selected region filled. This works most cleanly when the limits match data points. If a limit falls between two observations, the helper series can create a sloped transition from zero rather than a crisp boundary at the requested x-value. To improve it, add rows at the exact limits and calculate the corresponding y-values by linear interpolation between the neighboring observations. Use zero at the boundary for the helper series and the interpolated curve value for the line series.
For an area chart with category spacing, the boundary rows are still treated as categories. If your x-values are irregular, adding boundary points alone does not fix the unequal-spacing issue. Use a regular x-grid for a more faithful shape, or use a charting approach designed for numeric x-positions.
Shade the area between two curves
If the goal is to highlight the gap between a lower curve and an upper curve, a stacked area chart can create a band. With x-values in A2:A10, lower values in B2:B10, and upper values in C2:C10, make a helper column for the difference. In D2, use =C2-B2 and fill down. Select the x-values and the lower and difference series, then insert a 2-D Stacked Area chart. Format the lower series with no fill and give the difference series the desired fill color. The visible band then runs from the lower values to the upper values.
This method assumes the upper series is at least as large as the lower series at each point, so the difference is not negative. It also inherits the category-axis spacing of an area chart. If the curves cross, the difference changes sign and a single stacked band may not show the intended region correctly; split the data into sections or use another method. Keep the original curves as line series if readers need to see both boundaries clearly.
Calculate the area, not just the shading
A filled chart is not an area calculation. If you need a numerical estimate for measured points, the trapezoidal rule is a common approximation: treat each adjacent pair of points as the ends of a trapezoid, calculate its area, and add the results. For nonnegative values, this estimates the area between the curve and zero. It is not necessarily the exact integral of an unknown curve between observations.
With x-values in A2:A4 and y-values in B2:B4, enter the following in C2 and fill it down to C3:
=(A3-A2)*(B2+B3)/2
For the example points (0, 0), (1, 2), and (2, 0), C2 returns 1 and C3 returns 1, so their sum is 2 square units. This checks out geometrically: the plotted segments form two triangles, each with base 1 and height 2, so each triangle has area 1. If the x-intervals are negative or the curve crosses the baseline, decide whether you want signed area or total geometric area; those are different quantities. The chart’s filled appearance should not be used as a substitute for that decision.
Choose the right chart for the question
- Use an area chart when the x-values are categories or evenly spaced measurements and the purpose is to emphasize magnitude beneath a series.
- Use a line chart when you want to show a trend but the fill would obscure other data or exaggerate the visual weight of the series.
- Use an XY scatter chart when the x-values are numeric and their unequal spacing must be preserved. It displays the scale accurately, although shading beneath the curve requires an additional construction rather than the usual area-chart setting.
- Use a stacked area chart when you need to show how positive components contribute to a total or create a band between compatible series.
Be cautious when comparing separate area charts: filled regions can make small differences look dramatic, especially if the vertical axis is truncated. For ordinary values measured from zero, setting a clear axis scale helps readers judge the magnitude fairly. For negative values, inspect where Excel places the zero line and make sure the fill’s meaning is still clear.
Common problems and fixes
- The chart has the wrong series or labels: Use Chart Design > Switch Row/Column, and check that the x-label column and y-value column were selected together.
- The curve runs in the wrong direction: Sort the source rows by x-value. Excel follows row order.
- Uneven x-values look evenly spaced: This is expected for an area chart’s category axis. Use a regular grid or an XY scatter chart if distances matter.
- The fill hides another series: Use a lighter fill or increase transparency in Format Data Series. You can also place a line series over the filled series for a clearer curve outline.
- The shaded section has a wedge at its edge: The helper series is changing between a data value and zero across an interval. Add exact boundary points and control their helper values.
- The chart seems to stop at the bottom of the plot: Check the vertical-axis bounds and where zero appears. The filled region represents values relative to the chart’s baseline, so the axis settings affect what the shading communicates.
Frequently Asked Questions
Can Excel fill under a curve in a scatter chart?
Not with the same direct area fill available for an area chart. A scatter chart is better for uneven numeric x-values, but shading beneath it needs a workaround, such as using a regular grid and an area chart or building a separate visual layer.
Does an Excel area chart use the actual x-values?
It uses the x entries as category labels and spaces the categories equally. It does not make a wider gap for a larger numerical difference between adjacent x-values.
How do I change the color of the shaded area?
Right-click the filled series, select Format Data Series, then use Fill & Line > Fill to choose a color and, if needed, adjust transparency.
How do I shade only the area above a threshold?
Create a helper series that returns the y-value where it meets your condition and zero elsewhere, then plot it as an area series. For a threshold that falls between observations, add or calculate an appropriate boundary point to avoid an unintended ramp.
Does shading the area calculate the integral?
No. The fill is a chart effect, not a calculation. For an estimate from sampled points, calculate the trapezoid area between each adjacent pair and sum those results, taking care to distinguish signed area from total area.
Related
- Excel Reference Table in a Data Validation List
- Excel RANK vs RANK.EQ: Differences, Ties, and Examples
- Excel RANK.AVG vs RANK.EQ: Which Should You Use?
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Power Query: Split a List into Rows or ColumnsTo split a delimited list in Excel with Power Query, select its column in the Power Query Editor,…
- Cannot Find Data Validation in Excel? Here’s WhereIn Excel for Microsoft 365 on Windows, select a cell and open Data > Data Tools > Data…
- Conditional Formatting Duplicate Values in ExcelIn Excel for Microsoft 365 on Windows, select the cells to check, then choose Home > Conditional Formatting…
- Excel Keyboard Shortcuts Mouse Pad: Guide to ChoosingAn Excel keyboard shortcuts mouse pad is a physical mouse pad or desk mat printed with a quick-reference…
- Inventory Spreadsheet in Google Sheets or Google Docs?For an inventory spreadsheet, use Google Sheets rather than the Google Docs word processor. Sheets is built for…
- Add Apps Script to Google Sheets: A Practical GuideTo add Apps Script to a Google Sheet, open the spreadsheet in a web browser and choose Extensions…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.