G-code reference

G81 G-Code: Drilling Cycle (Spot Drill)

Drilling Cycle (Spot Drill) — Simple drilling canned cycle: rapid to R, feed to Z, rapid out. It is used for spot drilling and shallow holes.

By cnccode · Updated
PropertyValue
CodeG81
FunctionDrilling Cycle (Spot Drill)
Modal group09
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG81 X_ Y_ Z_ R_ F_

What does G81 do?

Simple drilling canned cycle: rapid to R, feed to Z, rapid out. It is used for spot drilling and shallow holes.

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

Syntax and parameters

Format
G81 X_ Y_ Z_ R_ F_
AddressMeaning
ZHole bottom
RRetract (rapid-to) plane
FFeed
K/LRepeat count (incremental patterns)

G81 example program

Example
G90 G98 G81 X10.0 Y10.0 Z-3.0 R2.0 F150.
X30.0
X50.0
G80

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Holes deeper than ~3× diameter should use G83.
  • G98 returns to the initial Z, G99 to the R plane between holes.

Controller compatibility

G81 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 G81 modal?
Yes. G81 belongs to modal group 09 and stays active until another code of that group is programmed.
What does G81 mean in CNC?
G81 means Drilling Cycle (Spot Drill). Simple drilling canned cycle: rapid to R, feed to Z, rapid out. It is used for spot drilling and shallow holes.
What is the difference between G81 and G82?
G81 is Drilling Cycle (Spot Drill), while G82 is Drilling Cycle with Dwell (Counterbore / Spot). See the G82 page for its syntax and examples.
Can I use G81 on a lathe?
Usually not with the same meaning: G81 is documented here for milling machines. Check your control manual for the equivalent.