Getting the I and J offsets right in G-code arc moves is crucial. The machine isn't guessing—if those numbers are off, the cutter won't make the arc you expect. You might see drift, wrong radii, or alarms stopping your program. This CNC G-Code Arc Calculator gives you I and J based on your real start and end points and the arc radius you've got to hit—nothing more, nothing less. If you're working in automotive, aerospace, or medical where radii aren't just cosmetic, even a small mistake here can bite you. Below you'll find the relevant formulas, a worked-through example, some plain facts about arc geometry, and extra reference info.
What is CNC G-Code Arc Programming with I J Values?
I and J in G-code are simply the X and Y distances from where the cutter starts the arc to where the arc's center needs to be. They're offsets—not full coordinates—used for G02 and G03 instructions that drive your tool along a defined circular path.
Simple Explanation
If you told someone "walk 5 meters left, then 3 forward" instead of giving them a map pin, that's how I and J work for the CNC. They define how far the arc center is from where the tool currently sits. The controller just needs those two numbers to figure out the circle, and then it knows exactly how to move the cutter from start to finish around the arc.
📐 Browse all 1000+ Interactive Calculators
Table of Contents
CNC Arc Geometry Visualization
CNC G-Code Arc Calculator — I J Values Interactive Visualizer
Use this visualization to understand how shifting your start, end, or radius changes the I and J results. Change the values, and the toolpath will show you exactly how the arc geometry updates along with the new offsets for G-code use.
I VALUE
-15.0
J VALUE
10.0
ARC LENGTH
45.2 mm
SWEEP ANGLE
73.8°
FIRGELLI Automations — Interactive Engineering Calculators
How to Use This Calculator
- Type in your X and Y for where you want the arc to start.
- Enter the end X and Y where you want the arc to finish.
- Input your desired arc radius—it must cover at least half the straight-line distance between start and end points, or the math just won't work.
- Click Calculate to get your I and J.
G-Code Arc Calculator — I J Values
This calculator is intended for education, concept evaluation, and preliminary design. Results are based on the equations and assumptions described on this page, but cannot account for every real-world load case, tolerance, material property, environmental condition, installation detail, safety factor, code, or regulatory requirement. Verify all inputs, assumptions, units, and results independently before selecting components or using the result in a real application. Safety-critical, structural, medical, lifting, transportation, or regulated applications must be reviewed by a qualified engineer.
Mathematical Formulas for G-Code Arc Calculations
Chord Length Calculation
To get the straight-line distance between your start and end points (the chord), use this:
d = √[(X₂ - X₁)² + (Y₂ - Y₁)²]
d is just the distance in a straight line from start to end.
Center Point Calculation
This lets you find how far the arc center needs to be from the chord's midpoint. Then you work out I and J from the start point to that center:
Distance to center = √[R² - (d/2)²]
I = Center_X - X₁
J = Center_Y - Y₁
I and J put your arc center where it needs to be, measured from the arc's start.
Arc Length and Sweep Angle
To get how long the arc path is and how much of the circle you cover:
Arc Length = R × θ
θ = arctan2(Y₂ - Center_Y, X₂ - Center_X) - arctan2(Y₁ - Center_Y, X₁ - Center_X)
θ here is in radians, and R is your arc's radius.
Simple Example
Start at (0, 0), end at (10, 0), with a 5 unit radius.
Chord = 10. Distance from chord midpoint to arc center = √(25 − 25) = 0.
Arc center is (5, 0). So the offsets: I = 5, J = 0.
Your G-code would read: G03 X10 Y0 I5 J0
Understanding G-Code Arc Programming with I J Values
For any practical CNC job, you need the cutter to follow the actual arc you want. Circular interpolation isn't just for fancy curves—it's standard for blending, profiling, and pocketing. When you use G02 or G03, the controller uses I and J to build the circle from your start point, so those offsets define everything about the arc.
The Foundation of Circular Interpolation
I and J are offsets—distances from your current position to the circle's center, not world coordinates. That makes editing and programming more flexible and means less chance for accidental shifts if your machine zero changes. The controller calculates everything from these local distances.
On hitting G02/G03, the CNC plots a circle through your current point and your end point, tangent to your radius, driven by I and J. This keeps your feedrate smooth and cuts consistent if the numbers are set right.
Practical Applications in Manufacturing
You'll see arc interpolation everywhere: automotive moldings, transition blends, aerodynamic cutouts in aerospace, and guide features in medical parts. Whenever a part spec calls for a specific curve or blend, getting your I and J correct is non-negotiable.
Linear actuators often work together with CNC systems in handling or correction setups. They're reliable for sliding workpieces or jigs into place, complementing how arcs and other toolpath features get produced on the machine side.
Worked Example: Calculating Arc Parameters
Say you want an arc from (0, 0) to (10, 0) with a 5-unit radius. Following the calculator method:
- Start Point: X₁ = 0, Y₁ = 0
- End Point: X₂ = 10, Y₂ = 0
- Radius: R = 5
Chord length is the straight line: d = √[(10-0)² + (0-0)²] = 10
Then distance from midpoint to arc center is zero, since this is a semicircle: √[5² - (10/2)²] = 0
So the arc center is (5, 0); that makes I = 5 and J = 0 (relative to the start). The G-code: G03 X10 Y0 I5 J0 (for CCW arcs).
Design Considerations for Arc Programming
The tool diameter limits your smallest possible arc. Use a bigger radius than the cutter or you risk tool breakage or chatter. Keep your feed and speed reasonable on arcs—the actual contact speed changes as you move, so don't just use your usual values blindly. Material type affects forces required for carving arcs, especially in stainless or tough plastics.
Machine age, backlash, and rigidity matter a lot for tiny arcs. Some older machines simply can't interpolate accurately if the arc is too tight. Know your equipment and set the minimum radius based on what it can handle cleanly, even if the math says a tighter curve is possible.
Common Programming Challenges
Arcs have unique failure modes. If your I, J, or radius are wrong, the machine might just halt with an error, or worse, cut along a path you didn't intend. Always check that the chord between start and end does not exceed twice your radius, or the tool cannot draw a valid arc at all.
The G-code won't always point out subtle mistakes—wrong arc direction just means your part comes out mirrored, not the right curve. Swapping G02 for G03 (or vice versa) corrects direction, but only if the math and your setup match what you want.
Be consistent with how your machine defines clockwise and counterclockwise. Don't assume—double-check which way your CNC defines G02 and G03 in your documentation, as operator perspective can be a common source of confusion.
Advanced Techniques and Optimization
For work like thread milling or multi-axis moves, you’ll sometimes combine arc commands with a Z-axis motion—known as helical interpolation. Here, you must coordinate feed rates so the path follows the real 3D helix, not just the flat arc in XY, and make sure your machine actually supports this.
If you're chasing tight tolerances, tool diameter offset commands (G41/G42) are mandatory for accurate part size. Remember, the offset changes how the controller interprets your programmed arc, so input your I and J values considering the effective toolpath, not just the part outline.
Job shops and repetitive production often use variables and subroutines for parametric arcs, letting you quickly adapt offsets as fixture or part families change. Don't hard-code every value—use simple math in your programs for flexibility and fewer errors.
Integration with Modern Manufacturing
CNC programming doesn't live in isolation anymore. Your circular interpolation must match up with whatever automated handling and inspection systems you've got. A mismatch means scrap or downtime.
CAM software usually takes care of I and J for you, but you still need to double-check the numbers, especially if you edit G-code manually or your machines use different controller brands. Manual calculation is still valuable for troubleshooting or setups missed by post-processors.
After machining, coordinate measuring (CMM) or scanning will often check your arc's actual shape. These tools reveal even slight programming or execution errors, closing the loop between theory and final part, which helps you tune future jobs.
Frequently Asked Questions
📐 Browse all 1000+ Interactive Calculators →
About the Author
Robbie Dickson
Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.
📹 Video Walkthrough — How to Use This Calculator
📹 Video Walkthrough — How to Use This Calculator
Need to implement these calculations?
Explore the precision-engineered motion control solutions used by top engineers.
