Free CNC geometry utility

G-code Arc Calculator & IJK/R Validator

Solve a G2/G3 arc from its center or signed radius, see the actual sweep and path, and catch radius-to-end mismatches before reviewing the line at the controller.

1. Define the arc

Direction is viewed from the +Z end toward the XY plane.

Current / start point

Commanded end point

Whole turns, 1–100. Confirm P support in your dialect.

2. Geometry check

Calculating…

Radius from start
—
Radius from end
—
Sweep
—
Path length
—

—

Center: —
Incremental center offsets: —
Chord: —

Preview is the selected plane viewed from its positive perpendicular axis. Multi-turn paths overlap in this 2D view.

Review-first G-code

Do not run generated code without checking the target controller manual, modal state, coordinate system, start position, units, feed, limits, workholding, clearances, compensation, and a simulator or dry run. This is geometry—not machine approval.

Inputs stay in this browser and are not uploaded or saved. The shared site analytics tag may count page visits, but does not receive these values.

G2/G3 center and radius conventions

G2 is clockwise and G3 is counterclockwise when the selected plane is viewed from the positive end of its perpendicular axis. G17 uses XY with I/J, G18 uses XZ with I/K, and G19 uses YZ with J/K. The calculator uses a right-handed view for each plane so direction remains consistent.

In center format, G91.1 treats I/J/K as offsets from the arc start while G90.1 treats them as absolute center coordinates. These arc-center modes are separate from G90/G91 endpoint distance mode. The output explicitly sets G90 for the endpoint values entered here.

What the validator checks

For center-format arcs, both start and end must be the same radius from the specified center. The page shows both radii, their absolute and percentage difference, and a comparison with LinuxCNC’s documented G2/G3 acceptance rule. That comparison is informational: other controls use different tolerances, modal rules, precision, and arc syntax.

For R format, two circle centers usually fit the same endpoints and radius. The sign selects the minor or major solution under the documented convention. Near-semicircle and near-full-circle R arcs magnify endpoint rounding error; center format is generally more stable there.

Frequently asked questions

Are I, J, and K always incremental?

No. Many workflows use incremental arc-center offsets, but controls and modal settings vary. This tool makes G91.1 incremental and G90.1 absolute center modes explicit and emits the selected mode.

Why does “radius to end differs from radius to start” occur?

The stated center is not equally distant from the current point and commanded endpoint, often because of incorrect offsets, the wrong plane or center mode, or too few decimal places. Compare the two displayed radii and modal assumptions.

What does negative R mean?

Under the LinuxCNC convention used here, positive R selects an arc up to 180° and negative R selects an arc over 180°. Verify the sign convention and supported range in your own controller.

Can this validate a complete CNC program?

No. It evaluates one idealized arc and emits a starting snippet. It does not parse prior modal state, offsets, tool compensation, machine kinematics, units elsewhere in the program, collisions, or controller-specific restrictions.

Browse machining and CNC tools · All ToolQuill tools