How to Create a Gantt Chart With Task Dependencies
- Use "after taskId" to make a task start when another finishes — dependencies auto-calculate
- Chain as many tasks as you need — the timeline adjusts for the full dependency chain
- Parallel tasks are supported — multiple tasks can depend on the same predecessor
- Works in any browser, no signup, export PNG or SVG
Table of Contents
Task dependencies are what separate a real gantt chart from a visual timeline. When Task B depends on Task A finishing, the gantt chart automatically calculates when Task B can start — and if Task A slips, every downstream task adjusts. Here is the exact syntax for defining dependencies in the free browser gantt tool, with examples for common project structures.
How Task Dependencies Work
Each task in the gantt chart has an optional ID. To make Task B start after Task A, you use "after taskId" in Task B's definition instead of a specific date. The tool calculates the start date automatically based on when Task A ends.
The syntax structure:
Task Name :status, taskId, startDate-or-after, duration
With a dependency:
Task A :a1, 2026-01-01, 7d Task B :b1, after a1, 5d (starts when a1 ends) Task C :c1, after b1, 3d (starts when b1 ends)
Chain of three tasks: Task C automatically starts 12 days after the project begins, even though you only set a start date for Task A.
Sequential and Parallel Task Dependencies
Sequential (one after another):
gantt
dateFormat YYYY-MM-DD
title Sequential Tasks
Requirements :t1, 2026-01-01, 7d
Design :t2, after t1, 10d
Development :t3, after t2, 21d
Testing :t4, after t3, 10d
Launch :milestone, after t4, 1d
Each task waits for the previous one to finish before starting.
Parallel (multiple tasks after the same predecessor):
gantt
dateFormat YYYY-MM-DD
title Parallel Workstreams
Design complete :t1, 2026-01-01, 10d
Frontend dev :t2, after t1, 14d
Backend dev :t3, after t1, 14d
Integration testing :t4, after t2, 7d
Frontend and backend development both start after design is complete and run simultaneously.
Sell Custom Apparel — We Handle Printing & Free ShippingMulti-Phase Project With Complex Dependencies
gantt
dateFormat YYYY-MM-DD
title Product Launch
section Discovery
Market research :done, d1, 2026-01-05, 10d
Competitor analysis :done, d2, after d1, 7d
Requirements doc :active, d3, after d2, 5d
section Design
UX wireframes :des1, after d3, 10d
Visual design :des2, after des1, 7d
Design review :milestone, after des2, 1d
section Development
Frontend :dev1, after des2, 21d
Backend API :dev2, after des2, 21d
Integration :dev3, after dev1, 7d
section Launch
QA testing :qa, after dev3, 10d
Staging deploy :stg, after qa, 3d
Production launch :milestone, after stg, 1d
Notice that dev1 and dev2 both start "after des2" — parallel tracks. dev3 depends only on dev1 (frontend), not dev2. This gives you precise control over which task unlocks which subsequent work.
Common Dependency Mistakes and How to Fix Them
- Missing task IDs — if a task does not have an ID, you cannot reference it with "after". Add an ID (a short alphanumeric string like "t1" or "dev2") before the start date.
- Typo in the taskId reference — "after dev2" will not work if the task was defined as "dev_2". IDs must match exactly.
- Circular dependencies — Task A depending on Task B which depends on Task A will cause a rendering error. Check that your dependency chain flows in one direction.
- Forgetting sections do not affect dependencies — a task in Section 2 can depend on a task in Section 1 using "after". Sections are visual groupings only; they do not create automatic sequencing.
Add Task Dependencies to Your Gantt Chart — Free
Use the "after" keyword to chain tasks. Change one duration — the whole timeline recalculates automatically.
Open Free Gantt Chart MakerFrequently Asked Questions
Can a task depend on more than one predecessor?
The free gantt tool supports "after taskId" for one predecessor per task. If a task logically depends on two predecessors finishing, set its start to "after" whichever finishes last (the later one), and add a comment in the task name if context is needed.
Does changing a task duration automatically update all dependent tasks?
Yes. Because dependent tasks use "after taskId" rather than hardcoded dates, the chart recalculates the entire downstream schedule automatically when you adjust any task duration. Change Task A from 7d to 14d and every task that depends on it shifts forward accordingly.
How do I show a task that starts a fixed number of days after a predecessor?
The "after taskId" syntax starts the dependent task immediately when the predecessor ends. For a gap (e.g., 3 days of buffer), add a short buffer task between them: "Buffer :buf, after t1, 3d" and then set the next task to "after buf".

