The flowchart is the oldest and most widely understood diagram in software and business. This page teaches the symbols, walks through two complete examples, and lists when a flowchart is the right tool.
A flowchart shows the steps of a process and the decisions between them, using a small set of standard shapes joined by arrows. Anyone can read one: developers use them to plan algorithms, analysts to document business procedures, and support teams to write troubleshooting guides. The symbols were standardised by ANSI in the 1960s and later as ISO 5807.
Most flowcharts need only four shapes: the rounded terminator for start and end, the rectangle for a process step, the diamond for a decision with labelled exits, and the parallelogram for input or output. The others help larger charts: a predefined process points to a chart drawn elsewhere, a connector joins lines without crossing the page, and the cylinder marks stored data. Arrows always show the direction of control.
Walkthrough: the flow starts, reads the cart, and asks whether every item is in stock. If not, it shows a message and loops back to the cart. If yes, it takes payment. An approved payment creates the order and ends. A declined payment checks a counter: under three tries, ask for a new card and retry; otherwise cancel. The two loops show how flowcharts express repetition with an arrow going back up, and the counter shows how a loop is kept from running forever.
Swimlanes add who to what. Each horizontal lane belongs to one actor. The user enters an email; the web app checks it. Known addresses get a token and the email service sends a link; the user opens it and sets a new password. Unknown addresses follow the "no" path to the same confirmation message, a deliberate security choice that the chart makes visible. Handoffs between lanes are where delays and bugs usually hide.
The checkout example in Mermaid flowchart syntax. It renders in GitHub and GitLab Markdown, the Mermaid Live Editor, and many documentation tools; ([ ]) is a terminator, [/ /] input/output, { } a decision.
flowchart TD
A([Start]) --> B[/Read cart/]
B --> C{All in stock?}
C -- no --> D[Show out-of-stock] --> B
C -- yes --> E[Take payment]
E --> F{Approved?}
F -- yes --> G[Create order] --> H([End])
F -- no --> I{Tries < 3?}
I -- yes --> J[/Ask new card/] --> E
I -- no --> K[Cancel checkout] --> H
Pros
Cons
When to use: explaining a procedure or algorithm with clear decisions, onboarding, or agreeing a business process. When not to: describing data movement (use a data flow diagram), object structure (use UML class diagrams), concurrent workflows (use activity or BPMN diagrams) or object lifecycles (use state machines).