CNC, Speeds & Feeds · Calculator

CNC Circular Interpolation G02/G03 I-J-K Calculator

In CNC G-code programming under ISO International Metrology Standard (ISO 6983-1), G02 commands clockwise and G03 counter-clockwise circular interpolation. Arc center coordinates are defined by incremental vectors I = X_c - X_s and J = Y_c - Y_s. Controller radius error ΔR = |R_{end} - R_{start}| must stay below 0.001 mm to avoid Fanuc Alarm 020.

CNC Circular Interpolation G02 / G03 I-J-K & R Arc Center Error Calculator

Compute CNC arc center coordinates (X_c = X_s + I, Y_c = Y_s + J), radius discrepancy ΔR, G-code blocks, and alarm thresholds under ISO 6983-1 for Fanuc, Haas, and Siemens controllers.

ISO 6983-1 / Fanuc 020 Clean
GENERATED CNC G-CODE BLOCKS
G17 G02 X20.000 Y20.000 I20.000 J0.000 F500.0 | G17 G02 X20.000 Y20.000 R20.000 F500.0
RADIUS DISCREPANCY & ALARM CHECK
Radius Tolerance ΔR = 0.00 µm (PASS < 1 µm — Fanuc 020 Clean)
START & END RADII / CENTER COORD
R_start = 20.0000 mm | R_end = 20.0000 mm | Center = (20.00, 0.00)
SWEEP ANGLE & ARC LENGTH
Subtended Sweep Angle = 90.00° | Arc Length = 31.416 mm (G02)

How Do G02 and G03 Circular Interpolation Vectors Work in CNC Milling?

When programming circular toolpaths on vertical milling centers or CNC lathes, the machine control coordinates continuous two-axis motion along a true circular arc. In the primary G17 X-Y plane, a circular interpolation block requires the target endpoint coordinates (X, Y) and the geometric arc center definition. While modern CAM post-processors can output either radius format (R) or arc center vectors (I, J), precision machining standards mandate incremental I and J vectors.

According to Machinery's Handbook (Industrial Press), I represents the directed distance along the X-axis from the arc starting point to the circle center, while J represents the directed distance along the Y-axis. Because I and J explicitly fix the center in space, the controller computes start radius R_{start} = √(I² + J²) and target end radius R_{end} = √((X_e - X_c)² + (Y_e - Y_c)²). If the two radii disagree by more than the controller parameter tolerance—typically 0.001 mm (0.00004") on Fanuc 0i/31i—the control triggers an immediate motion stop.

Table 1: ISO 6983-1 / Fanuc & Haas CNC Circular Interpolation Plane Selection, Center Offsets, and Direction Vectors — Verified October 2026.
G-Code Plane Primary Axes Arc Center Vector Addresses Normal Tool Axis G02 (Clockwise Direction) G03 (Counter-Clockwise)
G17 (Default Mill Plane)X-Axis & Y-AxisI (along X), J (along Y)Z-Axis (Vertical Spindle)Looking down +Z toward partLooking down +Z toward part
G18 (Lathe / Right-Angle Head)Z-Axis & X-AxisK (along Z), I (along X)Y-Axis (Cross-Slide Height)Looking from +Y toward X-ZLooking from +Y toward X-Z
G19 (Side Milling / Horizontal)Y-Axis & Z-AxisJ (along Y), K (along Z)X-Axis (Horizontal Spindle)Looking from +X toward Y-ZLooking from +X toward Y-Z

Why Does Radius Format (R) Fail on Full 360° Circles and Cause Tolerance Alarms?

Programmers often prefer the simple R format because it requires typing only one value: G02 X20.0 Y20.0 R20.0 F500.0. However, radius format has two critical geometric limitations documented by NIST (National Institute of Standards and Technology) control studies. First, two distinct circles can pass through the same start and end points with identical radius: an arc of ≤ 180° (programmed with +R) and an arc of > 180° (programmed with -R). Second, for a full 360° circular hole or boss where start and end coordinates are identical (X_s = X_e, Y_s = Y_e), an R address is mathematically indeterminate and causes the tool to remain motionless.

Furthermore, rounding end-point coordinates to three decimal places (0.001 mm) introduces subtle rounding discrepancies that can cause Haas Alarm 335 or Fanuc Alarm 020. For example, moving from (0, 0) to (20.000, 20.000) with I = 20.000, J = 0.000 yields R_{start} = 20.0000 mm and R_{end} = √(0² + 20²) = 20.0000 mm, giving an exact discrepancy of ΔR = 0.0000 mm (100% clean pass)—cross-reference with our CNC Thread Milling Calculator and Rigid Tapping G84 Calculator.

Table 2: CNC Controller Arc Center Tolerance (ΔR = |R_end − R_start|) Limits, Common Alarms, and Programming Best Practices — Verified October 2026.
CNC Control Family Default Radius Tolerance (ΔR) Triggered CNC Alarm Code Failure Mode Description Recommended Programming Fix
Fanuc 0i / 30i / 31i0.001 mm (0.00004")Alarm 020 (OVER TOLERANCE OF RADIUS)Start radius and end radius differ past parameter #3410Use I-J incremental vectors computed to 4 decimal places
Haas NextGen (NGC)0.0025 mm (0.00010")Alarm 335 (NON-MONOTONIC ARC / RADIUS)Calculated arc center does not intersect programmed end pointSet Setting 44 (Arc Accuracy) or switch from R to I-J format
Siemens Sinumerik 840D0.005 mm (0.00020")Alarm 14040 (Error in End Point of Circle)Circle endpoint outside programmed contour tolerance windowUse CR= or incremental I, J, K center addresses
Heidenhain TNC 6400.002 mm (0.00008")Radius Error (CC / C / CP Block)Circle center CC distance to EP disagrees with SP distanceDefine CC with 4 decimal digits or use polar coordinates

How to Select Planes G17, G18, and G19 for Horizontal Milling and Lathes

Circular interpolation vectors depend on the active coordinate plane established by G-codes ASME Geometric & Mechanical Standards (ASME B5.54). On horizontal machining centers (HMCs) or lathes with live tooling, programming arcs on the side face requires selecting G19 (Y-Z plane) with J and K center vectors. On standard 2-axis CNC turning centers, OD/ID profiling operates in G18 (Z-X plane) using K (Z-axis offset) and I (X-axis offset in radius programming). Compare with our Custom Macro B Variables Reference and G76 Threading Cycle Calculator.