Yes—you can make a Gantt-style chart from Excel PivotTable data, but Excel does not have a dedicated Gantt chart type. The practical method is a stacked bar PivotChart with a task start date as an invisible offset and task duration as the visible bar; for more control, use a regular chart instead.
What a PivotTable Gantt chart shows
A Gantt chart displays tasks as horizontal bars positioned along a calendar. Each bar starts on the task’s start date and extends for its duration, making overlaps, sequencing, and gaps easier to see than they are in a task list. A PivotTable can summarize and filter the underlying task records, while a stacked bar chart turns the summary into a timeline view.
The chart is built from two numeric series. The first is the start date, which Excel stores as a serial number; it positions the bar at the right place on the timeline. The second is the duration in days; it determines how long the visible bar runs. Format the first series with no fill so it creates space without appearing as a colored bar. The visible duration series then looks like a Gantt task bar.
This approach is most straightforward when each task has one row and one start date. A PivotTable can still help group tasks by project, owner, or status, but it does not automatically understand dependencies or calculate a project schedule. Those details need to be represented in the source data or handled separately.
Prepare the task data
Start with a rectangular table, with one header row and one task per record. Useful columns include Project, Task, Owner, Status, Start Date, End Date, and Duration. Use real Excel dates rather than text that merely looks like a date. Select the data and choose Insert > Table; a table expands more reliably when you add tasks later.
For a simple project, your rows might look like this:
- Website refresh | Plan content | Mina | In progress | June 1, 2026 | June 5, 2026 | 5
- Website refresh | Draft pages | Lee | Not started | June 4, 2026 | June 10, 2026 | 7
- Website refresh | Review pages | Mina | Not started | June 11, 2026 | June 12, 2026 | 2
These examples count both the start date and end date as working calendar days. If Start Date is in B2 and End Date is in C2, enter =C2-B2+1 in the Duration column. For June 1 through June 5, 2026, the result is 5 days. If your schedule uses elapsed days rather than inclusive dates, omit the +1; decide on one convention and use it consistently. For schedules that exclude weekends or holidays, calculate working-day duration with an appropriate workday calendar before building the chart.
Keep task names unique within the group you plan to chart. If two projects both have a task called “Review,” use a combined label or include Project as another row field; otherwise the PivotTable may combine records that you meant to keep separate. Avoid blank dates and text in the Duration column, since they can produce misleading summaries or gaps.
Build the PivotTable and PivotChart
In Excel for Microsoft 365 on Windows, click a cell in the source table and choose Insert > PivotTable. Confirm the table or range, choose where the PivotTable should go, and select OK. With a cell in the PivotTable selected, choose PivotTable Analyze > PivotChart. You can also create a PivotChart from the Insert tab in many current builds.
- Drag Task to the Rows area. Add Project above Task if you want separate task groups by project.
- Drag Start Date to Values. Open its field menu, choose Value Field Settings, and select Min. This gives each task its earliest start date rather than adding date serial numbers together.
- Drag Duration to Values and choose Sum. This is appropriate when each task has one source row. If a task has multiple rows, decide how its duration should be summarized instead of assuming a sum is meaningful.
- With the PivotChart selected, choose Chart Design > Change Chart Type, then choose Bar > Stacked Bar. Confirm the chart type.
The chart should have one series for the minimum start date and another for duration, with tasks on the category axis. If the order of the series is wrong, use Chart Design > Select Data to inspect or reorder them where Excel permits. The key is that the start-date series must be the first stacked segment and duration the segment that follows it.
Format the bars and date axis
Click a start-date bar to select that entire series. Open Format Data Series and, under Fill & Line, set Fill to No fill. You can also set the line to No line. The start-date values remain in the chart and continue to position each duration bar, but the offset becomes invisible. Remove the start-date entry from the legend if it is still displayed, and give the duration series a clear color.
Format the horizontal value axis as dates. Right-click the axis, choose Format Axis, and use the Number section to select a date format such as mmm d. Set the minimum bound to the earliest date you want visible and the maximum to the last date in the schedule. Dates are stored as numbers, so a date-formatted axis is essential; if it shows large numbers instead, the data may be correct but the axis number format is not.
Task labels may appear in the opposite order from the source list. Select the vertical category axis and, in Format Axis, turn on Categories in reverse order if that makes the schedule easier to scan. Excel may move the horizontal axis to the top when you reverse categories. If needed, adjust where the horizontal axis crosses the category axis. Keep the date scale wide enough to include the whole schedule, and check that bars are not cut off at either edge.
Filter, group, and refresh the schedule
One advantage of a PivotChart is that it stays connected to PivotTable fields. You can add Owner or Status as a filter, or use those fields to divide the view, then focus on one team or project without rebuilding the chart. Keep the chart readable: displaying dozens of owners or statuses as separate series can make the timeline harder to interpret than a filtered view.
When you change the source table, refresh the PivotTable using PivotTable Analyze > Refresh, or right-click the PivotTable and choose Refresh. A new row added to an Excel table is generally included in the table’s expanded source, but the PivotTable still needs refreshing to show updated results. If you added data outside the table, check the PivotTable source range; otherwise the chart may omit those records. Refreshing updates summaries, but it does not repair invalid dates or decide how repeated task records should be combined.
Common problems and their fixes
- The bars begin at an unexpected date: Check that Start Date contains true dates, and that the PivotTable summarizes it by Min rather than Sum or Count. Verify the horizontal axis minimum and number format too.
- The task bars are far too long: Check whether Duration is being summed across duplicate task rows, or whether a date field was accidentally included as a duration. For a one-row-per-task source, Sum of Duration should match that row’s value.
- The start date is visible as a colored bar: Select the start-date series, not the duration series, and set its fill to No fill. Selecting the wrong series can hide the actual task bars.
- New tasks do not appear: Refresh the PivotTable and confirm the rows are inside the source table or PivotTable source range. Also check whether a report filter is excluding them.
- Dates are grouped by month or year: Excel may group date fields in a PivotTable. Ungroup the date field if the grouping is not useful, and confirm the chart is using the date values you intended.
A further limitation is that a PivotChart is designed to reflect PivotTable fields. It is not a free-form chart where you can casually add unrelated helper series, custom labels, or a dependency line. If a required formatting change is unavailable or the chart becomes awkward to maintain, use the PivotTable to filter or summarize the data and create a separate regular chart from a clean helper range.
PivotChart or regular chart?
Choose a PivotChart when interactive filtering and refreshable summaries matter more than precise chart customization. It is convenient for recurring project reviews, especially when viewers need to filter by project, owner, or status. Its field buttons and connection to the PivotTable make the data relationship visible, but also constrain how the chart can be edited.
Choose a regular stacked bar chart when you need more control over labels, annotations, series, or layout. A common arrangement is a helper range with one row per task and columns for Task, Start Date, and Duration. Build a regular stacked bar chart from that range, then hide the start-date series in the same way. The helper range can be linked to PivotTable results, but the regular chart will not behave like a PivotChart with its own field controls. Check the helper values after changing filters or refreshing the PivotTable.
Neither option is a complete project-management system. A spreadsheet Gantt view can show planned dates and durations, but does not automatically reschedule dependent tasks when one date changes, manage resource conflicts, or provide robust version history. For a small or moderately sized schedule, Excel may be sufficient; for complex dependencies and coordinated updates, a dedicated project-planning tool may be more suitable.
Frequently Asked Questions
Can Excel make a Gantt chart directly from a PivotTable?
Yes, as a Gantt-style PivotChart using a stacked bar chart, a start-date offset series, and a duration series. Excel does not provide a built-in chart type named Gantt, so the offset series must be formatted to appear invisible.
Can a PivotChart show task start and end dates?
It can display task spans when the chart uses a start-date value and a duration value. Calculate duration from the dates in the source data, then use the start date to position the bar. Showing an end date alone does not create the required bar length.
Why does my PivotChart show date serial numbers?
Excel stores dates as numbers. Select the chart’s horizontal value axis and apply a date number format in Format Axis. Also verify that the source field contains actual Excel dates rather than text.
Can I use working days instead of calendar days?
Yes, but calculate the duration using your workweek and holiday rules in the source data. A basic difference between two dates counts calendar days, and changing the duration alone does not automatically remove weekends from the chart’s timeline.
Does the PivotChart update when I edit a task?
It updates after its PivotTable is refreshed. Use PivotTable Analyze > Refresh, and confirm that the edited or new record is inside the PivotTable’s source range. A chart can only reflect the data that its PivotTable includes.
Related
- Excel Page Break Preview: Add and Move Page Breaks
- Excel Page Break Preview: How to View and Adjust Pages
- Excel Page Break Not Moving? Causes and Fixes
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Box Plot X-Axis Labels: Set and Fix ThemIn Excel for Microsoft 365 on Windows, a box plot’s x-axis labels normally come from the column headers…
- Excel Dashboard Software Alternatives and How to ChooseExcel dashboard software alternatives include Microsoft Power BI, Tableau, Looker Studio, Qlik Sense, Zoho Analytics, and Metabase. The…
- Excel Slicer Link to Different Pivot Tables: How It WorksYes. In Excel for Microsoft 365 on Windows, one slicer can filter multiple PivotTables when those PivotTables share…
- Excel Line Chart: Plotting Total Values Over TimeTo make an Excel line chart that uses total values, put each period or category in one column…
- Google Sheets: Add a Vertical Line to a ChartGoogle Sheets does not offer a one-click setting for an arbitrary vertical reference line in a chart. For…
- Excel Line Charts: Ignore Blank Cells or Show Gaps?Yes. In Excel for Microsoft 365 on Windows, select the line chart, choose Chart Design > Select Data…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.