G-code reference

G91 G-Code: Incremental Programming

Incremental Programming — Coordinates are distances from the current position instead of from work zero. Used for repeated patterns, subprograms and G28 returns.

By cnccode · Updated
PropertyValue
CodeG91
FunctionIncremental Programming
Modal group03
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG91

What does G91 do?

Coordinates are distances from the current position instead of from work zero. Used for repeated patterns, subprograms and G28 returns.

G91 is modal: once programmed it remains in effect for the following blocks until another code from modal group 03 replaces it or the control is reset.

Syntax and parameters

Format
G91

G91 example program

Example
G91 G01 X10.0 F300. (move +10)
X10.0 (another +10)
G90

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Return to G90 immediately after the incremental section.
  • Lathes use U and W for incremental moves.

Controller compatibility

G91 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G91 modal?
Yes. G91 belongs to modal group 03 and stays active until another code of that group is programmed.
What does G91 mean in CNC?
G91 means Incremental Programming. Coordinates are distances from the current position instead of from work zero. Used for repeated patterns, subprograms and G28 returns.
What is the difference between G91 and G90?
G91 is Incremental Programming, while G90 is Absolute Programming (Mill) / OD Turning Cycle (Lathe). See the G90 page for its syntax and examples.
Can I use G91 on a lathe?
Usually not with the same meaning: G91 is documented here for milling machines. Check your control manual for the equivalent.