G02 vs. G03: A Beginner’s Guide to Circular Interpolation (With Examples)

G02 vs. G03: A Beginner’s Guide to Circular Interpolation (With Examples)

If you are learning CNC programming, linear moves (G01) are easy to understand. You go from point A to point B in a straight line. Simple.

But as soon as you need to cut a curve, a radius, or a full circle, things get a bit tricky. You are introduced to Circular Interpolation, specifically G02 and G03.

A common question I hear from students at Machining Tutor is: "I always mix them up! How do I remember which one is which?"

In this guide, we’ll break down the difference, give you a fool-proof way to remember them, and show you how to write the code using both the Radius (R) method and the Arc Center (I, J) method.

The Quick Answer: What is the difference?

At the most basic level, the difference comes down to the direction of the cutter path:

G-Code Direction Terminology Memory Trick
G02 Clockwise Circular Interpolation CW Like a standard clock (12 to 3)
G03 Counter-Clockwise Circular Interpolation CCW Reverse clock direction

(Tip: Imagine placing an analog clock face directly on top of your workpiece to visualize the move.)

How to Visualize It (So You Never Forget)

  • If your cutter is moving from 12 o'clock towards 3 o'clock, that is G02.
  • If your cutter is moving from 3 o'clock towards 12 o'clock, that is G03.

Pro Tip: This rule applies when looking at the machining plane from the "positive" direction. On a standard 3-axis mill, you are looking down from the spindle (Z-axis). On a lathe, the perspective changes, but the clock logic remains the same relative to the tool's movement.

The Syntax: R vs. I, J, K

Knowing the direction is step one. Step two is telling the machine how to cut the arc. There are two ways to do this in G-code.

Method 1: The "R" Word (Radius)

This is the modern, beginner-friendly method. You simply tell the machine the endpoint and the radius of the arc.

Format:
G02 X[End X] Y[End Y] R[Radius] F[Feedrate]

  • Pros: Easy to read and write manually.
  • Cons: Cannot cut a full 360-degree circle in one line (the machine gets confused).

Method 2: The "I and J" Method (Arc Center Offsets)

This is the classic method. Instead of a radius, you tell the machine where the center of the arc is relative to the start point.

  • I: Distance from Start Point to Arc Center along the X-axis.
  • J: Distance from Start Point to Arc Center along the Y-axis.

Format:
G03 X[End X] Y[End Y] I[X distance] J[Y distance] F[Feedrate]

Real-World Examples

Let’s say we are cutting a 90-degree corner with a 10mm Radius.

  • Start Point: X0 Y0
  • End Point: X10 Y10

Example 1: Cutting Clockwise (G02) using "R"

We want to arc "in" towards the part.

G01 X0 Y0 (Move to start point)
G02 X10.0 Y10.0 R10.0 F250.0 (Arc move)

Example 2: Cutting Counter-Clockwise (G03) using "I and J"

Now let's do the opposite curve using arc centers.

G01 X10.0 Y0 (Move to start point)
G03 X0 Y10.0 I-10.0 J0 F250.0

Why I-10.0? Because the center of our imaginary circle is 10mm to the left (negative direction) of our start point.

Common Mistakes to Avoid

  1. Modal Confusion: G02 and G03 are modal. This means if you write a G02 line, the next line will also be a G02 unless you switch back to G01 (linear move).
  2. Wrong Plane: G02/G03 defaults to the XY plane (G17). If you are doing advanced surfacing on XZ or YZ planes, you need to call G18 or G19 first.
  3. Missing the Negative: When using I and J, the direction is relative to the start point. Forgetting a minus sign will cause the machine to throw an "Invalid Arc" alarm.

Ready to stop guessing and start machining?

Circular interpolation is just one module in our complete CNC training system. If you want to master G-code from scratch, check out the full curriculum at Machining Tutor.

Machining Tutor is the premier online training platform for future CNC professionals.

We combine immersive, real-world video lessons with 24/7 AI Mentorship and Live 1-on-1 Classes to take you from 'Zero Knowledge' to 'Job-Ready' in record time.

Stop guessing and start mastering G-Code, CAD/CAM, and Machine Setup today.

G Code LTD

71-75 Shelton Street

London, United Kingdom

Newsletter

Subscribe now to get daily updates.