FreeSheets

How to Make a Gantt Chart in Excel

Last updated June 2026

Quick answer

To make a Gantt chart in Excel, list each task with its Start date and Duration, then calculate End with =B4+C4-1. Lay a row of dates across the top, and use a conditional-formatting rule, =AND($B4<>"",F$2>=$B4,F$2<=$D4), to fill a colored bar in every cell whose date falls inside a task's run. The steps below build it cell by cell.

How do you build a Gantt chart in Excel?

  1. Set up the task table

    In a new sheet, type Project Plan in A1. In row 3, add the headers Task, Start, Duration (days), End in A3:D3. List one task per row starting at row 4, filling in the task name, its start date, and how many days it runs.

  2. Calculate each End date

    In D4, add the duration to the start and subtract one so a two-day task ends on the right day, not a day late. Copy the formula down the End column for every task.

    =B4+C4-1
  3. Start the date strip

    Pick the cell where your timeline begins — say F2 — and type your project's first calendar date as a literal, for example 7/6/2026. This anchor drives every column to its right.

  4. Fill the dates across

    In G2, reference the cell before it and add a day. Select G2 and drag the fill handle right for as many days as your project spans (45 columns covers six weeks). Then select F2:AY2, press Ctrl+1, choose Number → Custom, and enter the format code d so only the day number shows in the narrow columns.

    =F2+1
  5. Narrow the timeline columns

    Select columns F through AY, right-click a column header, choose Column Width, and set it to about 3. Center the dates so the strip reads as a compact calendar above your bars.

  6. Add the conditional-formatting rule

    Select the grid under the date strip — F4:AY18. Go to Home → Conditional Formatting → New Rule → Use a formula to determine which cells to format, and enter the formula below. Click Format, choose a solid fill color on the Fill tab, and click OK.

    =AND($B4<>"",F$2>=$B4,F$2<=$D4)
  7. Read your chart

    Every cell whose date sits between a task's Start and End now fills with color, drawing the bar automatically. Change any Start or Duration and the bars slide and resize on their own — no chart to redraw.

  8. Freeze the panes

    Click F4, then go to View → Freeze Panes → Freeze Panes. Your task names and the date header stay visible while you scroll across a long timeline.

ColumnHeaderWhat goes in it
ATaskThe task name you type in, one per row (Kickoff, Research, Design).
BStartThe date the task begins, entered as a real date so Excel can compare it.
CDuration (days)How many calendar days the task runs — a plain number like 5.
DEndCalculated with =B4+C4-1; never typed by hand so it always stays correct.
The four task columns and what each one holds, using the layout from the steps above.

Use absolute and mixed references exactly as shown: $B4 locks the column so the rule reads each task's own Start, while F$2 locks the row so it reads down from the date strip. Get one dollar sign wrong and the bars land in the wrong place.

Frequently asked questions

How do I skip weekends so bars only cover working days?
Swap the End formula for =WORKDAY(B4,C4-1), which counts forward by working days and skips Saturdays and Sundays. To measure the working span between two dates instead, use =NETWORKDAYS(B4,D4).
Can I show task dependencies, where one task starts when another ends?
Yes — instead of typing a Start date, point it at the previous task's End plus one day with a formula like =D4+1. The dependent task then shifts automatically whenever the task it follows moves or changes length.
Should I use Excel's stacked bar chart instead of conditional formatting?
The stacked-bar method makes a true chart object: plot Start as an invisible series and Duration as the visible bar, then reverse the category axis. It looks polished but is fiddly to edit; the conditional-formatting grid updates instantly and is far easier to maintain.
How do I extend the timeline past the dates I set up?
Click the last date cell in the strip, drag its fill handle further right, and Excel keeps adding one day per column. Then extend the conditional-formatting rule's applied range to cover the new columns under Manage Rules.

Related guides