ATM cash withdrawal
A worked example to adapt. Rename steps, add branches and owners to match how your team actually works.
Mermaid source for this diagram
flowchart TD
s(["Start"])
card[/"Insert card"/]
pin[/"Enter PIN"/]
d1{"PIN correct?"}
d2{"Attempts less than 3?"}
keep(["Retain card and end"])
amt[/"Enter amount"/]
d3{"Amount ≤ balance and daily limit?"}
msg[/"Show insufficient funds message"/]
cash["Dispense cash and update balance"]
rcpt[/"Print receipt, return card"/]
e(["End"])
s --> card
card --> pin
pin --> d1
d1 -->|Yes| amt
d1 -->|No| d2
d2 -->|Yes| pin
d2 -->|No| keep
amt --> d3
d3 -->|Yes| cash
d3 -->|No| msg
msg --> amt
cash --> rcpt
rcpt --> ePaste into any Markdown tool that renders Mermaid, such as GitHub.
About this atm withdrawal flowchart
The ATM withdrawal is one of the most common flowchart exercises in introductory programming and computer science courses, because a short, familiar process contains every basic construct: input, output, a decision, a loop with a counter, and more than one way to end.
This version models the logic, not a real bank's system. The PIN check allows a limited number of attempts (three here) before the card is retained. The amount check compares the request with both the balance and a daily withdrawal limit, and loops back so the customer can enter a smaller amount. The parallelograms mark everything the customer types or sees, which is the input/output symbol in standard flowchart notation.
If you are writing this as a program, each diamond becomes an if statement and the PIN loop becomes a while loop with an attempt counter. The pseudocode below the steps shows one way to write it.
Step by step
- Input: card and PIN. The customer inserts the card and enters a PIN. Both are inputs, drawn as parallelograms.
- Decision: PIN correct?. If correct, continue. If not, increase the attempt counter.
- Loop: attempts left?. If fewer than three attempts have been used, ask for the PIN again. Otherwise retain the card and end.
- Input: amount. The customer enters the amount to withdraw.
- Decision: enough funds?. Compare the amount with the balance and the daily limit. If it is too high, show a message and ask again.
- Process: dispense. Dispense the cash and subtract the amount from the balance.
- Output: receipt and card. Print a receipt, return the card and end.
How to make it in flow-chart.io
- Start from the example. Press "Use this template" to open this exact ATM flowchart in the editor, or edit the text in the generator box and press Generate for a free preview without signing up.
- Match your program. Rename the input, process and output boxes so they use the same variable names as your code. Keep one action per box.
- Check every branch. Trace each diamond with a test value for the Yes exit and one for the No exit, and make sure both reach the end oval.
- Share or export. Share a read-only view link with a classmate or reviewer. Downloads as PNG, SVG or PDF are part of Flow Pro (see pricing).
Tips
- Initialize the attempt counter before the PIN loop; flowcharts often forget it and the loop never ends.
- Use parallelograms for every customer input and screen message, rectangles for internal work.
- Add a "cancel" branch from the amount input if your assignment asks for it.
- Pseudocode: attempts = 0; repeat read pin; attempts = attempts + 1 until pin is correct or attempts = 3; if pin is wrong, retain card and stop; read amount; while amount is over balance or limit, show message and read amount; balance = balance minus amount; dispense; print receipt; return card.
Frequently asked questions
- How do I draw an ATM flowchart?
- Start with an oval, add parallelograms for inserting the card and entering the PIN, a diamond for "PIN correct?", a loop with a counter for wrong PINs, then input the amount, a diamond for the balance check, a rectangle to dispense cash and update the balance, an output for the receipt, and an end oval.
- How many PIN attempts should the flowchart allow?
- Most textbook versions use three. The number is a design choice; write it in the decision so the reader sees the rule.
- Which symbols does an ATM flowchart use?
- Terminator ovals for start and end, parallelograms for input and output, rectangles for processing, and diamonds for decisions. See the flowchart symbols guide.
- Can I open this flowchart and change it?
- Yes. Press Use this template to open it in the editor with a free account; every box and arrow is editable.
- Is this how real ATMs work?
- Real ATMs talk to the bank's systems and follow card network rules, so the real process has many more steps. This flowchart is a teaching model of the main logic.