Beginner’s Guide to G‑Code Milling: A Practical Sample Program
Sample G Code Program for Beginners
Sample G code program example for cnc programmers / cnc machinists who work or want to learn cnc mill programming.
A similar G code example can be found here
Simple G Code Example Mill – G code Programming for Beginners
If you are interested in G code subroutine example (sub program) read
CNC Mill Contour Pecking – Fanuc Subprogram Repeat Example
This is the same component but this time we are machining it in taper.
G Code Example

G Code Example Mill
O1000 T1 M6 G0 G90 G40 G21 G17 G94 G80 G54 X-75 Y-25 S500 M3 (Start Point) G43 Z100 H1 Z5 G1 Z-20 F100 X-50 M8 (Position 1) Y0 (Position 2) X0 Y50 (Position 3) X50 Y0 (Position 4) X0 Y-50 (Position 5) X-50 Y0 (Position 6) Y25 (Position 7) X-75 (Position 8) G0 Z100 M30
CNC Machine
- CNC Programming for Beginners: Step‑by‑Step Lathe Example
- CNC Programming for Beginners: Learn with a Practical Example
- Master G02/G03 Circular Interpolation in CNC: Step‑by‑Step Example
- CNC Milling Machine Programming: Beginner-Friendly Example Guide
- Beginner CNC Slot Milling Program: Simple Example & Step‑by‑Step Guide
- Step-by-Step Guide: Mill a Full Circle on CNC Machines Using Practical G‑Code
- Beginner's Guide to G‑Code: Simple Milling Example & Practical Tips
- Beginner's Guide to CNC Lathe G‑Code: Simple Example & Step‑by‑Step Tutorial
- Heidenhain CNC Milling Program Tutorial for Beginners
- Haas Mill G107 Cylindrical Mapping Program Example – Step‑by‑Step CNC Code Guide